youtube / js_mse_eme

js_mse_eme is an externally-published tool that is aimed to test the validity of a browser's HTML5 Media Source Extension and Encrypted Media Extension implementations
Apache License 2.0
91 stars 58 forks source link

This test does not take into account devices with long pre-roll. #35

Closed m-zdun closed 6 years ago

m-zdun commented 6 years ago

https://github.com/youtube/js_mse_eme/blob/7e0b921d3f6c4c311679d31cce13f2e3dd69abb2/js/tests/2019/conformanceTest.js#L535

This line, on devices using Chromium with long video pre-roll, will result in couple of timeupdate events synthesized before any current time update actually comes from underlying native player. This results in baseTimeDiff with little connection to actual time update reporting. And since the test looks for worst delta against wall-clock, all actual changes in PTS may appear to have it rather big, no matter how stable reporting actually is.

One way to account for pre-roll might be to ignore for the synthesized events with

if (video.currentTime === 0.0)
  return;

baseTimeDiff = util.ElapsedTimeInS() - video.currentTime;

and getting the baseline at the first non-zero time reported by the player.

jiaqzhao commented 6 years ago

This might be a chrome bug, created this if you want to follow along.