如何解决WebRTC PeerConnection.getStats错误?

如何解决WebRTC PeerConnection.getStats错误?,webrtc,opentok,tokbox,Webrtc,Opentok,Tokbox,因此,我们有一个支持WebRTC的应用程序,它实际上是在建立会话,我们能够连接到它们,人们发布流,其他人订阅和取消订阅这些流,等等。但是我们不断从WebRTC收到错误,说“PeerConnection.getStats”。已经得到统计数据了错误发生在视频流本身。黑色背景上的白色文本,而不是视频 此外,在控制台日志中,我们还收到以下错误: Uncaught TypeError: Cannot call method 'getStats' of undefined TB.min.js:208 Pee

因此,我们有一个支持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?????提前感谢您的建议

我以前没有见过这种情况,但如果我猜这可能是因为您在订阅同一流之前订阅了多次

我以前没有见过这种情况,但如果我猜这可能是因为您在订阅同一流之前订阅了多次