{"id":35715,"date":"2025-05-06T16:51:01","date_gmt":"2025-05-06T08:51:01","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/35715.html"},"modified":"2025-05-06T16:51:01","modified_gmt":"2025-05-06T08:51:01","slug":"webrtc-%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b9%8bjanus%e6%a6%82%e8%bf%b0%e5%92%8c%e7%8e%af%e5%a2%83%e6%90%ad%e5%bb%ba","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/35715.html","title":{"rendered":"WebRTC \u670d\u52a1\u5668\u4e4bJanus\u6982\u8ff0\u548c\u73af\u5883\u642d\u5efa"},"content":{"rendered":"<h2 style=\"background-color:transparent\">1 \u6982\u8ff0<\/h2>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Janus \u662f\u7531 Meetecho \u5f00\u53d1\u7684\u901a\u7528 WebRTC \u670d\u52a1\u5668&#xff0c;\u5b83\u4e3a\u6784\u5efa WebRTC \u5e94\u7528\u7a0b\u5e8f\u63d0\u4f9b\u4e86\u4e00\u4e2a\u6a21\u5757\u5316\u6846\u67b6\u3002\u670d\u52a1\u5668\u76ee\u6807&#xff1a;<span style=\"color:#333333\"><span style=\"background-color:#f8f7f6\">Janus WebRTC \u7f51\u5173\u88ab\u8bbe\u8ba1\u4e3a\u8f7b\u91cf\u7ea7\u3001\u901a\u7528\u7684 WebRTC \u670d\u52a1\u5668&#xff0c;\u9664\u4e86\u5b9e\u73b0\u4ee5\u4e0b\u65b9\u6cd5\u5916&#xff0c;\u5b83\u672c\u8eab\u4e0d\u63d0\u4f9b\u4efb\u4f55\u529f\u80fd&#xff1a;<\/span><\/span><\/p>\n<ul style=\"margin-left:0;margin-right:0\">\n<li>\u8bbe\u7f6e\u4e0e\u6d4f\u89c8\u5668\u7684 WebRTC \u5a92\u4f53\u901a\u4fe1<\/li>\n<li>\u5728\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u4e4b\u95f4\u4ea4\u6362 JSON \u6d88\u606f<\/li>\n<li>\u5728\u6d4f\u89c8\u5668\u548c\u670d\u52a1\u5668\u7aef\u5e94\u7528\u7a0b\u5e8f\u903b\u8f91\u4e4b\u95f4\u4e2d\u7ee7 RTP\/RTCP \u548c\u6d88\u606f<\/li>\n<\/ul>\n<p style=\"margin-left:0;margin-right:0;text-align:start\"><span style=\"color:#333333\"><span style=\"background-color:#f8f7f6\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5b9e\u9645\u529f\u80fd\u662f\u5728\u6d4f\u89c8\u5668\u901a\u8fc7 Janus \u6838\u5fc3\u8fde\u63a5\u7684\u670d\u52a1\u5668\u7aef\u63d2\u4ef6\u4e2d\u5b9e\u73b0\u7684\u3002\u8fd9\u79cd\u6a21\u5757\u5316\u67b6\u6784\u5141\u8bb8\u5360\u7528\u7a7a\u95f4\u5c0f&#xff0c;\u540c\u65f6\u63d0\u4f9b\u6700\u5927\u7684\u7075\u6d3b\u6027\u3002<\/span><\/span><\/p>\n<h3 id=\"key-features\" style=\"margin-left:.8em;margin-right:0;text-align:start\"><span style=\"color:#333333\"><span style=\"background-color:#f8f7f6\">1.1 \u4e3b\u8981\u7279\u70b9<\/span><\/span><\/h3>\n<ul style=\"margin-left:0;margin-right:0\">\n<li>\u6a21\u5757\u5316\u67b6\u6784&#xff1a;\u5c06\u6838\u5fc3 WebRTC \u529f\u80fd\u4e0e\u5e94\u7528\u7a0b\u5e8f\u7279\u5b9a\u903b\u8f91\u5206\u79bb<\/li>\n<li>\u8f7b\u91cf\u7ea7\u6838\u5fc3&#xff1a;\u7528 C \u8bed\u8a00\u7f16\u5199&#xff0c;\u5360\u7528\u7a7a\u95f4\u5c0f<\/li>\n<li>\u63d2\u4ef6\u7cfb\u7edf&#xff1a;\u53ef\u901a\u8fc7\u5404\u79cd\u5e94\u7528\u7a0b\u5e8f&#xff08;\u89c6\u9891\u4f1a\u8bae\u3001\u6d41\u5a92\u4f53\u3001SIP \u7f51\u5173\u7b49&#xff09;\u7684\u63d2\u4ef6\u8fdb\u884c\u6269\u5c55<\/li>\n<li>\u591a\u79cd\u4f20\u8f93\u673a\u5236&#xff1a;\u652f\u6301 HTTP\/REST\u3001WebSockets\u3001RabbitMQ\u3001MQTT \u548c Unix \u5957\u63a5\u5b57<\/li>\n<li>\u4f1a\u8bdd\u7ba1\u7406&#xff1a;\u5904\u7406\u8fde\u63a5\u3001WebRTC \u4f1a\u8bdd\u548c\u63d2\u4ef6\u9644\u4ef6<\/li>\n<li>\u5a92\u4f53\u5904\u7406&#xff1a;\u5904\u7406\u5a92\u4f53\u534f\u5546\u3001\u7f16\u7801\u548c\u4f20\u8f93<\/li>\n<li>\u5f55\u5236\u529f\u80fd&#xff1a;\u652f\u6301\u5f55\u5236 WebRTC \u4f1a\u8bdd<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"638\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250506085059-6819cd73313c3.png\" width=\"2255\" \/><\/p>\n<h2 style=\"background-color:transparent\">2 janus\u642d\u5efa<\/h2>\n<p>\u4e91\u670d\u52a1\u5668\u7aef\u53e3\u5f00\u653e&#xff08;\u672c\u5730\u865a\u62df\u673a\u73af\u5883\u5219\u5173\u95ed\u9632\u706b\u5899\u5373\u53ef&#xff09;\u9700\u8981\u5728\u5b89\u5168\u7ec4\u5f00\u653e\u7aef\u53e3&#xff1a;<\/p>\n<p>TCP\/UDP 3478<\/p>\n<p>UDP 30000-60000<\/p>\n<h3>2.1\u57fa\u7840\u73af\u5883<\/h3>\n<p>sudo aptitude install libmicrohttpd-dev libjansson-dev libnice-dev libsofia-sip-ua-dev libopus-dev libogg-dev libcurl4-openssl-dev pkg-config gengetopt libtool automake libglib2.0-dev cmake libconfig-dev libssl-dev doxygen graphviz libavcodec-dev libavformat-dev libswscale-dev libavutil-dev <\/p>\n<h3>2.2 \u6e90\u7801\u5b89\u88c5\u4f9d\u8d56<\/h3>\n<h4>2.2.1 \u5b89\u88c5 WebSocket<\/h4>\n<p>git clone https:\/\/github.com\/warmcat\/libwebsockets.git<br \/>\ncd libwebsockets<br \/>\ngit branch -a \u67e5\u770b\u9009\u62e9\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c&#xff0c;<br \/>\ngit checkout v4.3.0 \u5207\u6362\u5230\u8f83\u65b0\u7a33\u5b9a\u7248\u672c<br \/>\nmkdir build<br \/>\ncd build<br \/>\ncmake -DCMAKE_INSTALL_PREFIX:PATH&#061;\/usr -DCMAKE_C_FLAGS&#061;&#034;-fpic&#034; ..<br \/>\nmake &amp;&amp; sudo make install <\/p>\n<h4>2.2.2 \u5b89\u88c5 libsrtp<\/h4>\n<p>git clone https:\/\/gitee.com\/MediaNext\/libsrtp.git<br \/>\ncd libsrtp<br \/>\ngit checkout v2.3.0<br \/>\n.\/configure &#8211;prefix&#061;\/usr &#8211;enable-openssl<br \/>\nmake shared_library &amp;&amp; sudo make install <\/p>\n<h4>2.2.3 \u5b89\u88c5libmicrohttpd<\/h4>\n<p>wget https:\/\/ftp.gnu.org\/gnu\/libmicrohttpd\/libmicrohttpd-0.9.71.tar.gz<br \/>\ntar zxf libmicrohttpd-0.9.71.tar.gz<br \/>\ncd libmicrohttpd-0.9.71\/<br \/>\n.\/configure<br \/>\nmake<br \/>\nsudo make install <\/p>\n<h4>2.2.4\u5b89\u88c5nginx<\/h4>\n<p>wget http:\/\/nginx.org\/download\/nginx-1.15.8.tar.gz<br \/>\ntar xvzf nginx-1.15.8.tar.gz<br \/>\ncd nginx-1.15.8\/<\/p>\n<p># \u914d\u7f6e&#xff0c;\u4e00\u5b9a\u8981\u652f\u6301https<br \/>\n.\/configure &#8211;with-http_ssl_module <\/p>\n<p>make<br \/>\nsudo make install  <\/p>\n<h3>2.3 \u7f16\u8bd1 Janus<\/h3>\n<p>git clone https:\/\/github.com\/meetecho\/janus-gateway.git<br \/>\ngit tag \u67e5\u770b\u5f53\u524d\u7684 tag&#xff0c;\u9009\u62e9\u6700\u65b0\u7a33\u5b9a\u7684\u7248\u672cv0.10.4<br \/>\ngit  checkout v0.10.4<br \/>\nsh autogen.sh<br \/>\n.\/configure &#8211;prefix&#061;\/opt\/janus &#8211;enable-websockets &#8211;enable-post-processing<br \/>\nmake<br \/>\nsudo make install<\/p>\n<h2>3 \u914d\u7f6e\u6587\u4ef6\u548c\u8fd0\u884cjanus<\/h2>\n<h3>3.1 \u57fa\u7840\u73af\u5883\u914d\u7f6e<\/h3>\n<h4>3.1.1 \u57fa\u4e8ehttps\u751f\u6210ssl\u8bc1\u4e66<\/h4>\n<p>mkdir -p ~\/cert<br \/>\ncd ~\/cert<br \/>\n# CA\u79c1\u94a5<br \/>\nopenssl genrsa -out key.pem 2048<br \/>\n# \u81ea\u7b7e\u540d\u8bc1\u4e66<br \/>\nopenssl req -new -x509 -key key.pem -out cert.pem -days 1095 <\/p>\n<h4>3.1.2\u8bbe\u7f6e\u5168\u5c40\u57df\u540dIP\u5bf9\u5e94\u5173\u7cfb<\/h4>\n<p>\u540e\u9762\u9700\u8981\u586b\u5199\u4e00\u5927\u5806ip&#xff0c;\u4e3a\u4e86\u65b9\u4fbf\u4fee\u6539ip\u6211\u4eec\u5728 Ubuntu \u4e2d\u5c06 IP \u4f5c\u4e3a\u5168\u5c40\u57df\u540d\u7684\u5e38\u89c1\u8bbe\u7f6e\u3002<\/p>\n<p>vim\u00a0\/etc\/hosts<\/p>\n<p>#\u65b0\u589e\u57df\u540d \u683c\u5f0f\u4f60\u7684\u4e91\u670d\u52a1\u5668ip&#043;\u672c\u5730\u73af\u5883\u7684\u57df\u540d\u3002\u540e\u7eed\u586b\u5199\u57df\u540d\u5373\u53ef<br \/>\n#\u672c\u5730\u5c31\u7528127.0.0.1<br \/>\n117.111.111.111 janusserver.com <\/p>\n<h4>3.1.3\u4fee\u6539nginx\u914d\u7f6e\u6587\u4ef6<\/h4>\n<p>janus\u670d\u52a1\u5668\u7a0b\u5e8f\u6587\u4ef6\u5939\u5728\/opt\/janus\/<\/p>\n<p>\u57fa\u4e8enginx\u914d\u7f6e\u6587\u4ef6\u91cd\u5b9a\u5411\u81f3 \/opt\/janus\/share\/janus\/demos<\/p>\n<p># HTTPS server<br \/>\n    server {<br \/>\n        listen       443 ssl;<br \/>\n        server_name  localhost;<br \/>\n# \u914d\u7f6e\u76f8\u5e94\u7684key<br \/>\n        ssl_certificate      \/home\/ubuntu\/cert\/cert.pem;<br \/>\n        ssl_certificate_key  \/home\/ubuntu\/cert\/key.pem;<\/p>\n<p>        ssl_session_cache    shared:SSL:1m;<br \/>\n        ssl_session_timeout  5m;<\/p>\n<p>        ssl_ciphers  HIGH:!aNULL:!MD5;<br \/>\n        ssl_prefer_server_ciphers  on;<\/p>\n<p>        location \/ {<br \/>\n           # \u6307\u5411janus demo\u6240\u5728\u76ee\u5f55<br \/>\n            root   \/opt\/janus\/share\/janus\/demos;<br \/>\n            index  index.html index.htm;<br \/>\n        }<br \/>\n    }<\/p>\n<p>\u542f\u52a8nginx<\/p>\n<p>sudo \/usr\/local\/nginx\/sbin\/nginx <\/p>\n<p>\u7136\u540e\u901a\u8fc7\u8bbf\u95ee\u00a0https:\/\/127.0.0.1\/\u00a0\u3002\u53ef\u4ee5\u770b\u5230\u754c\u9762&#xff0c;\u4f46\u6b64\u65f6\u8fd8\u4e0d\u80fd\u6b63\u5e38\u901a\u8bdd\u3002<\/p>\n<h4>3.1.4\u00a0\u5b89\u88c5\u548c\u542f\u52a8coturn<\/h4>\n<p>\u6253\u6d1e\u670d\u52a1\u5668&#xff0c;\u672c\u5730\u6d4b\u8bd5\u53ef\u5ffd\u7565\u3002<\/p>\n<p>sudo apt-get install libssl-dev<br \/>\nsudo apt-get install libevent-dev<\/p>\n<p>#git clone https:\/\/github.com\/coturn\/coturn<br \/>\n#cd coturn<br \/>\n# \u63d0\u4f9b\u53e6\u4e00\u79cd\u5b89\u88c5\u65b9\u5f0fturnserver\u662fcoturn\u7684\u5347\u7ea7\u7248\u672c<br \/>\nwget http:\/\/coturn.net\/turnserver\/v4.5.0.7\/turnserver-4.5.0.7.tar.gz<br \/>\ntar xfz turnserver-4.5.0.7.tar.gz<br \/>\ncd turnserver-4.5.0.7<\/p>\n<p>.\/configure<br \/>\nmake &amp;&amp; sudo make install<\/p>\n<p>sudo nohup turnserver -L 0.0.0.0 &#8211;min-port 50000 &#8211;max-port 60000  -a -u \u7528\u6237\u540d:\u5bc6\u7801-v -f -r nort.gov &amp; <\/p>\n<h3>3.2 janus \u914d\u7f6e\u6587\u4ef6\u4e4bVideo room\u529f\u80fd<\/h3>\n<p>janus\u914d\u7f6e<\/p>\n<p>janus\u5b89\u88c5\u76ee\u5f55\u5728\/opt\/janus\u3002\u6587\u4ef6\u7ed3\u6784&#xff1a;<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p id=\"u006367b8\">.\/bin<\/p>\n<\/td>\n<td>\n<p id=\"u2b728e93\">.\/etc<\/p>\n<\/td>\n<td>\n<p id=\"u40d48591\">.\/include<\/p>\n<\/td>\n<td>\n<p id=\"u54c0fc53\">.\/lib<\/p>\n<\/td>\n<td>\n<p id=\"u37500956\">.\/share<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p id=\"u44fb77ba\">\u53ef\u6267\u884c\u6587\u4ef6<\/p>\n<\/td>\n<td>\n<p id=\"u9448f680\">janus\u914d\u7f6e\u6587\u4ef6<\/p>\n<\/td>\n<td>\n<p id=\"u0ad398d8\">janus\u5934\u6587\u4ef6<\/p>\n<\/td>\n<td>\n<p id=\"u84e0ac52\">janus\u5e93<\/p>\n<\/td>\n<td>\n<p id=\"uadd7de2d\">\u5b58\u653e\u811a\u672c\u6216\u8005\u6587\u6863&#xff0c;web demo\u4e5f\u5728\u8fd9\u91cc<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u9700\u8981\u914d\u7f6e\u7684\u6587\u4ef6\u4e3a(\u76ee\u5f55\/opt\/janus\/etc\/janus)\u5148\u5907\u4efd\u3002\u5148\u628a.sample\u540e\u7f00\u7684\u6587\u4ef6\u62f7\u8d1d\u6210jcfg\u540e\u7f00<\/p>\n<p># \u8fdb\u5230\u5bf9\u5e94\u7684\u76ee\u5f55<br \/>\ncd \/opt\/janus\/etc\/janus<br \/>\n# \u62f7\u8d1d\u6587\u4ef6<br \/>\n cp janus.jcfg.sample janus.jcfg<br \/>\n cp janus.transport.http.jcfg.sample janus.transport.http.jcfg<br \/>\n cp janus.transport.websockets.jcfg.sample janus.transport.websockets.jcfg<br \/>\n cp janus.plugin.videoroom.jcfg.sample janus.plugin.videoroom.jcfg<br \/>\n cp janus.transport.pfunix.jcfg.sample janus.transport.pfunix.jcfg<br \/>\n cp janus.plugin.streaming.jcfg.sample janus.plugin.streaming.jcfg<br \/>\n cp janus.plugin.recordplay.jcfg.sample janus.plugin.recordplay.jcfg<br \/>\n cp janus.plugin.voicemail.jcfg.sample janus.plugin.voicemail.jcfg<br \/>\n cp janus.plugin.sip.jcfg.sample janus.plugin.sip.jcfg<br \/>\n cp janus.plugin.nosip.jcfg.sample janus.plugin.nosip.jcfg<br \/>\n cp janus.plugin.textroom.jcfg.sample  janus.plugin.textroom.jcfg<br \/>\n cp janus.plugin.echotest.jcfg.sample janus.plugin.echotest.jcfg <\/p>\n<h4>3.2.1 \u914d\u7f6ejanus.jcfg<\/h4>\n<p>#\u5927\u7ea6202\u884c\u5de6\u53f3&#xff0c;\u8bbe\u7f6eudp\u7aef\u53e3\u8303\u56f4\u3002<br \/>\nrtp_port_range &#061; &#034;50000-60000&#034;<br \/>\n# 237\u884c<br \/>\nstun_server &#061; janusserver.com<br \/>\n        stun_port &#061; 3478<br \/>\n        nice_debug &#061; false<br \/>\n# \u5927\u6982267\u884c \u586b\u5199\u4e91\u670d\u52a1\u5668\u5916\u7f51ip\u5730\u5740<br \/>\nnat_1_1_mapping &#061; janusserver.com<\/p>\n<p>#\u6253\u6d1e\u670d\u52a1\u5668\u914d\u7f6e\u5927\u6982274\u884c<br \/>\n# credentials to authenticate&#8230;<br \/>\n        turn_server &#061; janusserver.com<br \/>\n        turn_port &#061; 3478<br \/>\n        turn_type &#061; &#034;udp&#034;<br \/>\n        turn_user &#061; \u7528\u6237\u540d<br \/>\n        turn_pwd &#061; \u5bc6\u7801<br \/>\nrtp_port_range &#061; &#034;50000-60000&#034; <\/p>\n<h4>3.2.2 \u914d\u7f6ejanus.transport.http.jcfg<\/h4>\n<p>general: {<br \/>\n        json &#061; &#034;indented&#034;<br \/>\n        base_path &#061; &#034;\/janus&#034;<br \/>\n        threads &#061; &#034;unlimited&#034;<br \/>\n        http &#061; true<br \/>\n        port &#061; 8088<br \/>\n        https &#061; true<br \/>\n        secure_port &#061; 8089<br \/>\n}<\/p>\n<p>certificates: {<br \/>\n        cert_pem &#061; &#034;\/root\/cert\/cert.pem&#034;<br \/>\n        cert_key &#061; &#034;\/root\/cert\/key.pem&#034;<br \/>\n        #cert_pwd &#061; &#034;secretpassphrase&#034;<br \/>\n        #ciphers &#061; &#034;PFS:-VERS-TLS1.0:-VERS-TLS1.1:-3DES-CBC:-ARCFOUR-128&#034;<br \/>\n}<\/p>\n<h4>3.2.3 \u914d\u7f6ejanus.transport.websockets.jcfg\u00a0<\/h4>\n<p>general: {<br \/>\n        json &#061; &#034;indented&#034;<br \/>\n        ws &#061; true<br \/>\n        ws_port &#061; 8188<br \/>\n        wss &#061; true<br \/>\n        wss_port &#061; 8989<br \/>\n}<br \/>\ncertificates: {<br \/>\ncert_pem &#061; &#034;\/root\/cert\/cert.pem&#034;<br \/>\ncert_key &#061; &#034;\/root\/cert\/key.pem&#034;<br \/>\n#cert_pwd &#061; &#034;secretpassphrase&#034;<br \/>\n#ciphers &#061; &#034;ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256&#034;<br \/>\n} <\/p>\n<h3 id=\"MKJ79\">3.3 \u4fee\u6539.js\u6587\u4ef6&#xff0c;\u6307\u5b9awss\u534f\u8bae<\/h3>\n<p>\/opt\/janus\/share\/janus\/demos\/videoroomtest.js<\/p>\n<p>var server &#061; &#034;wss:\/\/&#034; &#043; window.location.hostname &#043; &#034;:8989&#034;; <\/p>\n<h3>3.4 \u914d\u7f6ecoturn\u5730\u5740<\/h3>\n<p><span style=\"color:#fe2c24\">\u672c\u5730\u6d4b\u8bd5\u65e0\u9700\u6253\u6d1e&#xff0c;\u90e8\u7f72\u4e91\u670d\u52a1\u4e14\u4f7f\u7528\u6253\u6d1e\u624d\u9700\u8981\u8fd9\u4e00\u6b65\u3002<\/span><\/p>\n<p>\/opt\/janus\/share\/janus\/demos\/videoroomtest.js<\/p>\n<p>\u8fd9\u91cc\u8981\u5199\u4f60\u7684\u670d\u52a1\u5668ip&#xff0c;\u4f7f\u7528\u672c\u5730\u57df\u540d\u65b9\u5f0f\u89e3\u6790\u4e0d\u51fa\u6765<\/p>\n<p>#83\u884c\u6dfb\u52a0<br \/>\nserver: server,<br \/>\niceServers :[{<br \/>\nurls: [<br \/>\n&#034;turn:127.0.0.1&#xff08;\u8fd9\u91cc\u8981\u5199\u4f60\u7684\u670d\u52a1\u5668ip&#xff0c;\u4f7f\u7528\u57df\u540d\u89e3\u6790\u4e0d\u51fa\u6765&#xff09;:3478?transport&#061;udp&#034;,<br \/>\n&#034;turn:127.0.0.1&#xff08;\u540c\u7406&#xff09;:3478?transport&#061;tcp&#034;<br \/>\n],<br \/>\nusername: &#034;jbj&#034;,<br \/>\ncredential: &#034;123456&#034;<br \/>\n},<br \/>\n{<br \/>\nurls: [<br \/>\n&#034;stun:127.0.0.1:3478&#034;<br \/>\n]<br \/>\n}],<br \/>\nsuccess: function()  <\/p>\n<h3>3.5\u00a0\u8fd0\u884c<\/h3>\n<p>\u6d89\u53ca\u670d\u52a1\u542f\u52a8\u6709\u70b9\u591a&#xff0c;\u5728\u8fd9\u91cc\u8fdb\u884c\u603b\u7ed3\u3002<\/p>\n<p>#nginx\u542f\u52a8<br \/>\nsudo \/usr\/local\/nginx\/sbin\/nginx<br \/>\n#\u542f\u52a8coturn<br \/>\nsudo nohup turnserver -L 0.0.0.0 &#8211;min-port 50000 &#8211;max-port 60000  -a -u \u7528\u6237\u540d:123456 -v -f -r nort.gov &amp;<br \/>\n#jauns\u8fd0\u884c<br \/>\n\/opt\/janus\/bin\/janus &#8211;debug-level&#061;5 &#8211;log-file&#061;$HOME\/janus-log <\/p>\n<p>\u8bbf\u95ee<\/p>\n<p>https:\/\/IP\/<br \/>\n\u6216\u8005<br \/>\nhttps:\/\/IP\/videoroomtest.html <\/p>\n<h2>4.\u6548\u679c\u00a0<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1169\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250506085059-6819cd73c7417.png\" width=\"2560\" \/><\/p>\n<\/p>\n<p>\u5b66\u4e60\u8d44\u6599\u5206\u4eab<\/p>\n<p>0voice \u00b7 GitHub<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb913\u6b21\uff0c\u70b9\u8d5e28\u6b21\uff0c\u6536\u85cf22\u6b21\u3002Janus \u662f\u7531 Meetecho \u5f00\u53d1\u7684\u901a\u7528 WebRTC \u670d\u52a1\u5668\uff0c\u5b83\u4e3a\u6784\u5efa WebRTC \u5e94\u7528\u7a0b\u5e8f\u63d0\u4f9b\u4e86\u4e00\u4e2a\u6a21\u5757\u5316\u6846\u67b6\u3002\u670d\u52a1\u5668\u76ee\u6807\uff1a\u5b9e\u9645\u529f\u80fd\u662f\u5728\u6d4f\u89c8\u5668\u901a\u8fc7 Janus \u6838\u5fc3\u8fde\u63a5\u7684\u670d\u52a1\u5668\u7aef\u63d2\u4ef6\u4e2d\u5b9e\u73b0\u7684\u3002\u8fd9\u79cd\u6a21\u5757\u5316\u67b6\u6784\u5141\u8bb8\u5360\u7528\u7a7a\u95f4\u5c0f\uff0c\u540c\u65f6\u63d0\u4f9b\u6700\u5927\u7684\u7075\u6d3b\u6027\u3002\u4e3b\u8981\u7279\u70b9\u3002<\/p>\n","protected":false},"author":2,"featured_media":35713,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[537,1180],"topic":[],"class_list":["post-35715","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-webrtc","tag-1180"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>WebRTC \u670d\u52a1\u5668\u4e4bJanus\u6982\u8ff0\u548c\u73af\u5883\u642d\u5efa - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/35715.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WebRTC \u670d\u52a1\u5668\u4e4bJanus\u6982\u8ff0\u548c\u73af\u5883\u642d\u5efa - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb913\u6b21\uff0c\u70b9\u8d5e28\u6b21\uff0c\u6536\u85cf22\u6b21\u3002Janus \u662f\u7531 Meetecho \u5f00\u53d1\u7684\u901a\u7528 WebRTC \u670d\u52a1\u5668\uff0c\u5b83\u4e3a\u6784\u5efa WebRTC \u5e94\u7528\u7a0b\u5e8f\u63d0\u4f9b\u4e86\u4e00\u4e2a\u6a21\u5757\u5316\u6846\u67b6\u3002\u670d\u52a1\u5668\u76ee\u6807\uff1a\u5b9e\u9645\u529f\u80fd\u662f\u5728\u6d4f\u89c8\u5668\u901a\u8fc7 Janus \u6838\u5fc3\u8fde\u63a5\u7684\u670d\u52a1\u5668\u7aef\u63d2\u4ef6\u4e2d\u5b9e\u73b0\u7684\u3002\u8fd9\u79cd\u6a21\u5757\u5316\u67b6\u6784\u5141\u8bb8\u5360\u7528\u7a7a\u95f4\u5c0f\uff0c\u540c\u65f6\u63d0\u4f9b\u6700\u5927\u7684\u7075\u6d3b\u6027\u3002\u4e3b\u8981\u7279\u70b9\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/35715.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-06T08:51:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250506085059-6819cd73313c3.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/35715.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/35715.html\",\"name\":\"WebRTC \u670d\u52a1\u5668\u4e4bJanus\u6982\u8ff0\u548c\u73af\u5883\u642d\u5efa - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-05-06T08:51:01+00:00\",\"dateModified\":\"2025-05-06T08:51:01+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/35715.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/35715.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/35715.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WebRTC \u670d\u52a1\u5668\u4e4bJanus\u6982\u8ff0\u548c\u73af\u5883\u642d\u5efa\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WebRTC \u670d\u52a1\u5668\u4e4bJanus\u6982\u8ff0\u548c\u73af\u5883\u642d\u5efa - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/35715.html","og_locale":"zh_CN","og_type":"article","og_title":"WebRTC \u670d\u52a1\u5668\u4e4bJanus\u6982\u8ff0\u548c\u73af\u5883\u642d\u5efa - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb913\u6b21\uff0c\u70b9\u8d5e28\u6b21\uff0c\u6536\u85cf22\u6b21\u3002Janus \u662f\u7531 Meetecho \u5f00\u53d1\u7684\u901a\u7528 WebRTC \u670d\u52a1\u5668\uff0c\u5b83\u4e3a\u6784\u5efa WebRTC \u5e94\u7528\u7a0b\u5e8f\u63d0\u4f9b\u4e86\u4e00\u4e2a\u6a21\u5757\u5316\u6846\u67b6\u3002\u670d\u52a1\u5668\u76ee\u6807\uff1a\u5b9e\u9645\u529f\u80fd\u662f\u5728\u6d4f\u89c8\u5668\u901a\u8fc7 Janus \u6838\u5fc3\u8fde\u63a5\u7684\u670d\u52a1\u5668\u7aef\u63d2\u4ef6\u4e2d\u5b9e\u73b0\u7684\u3002\u8fd9\u79cd\u6a21\u5757\u5316\u67b6\u6784\u5141\u8bb8\u5360\u7528\u7a7a\u95f4\u5c0f\uff0c\u540c\u65f6\u63d0\u4f9b\u6700\u5927\u7684\u7075\u6d3b\u6027\u3002\u4e3b\u8981\u7279\u70b9\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/35715.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-05-06T08:51:01+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250506085059-6819cd73313c3.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/35715.html","url":"https:\/\/www.wsisp.com\/helps\/35715.html","name":"WebRTC \u670d\u52a1\u5668\u4e4bJanus\u6982\u8ff0\u548c\u73af\u5883\u642d\u5efa - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-05-06T08:51:01+00:00","dateModified":"2025-05-06T08:51:01+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/35715.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/35715.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/35715.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"WebRTC \u670d\u52a1\u5668\u4e4bJanus\u6982\u8ff0\u548c\u73af\u5883\u642d\u5efa"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/35715","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=35715"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/35715\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/35713"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=35715"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=35715"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=35715"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=35715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}