Bug 1244768 part 4 - call NotifyAboutPlaying() while ready state is changed; r=jwwang
authorKaku Kuo <tkuo@mozilla.com>
Fri, 05 Aug 2016 16:42:31 +0800
changeset 325498 fafd16dfeac96ca44c5f704f049e23d40fabd591
parent 325497 b8c156c5cff840f28e995caa5c0f5bce9a121fcc
child 325499 391d56cd85f751cf7f4682c41e842c795664d0a3
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersjwwang
bugs1244768
milestone53.0a1
Bug 1244768 part 4 - call NotifyAboutPlaying() while ready state is changed; r=jwwang 4.8.12.7 https://html.spec.whatwg.org/multipage/embedded-content.html#ready-states MozReview-Commit-ID: 1RUIU6Rw2SF
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -5541,17 +5541,17 @@ void HTMLMediaElement::ChangeReadyState(
     mLoadedDataFired = true;
   }
 
   if (oldState < nsIDOMHTMLMediaElement::HAVE_FUTURE_DATA &&
       mReadyState >= nsIDOMHTMLMediaElement::HAVE_FUTURE_DATA) {
     DispatchAsyncEvent(NS_LITERAL_STRING("canplay"));
     if (!mPaused) {
       mWaitingForKey = NOT_WAITING_FOR_KEY;
-      DispatchAsyncEvent(NS_LITERAL_STRING("playing"));
+      NotifyAboutPlaying();
     }
   }
 
   CheckAutoplayDataReady();
 
   if (oldState < nsIDOMHTMLMediaElement::HAVE_ENOUGH_DATA &&
       mReadyState >= nsIDOMHTMLMediaElement::HAVE_ENOUGH_DATA) {
     DispatchAsyncEvent(NS_LITERAL_STRING("canplaythrough"));