play()
must not fail here: HTMLMediaElement.remove(); el.play()
#9467
Labels
play()
must not fail here: HTMLMediaElement.remove(); el.play()
#9467
https://html.spec.whatwg.org/multipage/media.html#media-playback
POC code:
Expected behavior: the element starts playing
Actual behavior: the element doesn't play,
v.paused === true
.Workaround: execute
v.play()
onsetTimeout
orqueueMicrotask
.I understand that we want elements to get paused when they get removed from the DOM, but this pauses them a little while after they get removed.
Suggested, not thoroughly thought through solution: when
play()
is called, cancel the abovementioned scheduled "pause" task.There is an MR #7855 that touches this piece of the spec, but it still doesn't address the issue.
For context, I discovered this while working on this MR.
The text was updated successfully, but these errors were encountered: