我正在制作视频聊天应用程序并尝试录制视频。但是我遇到了在safari浏览器中记录本地Stream或Remote Stream的问题。它显示错误“无法找到变量:MediaRecorder”。
这是我的代码:
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: '' };
}
}
}
}
答案 0 :(得分:-1)
MediaRecorder is not supported jet by Safari 11, iOS 11