0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

WebRTCでTURNサーバを利用しているかをRTCIceCandidateから調べる

Last updated at Posted at 2022-05-11

chrome://webrtc-internals/から手動で調べる方法はあるが、JSから調べる方法がわかりづらかったのでメモ。

pc.getTransceivers()[0].sender.transport.iceTransport.getSelectedCandidatePair().remote.type

Chromeだと、これが"relay"になっているとTURNで繋がっているとのこと。
なんかブラウザによって値が違うらしいので注意。
https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/type

参考

https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate
https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/type
https://support.skyway.io/hc/ja/articles/236031388-TURN%E3%82%B5%E3%83%BC%E3%83%90%E3%82%92%E5%88%A9%E7%94%A8%E3%81%97%E3%81%A6%E6%8E%A5%E7%B6%9A%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B%E3%81%8B%E7%A2%BA%E8%AA%8D%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?