9

I am working on video chat application and try to record the video. but I'm facing the problem to record the local Stream or Remote Stream in safari browser. It's Showing an error "can't find variable: MediaRecorder".

This is my code:

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: '' };
            }
        }
    }
}
user8995182
  • 175
  • 3
  • 6

1 Answers1

9

MediaRecorder is not supported jet by Safari 11, iOS 11

https://caniuse.com/#search=MediaRecorder

jmp
  • 2,456
  • 3
  • 30
  • 47
  • 1
    I'm getting problems with iOS13.4.1, but that very useful (and regularly updates) link you provided says that you have to enable it in Advanced > Experimental features. – JavaLatte May 10 '20 at 08:03
  • 1
    I enabled *MediaRecorder* by menu: `Develop > Experimental Features > Media Recorder`. – Megidd Aug 18 '22 at 10:04