Open mithro opened 12 years ago
http://wiki.whatwg.org/wiki/Video_Metrics https://www.w3.org/Bugs/Public/show_bug.cgi?id=12399 https://www.w3.org/Bugs/Public/show_bug.cgi?id=14310
From Jeroen Wijering (JW Player developer) back in May 2011
Grabbing the stats from the video element and periodically pinging it back to the player can indeed be done with vanilla JS. JW Player would make it easier though, since the event gathering and normalization is done for you. A logical step would be to write a small JS plugin for the player that does the actual callback. We have such plugins for e.g. Google Analytics.
Some information about jwplayer
'''JW Player''' (using actionscript) broadcasts the following QOS ''metrics'' for both RTMP dynamic and HTTP adaptive:
Bandwidth and droprate are running metrics (averaged out). Latency and dimensions are sampled (taken once). For RTMP dynamic, the metrics are broadcast at a settable interval (default 2s). For HTTP adaptive, metrics are calculated and broadcast upon completion of a fragment load.
Separately, JW Player broadcasts a ''SWITCH'' event at the painting of a frame that has a different qualityLevel than the preceding frame(s). While the ''metrics.qualityLevel'' tells developers the qualityLevel of the currently downloading buffer/fragment, the ''SWITCH'' event tells developers the exact point in time where the viewer experiences a jump in video quality. This event also helps developers correlate the value of ''frameDropRate'' to the currently playing qualityLevel (as opposed to the currently loading one). Depending upon buffer, fragment and GOP size, the time delta between a change in ''metrics.qualityLevel'' and ''SWITCH.qualityLevel'' may vary from a few seconds to a few minutes.
Finally, JW Player accepts and exposes per video an array with quality levels (the distinct streams of a video between which the player can switch). For each quality level, properties like ''bitrate'', ''framerate'', ''height'' and ''width'' are available. The plain mapping using ''qualityLevel'' works b/c JW Player to date solely supports single A/V muxed dynamic/adaptive videos - no multi track.
Also look at #44 (Should these two bugs be merged?)
The system has a nice stat tracking feature. Make the frontend record everything possible about the client experiences.