muaz-khan / getStats

getStats is a tiny JavaScript library using WebRTC getStats API to return peer connection stats i.e. bandwidth usage, packets lost, local/remote ip addresses and ports, type of connection etc.
https://www.webrtc-experiment.com/getStats/
MIT License
257 stars 84 forks source link

In Firefox: getStatsResult.video[sendrecvType] is undefined #26

Open VShtaba opened 5 years ago

VShtaba commented 5 years ago

getStats v1.2.0 When i use in FireFox 69.0 (64-bit) this example https://rtcmulticonnection.herokuapp.com/demos/getStats.html

I get an error in the console:

getStatsResult.video[sendrecvType] is undefined getStats/getStatsParser.checkVideoTracks@https://rtcmulticonnection.herokuapp.com/node_modules/getstats/getStats.js:453:13 getStatsLooper/</</<@https://rtcmulticonnection.herokuapp.com/node_modules/getstats/getStats.js:260:48 getStatsLooper/</<@https://rtcmulticonnection.herokuapp.com/node_modules/getstats/getStats.js:257:45 getStatsLooper/<@https://rtcmulticonnection.herokuapp.com/node_modules/getstats/getStats.js:255:21 getStatsWrapper/<@https://rtcmulticonnection.herokuapp.com/node_modules/getstats/getStats.js:312:17 TypeError: "getStatsResult.video[sendrecvType] is undefined" checkVideoTracks https://rtcmulticonnection.herokuapp.com/node_modules/getstats/getStats.js:453 getStatsLooper https://rtcmulticonnection.herokuapp.com/node_modules/getstats/getStats.js:260 getStatsLooper https://rtcmulticonnection.herokuapp.com/node_modules/getstats/getStats.js:257 getStatsLooper https://rtcmulticonnection.herokuapp.com/node_modules/getstats/getStats.js:255 getStatsWrapper https://rtcmulticonnection.herokuapp.com/node_modules/getstats/getStats.js:312 getStats.js:262:37

an-rahulpandey commented 4 years ago

We are also getting the same error and when we debug it we found that if the webcam or mic is disable in firefox in that case we face above issue. In getStats.js file line number 368 variable sendrecvType value should be recv or send but as there is no webcam or mic available sendrecvType value not set and that is why the script breaks.

ivgotcrazy commented 4 years ago

the same error

kdvsolis commented 4 years ago

I am also getting the same error here

Gochip commented 3 years ago

The same error