最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - can't find variable: MediaRecorder in safari - Stack Overflow

programmeradmin1浏览0评论

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: '' };
            }
        }
    }
}

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: '' };
            }
        }
    }
}
Share Improve this question edited Dec 29, 2017 at 10:12 user8995182 asked Dec 29, 2017 at 7:10 user8995182user8995182 1753 silver badges7 bronze badges 1
  • add more tags to reach more people so add browsers, streams, video-stream, video-player etc will help you out. – Ankur Loriya Commented Dec 29, 2017 at 7:20
Add a ment  | 

1 Answer 1

Reset to default 9

MediaRecorder is not supported jet by Safari 11, iOS 11

https://caniuse./#search=MediaRecorder

发布评论

评论列表(0)

  1. 暂无评论