0
votes

Can someone explain me how about WebRTC peer answer timeout?

Environment

  • Browser A

  • Browser B

  • Browser A send sdp and candidates to Browser B

  • Browser B try to get media stream and Fail - NO_DEVICES_FOUND

So, Browser A can't establish P2P connection.

Who must handle this error?

I see two varians:

  1. Browser B send to A signalling message - Error happen and A close local stream.
  2. Browser A set timeout, may 20-30 sec and wait remote stream, if stream not received in 20-30 seconds - close local stream

What kind of better? Or another solution?

Sample code can be found here: w3.org sample

1
Waiting 30s to see and error message sounds very annoying. I would go with option 1: send a signalling message.Svetlin Mladenov

1 Answers

0
votes

WebRTC does not define a signalling protocol, so this problems appears when you are defining your own protocol.

The best approach is to do something like the standard protocols for VoIP do. As an example, both SIP and H.323 have error responses to inform the caller side that the call establishment is not possible, so that the user can be informed asap that the call will not happen.