无法获取iPhone / iPad的相机访问权限

时间:2018-09-12 13:19:20

标签: opentok tokbox

在中继会话中使用带有H.264视频编解码器的opentok 2.14.8的Web(JS)版本。我以opentok reactJS加速器示例应用程序为基础。

当前,允许访问摄像头/音频弹出窗口在Android(Chrome),PC / Mac(Chrome / Firefox / Safari)上运行良好。请注意,我手动触发了一个按钮以访问摄像机并显示供稿。

当尝试在iPhone / iPad上访问相机时,出现此错误。

VM537:19721 OT.Publisher.onStreamAvailableError 

OT_CONSTRAINTS_NOT_SATISFIED: It's not possible to satisfy one or more constraints passed into the getUserMedia function (getUserMedia error: OverconstrainedError)(anonymous function)

@ VM537:19721onStreamAvailableError 
@ VM537:15233emit 
@ VM537:5669trigger 
@ VM537:1799(anonymous function) 
@ VM537:56679tryCatch 
@ VM537:498invokeCallback 
@ VM537:513publish 
@ VM537:487publishRejection 
@ VM537:428flush 
@ VM537:217
VM537:19721 Received connectivity event: "Failure" without "Attempt"
VM537:19721 OT.exception :: title: Unable to Publish (1500) msg: 

GetUserMedia(anonymous function) 
@ VM537:19721handleJsException 
@ VM537:6811onStreamAvailableError 
@ VM537:15250emit 
@ VM537:5669trigger 
@ VM537:1799(anonymous function) 
@ VM537:56679tryCatch @ VM537:498invokeCallback 
@ VM537:513publish @ VM537:487publishRejection 
@ VM537:428flush 
@ VM537:217
VM537:19721 OT.Publisher.publish failed to getUserMedia: 
OT_CONSTRAINTS_NOT_SATISFIED: It's not possible to satisfy one or more constraints passed into the getUserMedia function (getUserMedia error: OverconstrainedError)(anonymous function) 
@ VM537:19721(anonymous function) @ VM537:16130promiseReactionJob

如何在iPhone / iPad上强制“访问相机”弹出窗口? 注意:我已经在相同的设备上测试过https://safari.opentokrtc.com/,它们工作良好。

1 个答案:

答案 0 :(得分:0)

我的猜测是,您正在将分辨率设置为320x240之类的较低值。 iOS无法解决此问题。 https://bugs.webkit.org/show_bug.cgi?id=176349

如果您将代码更新为使用640x480而不是iOS,则应该没问题。