If you do not have a camera AND a microphone, or do not allow either one of them, the JavaScript sample will not work.
A workaround is to modify the code to either:
Detect available devices using OT.getDevices() first, and use the publisher properties to only uses the devices you care about. Then change the getStats() related code to handle only the devices that are being used.
If you never care about a single kind of device (such as audio-only), you can remove the other from the implementation, and change the publisher intialization to pass false as the source for the one that you want to remove.
If you do not have a camera AND a microphone, or do not allow either one of them, the JavaScript sample will not work.
A workaround is to modify the code to either:
OT.getDevices()
first, and use the publisher properties to only uses the devices you care about. Then change thegetStats()
related code to handle only the devices that are being used.false
as the source for the one that you want to remove.