Bug 1244768 part 6 - modify the internal pause steps; r=jwwang
authorKaku Kuo <tkuo@mozilla.com>
Thu, 18 Aug 2016 20:05:13 +0800
changeset 325500 ed3195c64abcb14360766eff8f13ae715a4fc756
parent 325499 391d56cd85f751cf7f4682c41e842c795664d0a3
child 325501 23f644a032123cbfa0e332619107ba478202d7a6
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersjwwang
bugs1244768
milestone53.0a1
Bug 1244768 part 6 - modify the internal pause steps; r=jwwang 4.8.12.8 https://html.spec.whatwg.org/multipage/embedded-content.html#internal-pause-steps MozReview-Commit-ID: Dt0VVbXLrhw
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -2742,16 +2742,17 @@ HTMLMediaElement::Pause(ErrorResult& aRv
   // We changed mPaused and mAutoplaying which can affect AddRemoveSelfReference
   AddRemoveSelfReference();
   UpdateSrcMediaStreamPlaying();
   UpdateAudioChannelPlayingState();
 
   if (!oldPaused) {
     FireTimeUpdate(false);
     DispatchAsyncEvent(NS_LITERAL_STRING("pause"));
+    AsyncRejectPendingPlayPromises(NS_ERROR_DOM_MEDIA_ABORT_ERR);
   }
 }
 
 NS_IMETHODIMP HTMLMediaElement::Pause()
 {
   ErrorResult rv;
   Pause(rv);
   return rv.StealNSResult();