Detect offline peer in WebRTC connection

后端 未结 2 1060
北海茫月
北海茫月 2020-12-19 07:51

We are developing a video stream from a mobile device to a computer using WebRTC. The mobile device might lose its connection completely and the computer should be able to d

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-19 08:09

    the iceconnectionstatechange handler should fire after ~5-10 seconds of not receiving data from the peer anymore (in Chrome; Firefox is working on that currently). See https://webrtc.github.io/samples/src/content/peerconnection/states/ for an example.

提交回复
热议问题