New issue
Advanced search Search tips

Issue 910988 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Spec violation: HTMLMediaElement incorrectly paused after changing parent in DOM

Reported by therealb...@gmail.com, Dec 3

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36

Steps to reproduce the problem:
1. Add a playing video to the DOM
2. Use appendChild on a container element to re-parent the element (it can be the same parent)

Here is an example: https://jsfiddle.net/NpgD5/3467/

What is the expected behavior?
The video should continue playing, per the spec (https://html.spec.whatwg.org/multipage/media.html#media-playback):

> When a media element is removed from a Document, the user agent must run the following steps:
> 
> 1. Await a stable state, allowing the task that removed the media element from the Document to continue. The synchronous section consists of all the remaining steps of this algorithm. (Steps in the synchronous section are marked with ⌛.)
> 
> 2. ⌛ If the media element is in a document, return.
> 
> 3. ⌛ Run the internal pause steps for the media element.

In Chrome, we pause regardless of the destination. In firefox, we continue playback.

What went wrong?
The video should continue playing since it is still in the DOM.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 70.0.3538.110  Channel: stable
OS Version: Elementary OS 4.13.0-43-generic
Flash Version:
 
video test case
355 bytes View Download
Labels: Needs-Triage-M70
Cc: vamshi.kommuri@chromium.org
Labels: Needs-Feedback Triaged-ET
Thanks for filing the issue!

Unable to reproduce the issue on reported chrome version 70.0.3538.110 using Ubuntu 14.04 with the below mentioned steps.
1. Launched Chrome
2. Navigated to https://jsfiddle.net/NpgD5/3467/
3. Clicked on play button
We observed the video played till end i.e., till 0:52 

@Reporter: Could you please let us know if we have missed anything in the process. Any further inputs from your end may be helpful. 

Sorry for not being more clear! You need to press the "re-parent" button while the video is playing, and it should pause. In Firefox the video continues playing despite having moved.
Project Member

Comment 4 by sheriffbot@chromium.org, Dec 4

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: Needs-Feedback
Status: Untriaged (was: Unconfirmed)
Re-Checked the issue as per comment#3, able to reproduce the issue on reported chrome version 70.0.3538.110. But the same issue seems to be fixed in latest Beta/Canary 71.0.3578.80/73.0.3629.0. Tentatively marking it as Untriaged.

@Reporter: Could you please check the same on them and let us know the behaviour. Please use the below link to download/install the latest versions.
https://www.chromium.org/getting-involved/dev-channel

Thanks!
After testing in the latest Chrome 71 dev channel I can confirm the issue is fixed. Weird that it just happened! Is there a ticket filed about this where I can see the report that motivated the fix?

I found this issue which appears as though it may be related: https://bugs.chromium.org/p/chromium/issues/detail?id=600849 however there doesn't seem to have been any progress on that ticket recently.
And thanks to the devs that corrected this! Great for the user experience.. seeing a flashing play button when you move a video element around the DOM isn't the best.

Sign in to add a comment