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

This commit is contained in:
Marco Chen 2012-12-14 13:02:54 +08:00
parent 1628cfdbca
commit 1f6145a1d3

5
content/html/content/src/nsHTMLMediaElement.cpp Normal file → Executable file
View File

@ -3564,8 +3564,9 @@ 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;