Kurento: STUN/TURN

帅比萌擦擦* 提交于 2019-12-14 02:39:04

问题


I am searching how STUN/TURN servers entries defined webrtcendpoint.conf.ini file are used. I basically don't want to hard code the entries on JS side in constraints and want to define different STUN/TURN for different KMS instances.

So, my understanding is that if I don't define anything in JS, the entries defined in webrtcendpoint.conf.ini get used in ICE candidates eventually. Is that correct?


回答1:


STUN/TURN configuration from browser and KMS are not related, unless you make the browser aware of the configuration from your KMS. The content of webrtcendpoint.conf.ini is only used for the media server to discover it's own ICE candidates. If you don't define STUN/TURN servers for your client, none will be used.

Kurento-utils-js library uses FreeICE if you don't define your own STUN/TURN configuration in your client.




回答2:


I may be a little bit late to the party, but the correct way to avoid hardcoding your turn credentials into your browser client is to use the TURN REST API. You can read more about it here.

Basically, it allows you to request time-limited credentials using a secret key that is shared between your application server and your TURN server. The logic for this will be implemented in your application server, and you will expose an endpoint for requesting credentials.

You can read a more in depth answer here.



来源:https://stackoverflow.com/questions/37162476/kurento-stun-turn

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!