Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can't find variable: MediaRecorder in safari

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: '' };
            }
        }
    }
}
like image 677
user8995182 Avatar asked Dec 29 '17 07:12

user8995182


People also ask

How do I enable MediaRecorder in Safari?

Go to Settings → Safari → Advanced → Experimental Features. Enable MediaRecorder.

What is MediaRecorder?

The MediaRecorder API enables you to record audio and video from a web app. It's available now in Firefox and in Chrome for Android and desktop.

What is MediaRecorder API?

The MediaRecorder interface of the MediaStream Recording API provides functionality to easily record media. It is created using the MediaRecorder() constructor. EventTarget MediaRecorder.


1 Answers

MediaRecorder is not supported jet by Safari 11, iOS 11

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

like image 182
jmp Avatar answered Sep 30 '22 11:09

jmp