I've encountered an issue while working on a video chat application and attempting to record the video. Specifically, I'm struggling with recording the local Stream or Remote Stream in the Safari browser. An error message stating "can't find variable: MediaRecorder" keeps popping up.
Below is my code snippet:
function startRecording() {
recordedBlobs = [];
var options = { mimeType: 'video/webm;codecs=vp9' };
if (!MediaRecorder.isTypeSupported(options.mimeType)) {
console.log(options.mimeType + ' is not Supported');
options = { mimeType: 'video/webm;codecs=vp8' };
if (!MediaRecorder.isTypeSupported(options.mimeType)) {
console.log(options.mimeType + ' is not Supported');
options = { mimeType: 'video/webm' };
if (!MediaRecorder.isTypeSupported(options.mimeType)) {
console.log(options.mimeType + ' is not Supported');
options = { mimeType: '' };
}
}
}
}