【问题标题】:How do I resolve a WebRTC PeerConnection.getStats error?如何解决 WebRTC PeerConnection.getStats 错误?
【发布时间】:2013-09-09 16:01:00
【问题描述】:

所以,我们有一个启用了 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????提前感谢您的任何建议!

【问题讨论】:

    标签: webrtc opentok tokbox


    【解决方案1】:

    我以前从未见过这种情况,但如果我猜测这可能是因为您在订阅完成之前多次订阅同一个流。

    【讨论】:

      猜你喜欢
      • 2013-12-05
      • 2021-02-15
      • 1970-01-01
      • 2021-12-29
      • 2018-06-30
      • 2012-02-18
      • 2011-08-30
      • 2014-06-13
      • 2011-07-06
      相关资源
      最近更新 更多