Bug 1304134. Part 2 - per spec. fire 'playing' when autoplay is activated. draft
authorJW Wang <jwwang@mozilla.com>
Fri, 23 Sep 2016 14:05:44 +0800
changeset 417512 852a1cd8c86b573b01b4350833a99a50db7fa6ca
parent 417511 4e435cb8f41a1b65cdf42801390c5b44d3777c57
child 417527 34900c8548e5527129b0af9cb4b25faa9127f305
push id30409
push userjwwang@mozilla.com
push dateMon, 26 Sep 2016 02:30:09 +0000
bugs1304134
milestone52.0a1
Bug 1304134. Part 2 - per spec. fire 'playing' when autoplay is activated. MozReview-Commit-ID: 4fFUvquMgEC
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -4992,16 +4992,18 @@ void HTMLMediaElement::CheckAutoplayData
       mDecoder->Play();
     }
   } else if (mSrcStream) {
     SetPlayedOrSeeked(true);
   }
 
   // For blocked media, the event would be pending until it is resumed.
   DispatchAsyncEvent(NS_LITERAL_STRING("play"));
+
+  DispatchAsyncEvent(NS_LITERAL_STRING("playing"));
 }
 
 bool HTMLMediaElement::IsActive() const
 {
   nsIDocument* ownerDoc = OwnerDoc();
   return ownerDoc && ownerDoc->IsActive() && ownerDoc->IsVisible();
 }