stun

webrtc实现点对点视频通讯

别等时光非礼了梦想. 提交于 2019-11-26 14:58:10
html: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>webrtc</title> <style> #yours{ width:300px; position:absolute; top:200px; left:100px; } #theirs{ width:300px; position:absolute; top:200px; left:400px; } </style> </head> <body> <button onclick="createOffer()">建立连接</button> <video id="yours" autoplay></video> <video id="theirs" autoplay></video> </body> <script src="./lib/jquery.min.js"></script> <script src="./lib/webrtc.js"></script> </html>

Implementing our own STUN/TURN server for WebRTC Application

匆匆过客 提交于 2019-11-26 12:58:34
问题 I am working on a webrtc application and have to implement following TURN server. https://code.google.com/p/rfc5766-turn-server/ I am following this tutorial. http://www.dialogic.com/den/developer_forums/f/71/t/10238.aspx and it says to reference the TURN server as follows, in javascript code where RTCPeerConnection is created. var pc_config = {\"iceServers\": [{\"url\": \"stun:stun.l.google.com:19302\"}, {\"url\":\"turn:<turn_server_ip_address>\", \"username\":\"my_username\", \"credential\"