Issue #1332 - Backport promise-based media playback

https://bugzilla.mozilla.org/show_bug.cgi?id=1244768

I happened to find an older version of the promise-based media playback patch in Bugzilla, the one that was originally submitted for review. It had the DocShell changes I already knew how to deal with, and had fewer of the audio wrapper and nsISupports changes that were confusing me in the later patch. I was able to do a better job getting this back into a UXP-appropriate configuration than I could have with the final version.

I'm honestly still a little unsure about some of the minor refactoring done in the patch itself, insisting on already_AddRefed promises and such, but I don't really know how to avoid those completely. Still, I think it's better than it was.
This commit is contained in:
athenian200 2019-12-23 09:09:57 -06:00 committed by Roy Tam
commit a7054c85a4
3 changed files with 312 additions and 32 deletions

View file

@ -68,7 +68,7 @@ interface HTMLMediaElement : HTMLElement {
[SetterThrows]
attribute boolean loop;
[Throws]
void play();
Promise<void> play();
[Throws]
void pause();