WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
210965
[EME] clearkey-mp4-playback-temporary-multikey-sequential-readyState.https.html is inherently flakey
https://bugs.webkit.org/show_bug.cgi?id=210965
Summary
[EME] clearkey-mp4-playback-temporary-multikey-sequential-readyState.https.ht...
Charlie Turner
Reported
2020-04-24 04:53:10 PDT
The failure reason is, FAIL org.w3.clearkey, successful playback, temporary, mp4, multiple keys, sequential, readyState assert_equals: Should have only received exactly one timeupdate while waiting for key expected 1 but got 0 This is testing key changes happening sequentially in the file. After about 5 seconds samples will need a new key. The test sets up the video and adds some event listeners. It calls startNewSession (generateRequest) immediately, providing a license before the media starts playing, hence waitingforkey will only happen when transitioning between keys. The test registers an ontimeupdate handler that tries to count the number of times this event is fired during the time we are waiting for a key. There are two main issues with this idea in our implementation, 1/ timeupdate event frequency is highly variable, it typically would range between 4 and 66 Hz. In my environment I'm getting a 4Hz tick. Our waitiing for key dance takes just a few milliseconds and so no timeupdates are counted, explaining the failure reason. 2/ The test relies on the ordering waitingforkey -> timeupdate -> message. This isn't what happens in WebKit and we don't violate any spec. When calling the HTMLMediaElement::mediaPlayerWaitingForKeyChanged() from our player, the media element checks if the current playback position is available, and based on that will update the readyState and hence fire the timeupdate as per the "If the previous ready state was HAVE_FUTURE_DATA or more, and the new ready state is HAVE_CURRENT_DATA or less" rule in the readyState algorithms. *Then* the media element will fire the waiting for key message. Due to the mismatched event frequencies I mentioned above, you may or may not get a subsequent timeupdate after this waiting for key event and the next message event. That is made even more variable by the optimization in WebKit's scheduleTimeupdateEvent method, that will avoid sending timeupdate if the movie time has not gone forward since we last fired a timeupdate, this is a (compliant) difference against other browsers. For these reasons, I consider this test inherently flakey and will skip it.
Attachments
Add attachment
proposed patch, testcase, etc.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug