kurento - 如何在公共服务器上运行 kurento/openvidu docker
问题描述
我在我的 VPS 上运行 PUBLIC_IP kurento vs openvidu 服务器。
docker run -d -p 3333:3333 -e openvidu.secret=YOUR_SECRET -e openvidu.publicurl=https://PUBLIC_IP:3333 -e openvidu.cdr=true -e server.port=3333 -e KMS_STUN_IP=stun.l.google.com -e KMS_STUN_PORT=19302 -e KMS_TURN_URL=myuser:mypass@54.54.54.54:3478 openvidu/openvidu-server-kms:2.7.0
看起来一切正常,但远程视频在双方都是不可见的......
nodejs 应用程序的命令是:
node server.js PUBLIC_IP:3333 YOUR_SECRET
来自浏览器应用程序的控制台日志:
Remote ICE candidate received {candidate: "candidate:1 2 UDP 2013266430 172.17.0.2 6004 typ host", component: undefined, foundation: undefined, ip: undefined, port: undefined, …}
jsonrpcclient.js:146 Received request: {"method":"iceCandidate","params":{"endpointName":"puld42tsstkztcho","sdpMLineIndex":0,"sdpMid":"0","candidate":"candidate:2 2 TCP 1015021822 172.17.0.2 9 typ host tcptype active"}}
WebRtcPeer.ts:298 Remote ICE candidate received {candidate: "candidate:2 2 TCP 1015021822 172.17.0.2 9 typ host tcptype active", component: undefined, foundation: undefined, ip: undefined, port: undefined, …}
jsonrpcclient.js:146 Received request: {"method":"iceCandidate","params":{"endpointName":"puld42tsstkztcho","sdpMLineIndex":1,"sdpMid":"1","candidate":"candidate:2 2 TCP 1015021822 172.17.0.2 9 typ host tcptype active"}}
WebRtcPeer.ts:298 Remote ICE candidate received {candidate: "candidate:2 2 TCP 1015021822 172.17.0.2 9 typ host tcptype active", component: undefined, foundation: undefined, ip: undefined, port: undefined, …}
WebRtcStats.ts:86 WebRtc stats not enabled
2jsonrpcclient.js:183 Response: {"sessionId":"k0s2bv7dut5enqhsbn00o4hn6s"}
jsonrpcclient.js:146 Received request: {"method":"iceCandidate","params":{"endpointName":"puld42tsstkztcho","sdpMLineIndex":1,"sdpMid":"1","candidate":"candidate:3 2 TCP 1010827518 172.17.0.2 4295 typ host tcptype passive"}}
WebRtcPeer.ts:298 Remote ICE candidate received {candidate: "candidate:3 2 TCP 1010827518 172.17.0.2 4295 typ host tcptype passive", component: undefined, foundation: undefined, ip: undefined, port: undefined, …}
jsonrpcclient.js:146 Received request: {"method":"iceCandidate","params":{"endpointName":"puld42tsstkztcho","sdpMLineIndex":0,"sdpMid":"0","candidate":"candidate:3 2 TCP 1010827518 172.17.0.2 4295 typ host tcptype passive"}}
WebRtcPeer.ts:298 Remote ICE candidate received {candidate: "candidate:3 2 TCP 1010827518 172.17.0.2 4295 typ host tcptype passive", component: undefined, foundation: undefined, ip: undefined, port: undefined, …}
2jsonrpcclient.js:183 Response: {"sessionId":"k0s2bv7dut5enqhsbn00o4hn6s"}
StreamManager.ts:126 Your local 'Stream' with id [puld42tsstkztcho_CAMERA_XMVGR] video is now playing
解决方案
您需要在具有可用公共 IP 地址的主机中运行 OpenVidu。这可以通过 NAT 配置等直接完成。
从官方文档:
99% 的时间这是与 OPENVIDU SERVER 没有公共 IP 相关的问题。要了解更多信息,您可以查看此常见问题解答。解决这个问题的最快方法是在亚马逊部署我们现成的 OpenVidu 服务器。
推荐阅读
- testflight - 通过 Testflight 安装应用程序时显示警报
- json - 如何在循环中调用 Firebase 观察?
- javascript - 当属性是可选的时,如何在 Typescript 中描述对象?
- reactjs - 显示加载微调器
- php - 统计数据库中特定数据的数量,如果有空白或空值,则显示 0。PHP
- azure-devops - 通知 - 过滤掉服务帐户
- javascript - 如何对值类仅元素显示可见的jQuery求和
- python - 什么是在 Python 中迭代 numpy 数组的更快方法
- python - Django:获取下拉值并为基于类的视图选择动态表单字段
- javascript - 结果没有进入 vueJS 中的分页页面