New issue
Advanced search Search tips

Issue 593289 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocked on:
issue 340547



Sign in to add a comment

Media element resource selection algorithm should "await a stable state" (post a microtask, not a plain task)

Reported by phil...@opera.com, Mar 9 2016

Issue description

https://html.spec.whatwg.org/multipage/embedded-content.html#concept-media-load-algorithm

Step 4 is "await a stable state", which is equivalent to queueing a microtask to continue. This has never been implemented in WebKit/Blink, but was in Presto and at least appears to be in Gecok and Edge.

Blink instead ultimately depends on HTMLMediaElement::scheduleDelayedAction which sets a timer, which is more like posting a plain task instead of a microtask.

This is the likely root cause of at least these web-platform-test failures:
http://w3c-test.org/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-candidate-insert-before.html
http://w3c-test.org/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-in-sync-event.html
http://w3c-test.org/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-load.html
http://w3c-test.org/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-pause.html
http://w3c-test.org/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-play.html
http://w3c-test.org/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-remove-src.html
http://w3c-test.org/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-remove-source.html
http://w3c-test.org/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-remove-src.html
http://w3c-test.org/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-source-media.html
 

Comment 1 by phil...@opera.com, Mar 9 2016

https://bugs.chromium.org/p/chromium/issues/detail?id=592830#c1 explains one of these test failures in detail.

https://bugs.chromium.org/p/chromium/issues/detail?id=592396 is about a similar problem, where the continuation of the resource selection algorithm happens too soon (synchronously) as opposed to too late.
Owner: sriram...@samsung.com
I have implemented test code for microtask similar to how it is done in ImageLoader.cpp. All the above test cases are passing. Though there are some crashes in existing media tests. I will make proper changes and upload.

Comment 4 by phil...@opera.com, Mar 11 2016

Fantastic, I hope it works out!
Cc: mlamouri@chromium.org
Blocking: 340547

Comment 7 by sshru...@google.com, Mar 21 2016

Components: -Blink>Audio Blink>Media>Audio
Renaming Blink>Audio to Blink>Media>Audio for better characterization

Comment 8 by sshru...@google.com, Mar 21 2016

Components: -Blink>Video Blink>Media>Video
Renaming Blink>Video to Blink>Media>Video for better characterization
Status: Assigned (was: Available)
Labels: Needs-BlinkMediaTriage
Blocking: -340547
Blockedon: 340547
Labels: -Needs-BlinkMediaTriage

Comment 14 by sim...@opera.com, Sep 14 2017

Cc: -sim...@opera.com zcorpan@gmail.com
Cc: foolip@chromium.org
Most of the above test cases are failing even in Edge and Firefox. Probably we should revisit the spec again?
Could be, but I'd be quite surprised if the behavior of Chrome, Edge and Firefox is actually the same, so it would be a matter of finding out what the behavior should be and who needs to change.
Cc: domfarolino@gmail.com

Sign in to add a comment