[英]Media Recorder in iOS
someone can help me with this line of code?有人可以帮我处理这行代码吗?
recorder = new MediaRecorder(stream, {mimeType: 'video/webm'}); recorder = new MediaRecorder(stream, {mimeType: 'video/webm'}); when i use this variable in iOS, cath(err) answer me "RefenceError, cant find variable: mediaRecorder" pleases can you helpe?
当我在 iOS 中使用这个变量时,cath(err) 回答我“ReferenceError,无法找到变量:mediaRecorder”,你能帮忙吗? if you need it this is the complete function
如果你需要它,这是完整的功能
startBtn.addEventListener('click',function() {
navigator.mediaDevices.getUserMedia(constraint).then(function(stream) {
recorder = new MediaRecorder(stream, {
mimeType: 'video/webm'
});
recorder.start();
}).catch(function(err) {
alert('impossible '+err);
});
})
Unfortunately the getUserMedia is only supported in safari browser不幸的是 getUserMedia 仅在 safari 浏览器中受支持
Any other browsers the getUserMedia is not supported in iOS devices iOS 设备不支持 getUserMedia 的任何其他浏览器
First check the availability of getUserMedia before you assign it to recorder在将其分配给记录器之前,首先检查 getUserMedia 的可用性
Good Luck祝你好运
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.