无法获得 iPhone/iPad 的相机访问权限
Unable to get camera access for iPhone/iPad
在中继会话中使用带有 H.264 视频编解码器的 web (JS) 版 opentok 2.14.8。我使用 opentok reactJS 加速器示例应用程序作为基础。
目前,允许访问 camera/audio 弹出窗口在 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 上强制显示 'access to camera' 弹出窗口?
注意:我已经在相同的设备上测试了 https://safari.opentokrtc.com/,它们运行良好。
我的猜测是您将分辨率设置为较低的值,例如 320x240。存在 iOS 无法给出此解决方案的问题。
https://bugs.webkit.org/show_bug.cgi?id=176349
如果您将代码更新为使用 640x480 而不是 iOS,您应该没问题。
在中继会话中使用带有 H.264 视频编解码器的 web (JS) 版 opentok 2.14.8。我使用 opentok reactJS 加速器示例应用程序作为基础。
目前,允许访问 camera/audio 弹出窗口在 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 上强制显示 'access to camera' 弹出窗口? 注意:我已经在相同的设备上测试了 https://safari.opentokrtc.com/,它们运行良好。
我的猜测是您将分辨率设置为较低的值,例如 320x240。存在 iOS 无法给出此解决方案的问题。 https://bugs.webkit.org/show_bug.cgi?id=176349
如果您将代码更新为使用 640x480 而不是 iOS,您应该没问题。