Skip to content

Commit

Permalink
fix(local-recordings) fix for browsers not supporting MediaRecorder
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul committed Jun 10, 2022
1 parent bedddd4 commit 746fde7
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,26 @@ const getMimeType = (): string => {

const VIDEO_BIT_RATE = 2500000; // 2.5Mbps in bits

// Lazily initialize.
let preferredMediaType: string;

const LocalRecordingManager: ILocalRecordingManager = {
recordingData: [],
recorder: undefined,
stream: undefined,
audioContext: undefined,
audioDestination: undefined,
roomName: '',
mediaType: getMimeType(),
totalSize: 1073741824, // 1GB in bytes

get mediaType() {
if (!preferredMediaType) {
preferredMediaType = getMimeType();
}

return preferredMediaType;
},

/**
* Initializes audio context used for mixing audio tracks.
*/
Expand Down

0 comments on commit 746fde7

Please sign in to comment.