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
)
相关推荐
炫饭第一名2 小时前
速通Canvas指北🦮——基础入门篇
前端·javascript·程序员
王晓枫3 小时前
flutter接入三方库运行报错:Error running pod install
前端·flutter
符方昊3 小时前
React 19 对比 React 16 新特性解析
前端·react.js
ssshooter3 小时前
又被 Safari 差异坑了:textContent 拿到的值居然没换行?
前端
曲折3 小时前
Cesium-气象要素PNG色斑图叠加
前端·cesium
Forever7_3 小时前
Electron 淘汰!新的桌面端框架 更强大、更轻量化
前端·vue.js
Angelial3 小时前
Vue3 嵌套路由 KeepAlive:动态缓存与反向配置方案
前端·vue.js
jiayu4 小时前
Angular学习笔记24:Angular 响应式表单 FormArray 与 FormGroup 相互嵌套
前端
jiayu4 小时前
Angular6学习笔记13:HTTP(3)
前端
小码哥_常4 小时前
Kotlin抽象类与接口:相爱相杀的编程“CP”
前端