Bug 819852 - Modify conditions from media element of judging playing state for audio channel agent with consideration of loop property. r=roc, a=blocking-basecamp

This commit is contained in:
Marco Chen 2013-01-07 16:40:50 +08:00
Родитель 183bab7dbe
Коммит 9fff164488
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -3814,9 +3814,10 @@ void nsHTMLMediaElement::UpdateAudioChannelPlayingState()
// The nsHTMLMediaElement is registered to the AudioChannelService only on B2G.
#ifdef MOZ_B2G
bool playingThroughTheAudioChannel =
(mReadyState >= nsIDOMHTMLMediaElement::HAVE_CURRENT_DATA &&
!mPaused &&
!IsPlaybackEnded());
(!mPaused &&
(HasAttr(kNameSpaceID_None, nsGkAtoms::loop) ||
mReadyState >= nsIDOMHTMLMediaElement::HAVE_CURRENT_DATA &&
!IsPlaybackEnded()));
if (playingThroughTheAudioChannel != mPlayingThroughTheAudioChannel) {
mPlayingThroughTheAudioChannel = playingThroughTheAudioChannel;