Bug 1321497 - correct the logic of resuming from AudioChannel; r=alwu,jwwang
authorKaku Kuo <kaku@mozilla.com>
Thu, 01 Dec 2016 16:30:18 +0800
changeset 325351 34a2a7ffa7b3bf3992062526e99b3594391277cf
parent 325350 181184c5f80eb272aa8cdbe8fca8a909c3103b99
child 325352 61d6fe7c63903f8f3d5ba8e9af58f6893f763167
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersalwu, jwwang
bugs1321497
milestone53.0a1
Bug 1321497 - correct the logic of resuming from AudioChannel; r=alwu,jwwang MozReview-Commit-ID: JxeqdzADlrU
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -787,17 +787,17 @@ private:
 
     NotifyAudioPlaybackChanged(
       AudioChannelService::AudibleChangedReasons::ePauseStateChanged);
   }
 
   void
   Resume()
   {
-    if (!IsSuspended() && mOwner->Paused()) {
+    if (!IsSuspended()) {
       MOZ_LOG(AudioChannelService::GetAudioChannelLog(), LogLevel::Debug,
              ("HTMLMediaElement::AudioChannelAgentCallback, ResumeFromAudioChannel, "
               "this = %p, Error : resume without suspended!\n", this));
       return;
     }
 
     SetSuspended(nsISuspendedTypes::NONE_SUSPENDED);
     nsresult rv = mOwner->Play();