opentok-network-test-js
opentok-network-test-js copied to clipboard
Quality tests does not work on computers that have two cameras
Hello we are using opentok v2.17.0 and opentok-network-test-js v2.1.0 in my company in order to build a visio application and I am currently having an issue running the quality tests on specific computers.
Here is the error fired by OT.testQuality
:
error: { name: "InitPublisherError" stack: "Error: The selected voice or video devices are unavailable. Verify that the chosen devices are not in use by another application. (getUserMedia error: NotReadableError) [......] message: "The selected voice or video devices are unavailable. Verify that the chosen devices are not in use by another application. (getUserMedia error: NotReadableError)" }
After debugging the issue, it occurs that it may be related to the way you handle multiple cameras during the network quality tests. Indeed, this error appears only on windows computers that have two cameras in their system configuration.
I tried the opentok demo (with their network quality test) on theses computers and it works well. In addition, if I bypass the results of the quality tests I am able to launch a visio call without any problem in my application.
Note that, in my app, I require the users' permissions to access their microphone and camera before running the tests. Here are the results of OT.getDevices
:
devices: [ {deviceId: "default", label: "", kind: "audioInput"}, {deviceId: "communications", label: "", kind: "audioInput"}, {deviceId: "2d16e5d86f1ed75a45e3a2570d70cf25a954a1f8ae2fe7d65e87175f59f0bfca", label: "", kind: "audioInput"}, {deviceId: "ba4178310f59bb90cc7c2ea75abed80aabb0d1c34b2e471db07c60b42a5ae803", label: "", kind: "videoInput"}, {deviceId: "8b19f13b5b06b798476a4634ab0734c35086daa5da5a3dcf943bd3a4283edce3", label: "", kind: "videoInput"} ]
also OT.getUserMedia
does not fire any error and the permissions are allowed.
Do you have any idea of what is causing this issue?