IOS 11中的Safari WebRTC支持

问题描述 投票:2回答:2

我们有一个应用程序,使用 WebRTCiOS 11它说它支持 WebRTC 但该应用程序无法在 Safari 关于 iOS 11. 有什么需要我们去做的吗?Safari 浏览器?我们必须在脚本中做任何修改吗?请帮助我们。

ios webrtc ios11
2个回答
0
投票

你得到了最后的适配器.js,假设浏览器的兼容性?

祝贺


0
投票

下面是一个对我有用的示例代码

// create video element first 
var video = document.createElement('video');
video.style.width = document.width + 'px';
video.style.height = document.height + 'px';
video.setAttribute('autoplay', '');
video.setAttribute('muted', '');
video.setAttribute('playsinline', '');
document.body.appendChild(video);

 //setup your constraints 
  constraints = {
     audio: false,
     video: {
       facingMode: front
      }
   }

  //ask navigator to allow access 
 navigator.mediaDevices.getUserMedia(constraints).then(function 
 success(stream) {
   video.srcObject = stream; 
 });
});
© www.soinside.com 2019 - 2024. All rights reserved.