Bug 819849 - One condition of judging playing state for AudioChannelAgent should be larger or equal to CURRENT not HAVE_FUTURE_DATA. r=roc, a=blocking-basecamp
authorMarco Chen <mchen@mozilla.com>
Fri, 14 Dec 2012 13:02:54 +0800
changeset 125847 7d5f2e584f8a169c57ef90dd997f8b4f1ec2175b
parent 125846 72eead57d12ce21dfa3a8c1ccb0e4d52294f72c1
child 125848 1412ac59be4fa0f1d9470e60f1fbe343a7566cc4
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, blocking-basecamp
bugs819849
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 819849 - One condition of judging playing state for AudioChannelAgent should be larger or equal to CURRENT not HAVE_FUTURE_DATA. r=roc, a=blocking-basecamp
content/html/content/src/nsHTMLMediaElement.cpp
old mode 100644
new mode 100755
--- a/content/html/content/src/nsHTMLMediaElement.cpp
+++ b/content/html/content/src/nsHTMLMediaElement.cpp
@@ -3559,18 +3559,19 @@ nsresult nsHTMLMediaElement::UpdateChann
   return NS_OK;
 }
 
 void nsHTMLMediaElement::UpdateAudioChannelPlayingState()
 {
   // The nsHTMLMediaElement is registered to the AudioChannelService only on B2G.
 #ifdef MOZ_B2G
   bool playingThroughTheAudioChannel =
-     (mReadyState >= nsIDOMHTMLMediaElement::HAVE_FUTURE_DATA &&
-      IsPotentiallyPlaying());
+     (mReadyState >= nsIDOMHTMLMediaElement::HAVE_CURRENT_DATA &&
+      !mPaused &&
+      !IsPlaybackEnded());
   if (playingThroughTheAudioChannel != mPlayingThroughTheAudioChannel) {
     mPlayingThroughTheAudioChannel = playingThroughTheAudioChannel;
 
     if (!mAudioChannelAgent) {
       nsresult rv;
       mAudioChannelAgent = do_CreateInstance("@mozilla.org/audiochannelagent;1", &rv);
       if (!mAudioChannelAgent) {
         return;