所以,我们有一个启用了 WebRTC 的应用程序,它实际上在工作,它正在建立会话,我们能够连接到它们,人们正在发布流,其他人正在订阅和取消订阅这些流等等。但是我们不断收到来自 WebRTC 的错误,上面写着“PeerConnection.getStats”。已经得到统计数据了!错误发生在视频流本身。黑色背景上的白色文本,而不是视频。
此外,在控制台日志中,我们收到以下错误:
Uncaught TypeError: Cannot call method 'getStats' of undefined TB.min.js:208
PeerConnection.getStats: Already getting the stats! TB.min.js:54
Subscriber State Change Failed: 'Failed' cannot transition to 'NotSubscribing' TB.min.js:54
Object
TB.min.js:54
Sending WebSocket message: {"type":1016,"payload":{"streamId":"995827218","fromAddress":"d5e52bf2-03fb-4e3d-885f-297d4d243684","toAddresses":"d5c1a7d8-f70c-44f3-a42c-1c40bab803ca"}} TB.min.js:54
TB.exception :: title: Connection Failed (1013) msg: Subscriber PeerConnection Error: PeerConnection.getStats: Already getting the stats! TB.min.js:54
Subscriber State Change Failed: 'Failed' cannot transition to 'NotSubscribing' TB.min.js:54
Object
TB.min.js:54
Sending WebSocket message: {"type":1016,"payload":{"streamId":"995827218","fromAddress":"d5e52bf2-03fb-4e3d-885f-297d4d243684","toAddresses":"d5c1a7d8-f70c-44f3-a42c-1c40bab803ca"}} TB.min.js:54
TB.exception :: title: Connection Failed (1013) msg: Subscriber PeerConnection Error: PeerConnection.getStats: Already getting the stats! TB.min.js:54
Subscriber State Change Failed: 'Failed' cannot transition to 'NotSubscribing' TB.min.js:54
Object
TB.min.js:54
Sending WebSocket message: {"type":1016,"payload":{"streamId":"995827218","fromAddress":"d5e52bf2-03fb-4e3d-885f-297d4d243684","toAddresses":"d5c1a7d8-f70c-44f3-a42c-1c40bab803ca"}} TB.min.js:54
TB.exception :: title: Connection Failed (1013) msg: Subscriber PeerConnection Error: PeerConnection.getStats: Already getting the stats!
关于可能导致这种情况的任何想法?我们如何从轮询统计信息中关闭 PeerConnection???? 在此先感谢您的任何建议!