Safari camera/video not working on a mobile device. It says error detected with the following parameters. is there any missing line to make safari browser camera/video works?
var mediaDevices = window.navigator.mediaDevices;
mediaDevices.getUserMedia = function(c) {
return new Promise(function(y, n) {
//This line is the error// (window.navigator.getUserMedia || window.navigator.mozGetUserMedia || window.navigator.webkitGetUserMedia).call(navigator, c, y, n);
});
}
我的东西你的主机应该是安全的,即https而不仅仅是可行的,因为safari需要安全的主机
mediaDevices.getUserMedia
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.