Search code examples
sinch

Issue with calling when someone has camera off


There is an issue with the JavaScript library when someone is calling you and you don`t have your camera open. You cannot use the answer or hangup buttons and the ringer goes unlimited time. Maybe you should check if the user has the camera turned on, if not you can auto hangup the call.

I get this error from the sinch.min.js file:

Error retrieving media stream NavigatorUserMediaError {}

The code that generates the error is:

navigator.getUserMedia({
    video: d,
    audio: !0
}, function(a) {
    this.localMediaStream = a, c.resolve(this.localMediaStream)
}.bind(this), function(a) {
    console.error("Error retrieving media stream", a)
})

Solution

  • Hey you found a bug in our Beta SDK it sin the backlog for fixing, email me [email protected] and we will send you some Swag in the mean time and a small token of appreciation for testing this with us.