【发布时间】:2016-09-24 07:02:55
【问题描述】:
我正在使用 opentok 开发一个 webRTC 应用程序。该应用程序运行良好。我将应用程序转换为库并通过将其添加到另一个项目来启动库活动。该应用程序正在连接到服务器,但相机未打开。我收到如下相机错误
E/opentok-videocapturer: The camera is in use by another app
java.lang.RuntimeException: Fail to connect to camera service
at android.hardware.Camera.<init>(Camera.java:518)
at android.hardware.Camera.open(Camera.java:360)
at com.opentok.android.DefaultVideoCapturer.init(DefaultVideoCapturer.java:110)
at com.opentok.android.BaseVideoCapturer.initTrap(BaseVideoCapturer.java:223)
【问题讨论】:
-
在这个问题上挣扎了几天后,我发现这是 Marshmallow 及更高版本中的相机权限问题。请参考answer by 'vels' on the stack overflow question here