Uncaught SyntaxError: Failed to construct ‘RTCPeerConnection‘:

目录

解决方法:


报错:

Uncaught SyntaxError: Failed to construct 'RTCPeerConnection': ICE server parsing failed: Invalid hostname format at PeerConnectionController.createPeerConnection (PeerConnectionController.js:40:1) at new PeerConnectionController (PeerConnectionController.js:30:1) at WebRtcPlayerController.startSession (WebRtcPlayerController.js:625:1) at WebRtcPlayerController.handleOnConfigMessage (WebRtcPlayerController.js:695:1) at PixelStreamingEventListener._callback (WebRtcPlayerController.js:75:50) at PixelStreamingEventListener.handleEvent (EventEmitter.js:12:1) at SignallingProtocol.emit (EventEmitter.js:235:1) at WebSocketTransport.onMessage (SignallingProtocol.js:49:1) at WebSocketTransport.handleOnMessage (WebSocketTransport.js:99:1) at WebSocket.<anonymous> (WebSocketTransport.js:38:1) createPeerConnection @ PeerConnectionController.js:40 PeerConnectionController @ PeerConnectionController.js:30 startSession @ WebRtcPlayerController.js:625 handleOnConfigMessage @ WebRtcPlayerController.js:695 (匿名) @ WebRtcPlayerController.js:75 handleEvent @ EventEmitter.js:12 emit @ EventEmitter.js:235 (匿名) @ SignallingProtocol.js:49 handleOnMessage @ WebSocketTransport.js:99 (匿名) @ WebSocketTransport.js:38 WebRtcPlayerController.js:158 Uncaught TypeError: Cannot read properties of undefined (reading 'peerConnection') at SettingOption.onChange (WebRtcPlayerController.js:158:1) at set value (SettingBase.js:45:1) at set selected (SettingOption.js:62:1) at Config.setOptionSettingValue (Config.js:429:1) at WebRtcPlayerController.handleStreamerListMessage (WebRtcPlayerController.js:745:1) at PixelStreamingEventListener._callback (WebRtcPlayerController.js:77:56) at PixelStreamingEventListener.handleEvent (EventEmitter.js:12:1) at SignallingProtocol.emit (EventEmitter.js:235:1) at WebSocketTransport.onMessage (SignallingProtocol.js:49:1) at WebSocketTransport.handleOnMessage (WebSocketTransport.js:99:1)

解决方法:

SignallingWebServer/platform_scripts/cmd/common.bat

bash 复制代码
:SetupTurnStun
IF "%TURN_SERVER%"=="" (
    set TURN_SERVER=%PUBLIC_IP%:19303
    set TURN_USER=PixelStreamingUser
    set TURN_PASS=AnotherTURNintheroad
)
IF "%STUN_SERVER%"=="" (
    set STUN_SERVER=stun.l.google.com:19302
)

改为:

bash 复制代码
:SetupTurnStun
IF "%TURN_SERVER%"=="" (
    set TURN_SERVER=stun.l.google.com:19302
    set TURN_USER=PixelStreamingUser
    set TURN_PASS=AnotherTURNintheroad
)
IF "%STUN_SERVER%"=="" (
    set STUN_SERVER=stun.l.google.com:19302
)
相关推荐
bearpping7 小时前
Nginx 配置:alias 和 root 的区别
前端·javascript·nginx
@大迁世界8 小时前
07.React 中的 createRoot 方法是什么?它具体如何运作?
前端·javascript·react.js·前端框架·ecmascript
January12078 小时前
VBen Admin Select 选择框选中后仍然显示校验错误提示的解决方案
前端·vben
. . . . .8 小时前
前端测试框架:Vitest
前端
xiaotao1318 小时前
什么是 Tailwind CSS
前端·css·css3
颜酱9 小时前
DFS 岛屿系列题全解析
javascript·后端·算法
战南诚9 小时前
VUE中,keep-alive组件与钩子函数的生命周期
前端·vue.js
发现一只大呆瓜9 小时前
React-彻底搞懂 Redux:从单向数据流到 useReducer 的终极抉择
前端·react.js·面试
霍理迪10 小时前
Vue的响应式和生命周期
前端·javascript·vue.js