您好,您可以看到我的 videojs-recorder 有问题,问题是我无法通过手机访问我的摄像头。我使用下面的代码,我正在使用 chrome 上的远程开发工具对其进行测试。错误是:
VIDEOJS:错误:TypeError:无法读取未定义的属性“getUserMedia”
这是我的代码:
let player;
const options = {
controls: true,
width: 300,
height: 300,
plugins: {
record: {
audio: true,
screen: true,
image: false,
maxLength: 3600,
debug: true,
}
}
};
player = videojs("myVideo", options , function(){
// print version information at startup
videojs.log('Using video.js', videojs.VERSION,
'with videojs-record', videojs.getPluginVersion('record'),
'and recordrtc', RecordRTC.version);
});
// error handling
player.on('deviceError', function() {
console.log('device error:', player.deviceErrorCode);
});
player.on('error', function(element, error) {
console.error(error);
});
player.on('startRecord', function() {
console.log('started recording!');
});
player.on('finishRecord', function() {
console.log('finished recording: ', player.recordedData);
});
编辑:
目前我正在使用 2.1.2,我无法进行更新。