WebRTC: force peers to use TURN server

后端 未结 3 1034
温柔的废话
温柔的废话 2021-02-04 05:18

I have a webrtc application, it works fine, but for testing purposes, I need to test if my TURN server works, but because both the testing devices are within the same network, I

3条回答
  •  心在旅途
    2021-02-04 05:56

    I have no idea if or when the browsers will support this but have a look at the "ICE candidate policy" in section 4.1.1 of draft-ietf-rtcweb-jsep-08, you can see how setting the policy to "relay" will do what you want. In the current W3C API draft this is set using an RTCIceTransportPolicy value of "relay" for the iceTranportPolicy field in the configuration. Search for RTCIceTransportPolicy in https://w3c.github.io/webrtc-pc/

提交回复
热议问题