Bug 1215447 - move flag setting from SeekStarted() to Seek(). r=roc.

This commit is contained in:
Alastor Wu
2015-10-22 11:37:16 +08:00
parent e1370cdbc0
commit 45b6ed98fb

View File

@@ -1590,6 +1590,11 @@ HTMLMediaElement::Seek(double aTime,
// MediaDecoderReaders.
mPlayingBeforeSeek = IsPotentiallyPlaying();
// Set the Variable if the Seekstarted while active playing
if (mPlayingThroughTheAudioChannel) {
mPlayingThroughTheAudioChannelBeforeSeek = true;
}
// The media backend is responsible for dispatching the timeupdate
// event if it changes the playback position as a result of the seek.
LOG(LogLevel::Debug, ("%p SetCurrentTime(%f) starting seek", this, aTime));
@@ -3545,10 +3550,6 @@ void HTMLMediaElement::PlaybackEnded()
void HTMLMediaElement::SeekStarted()
{
DispatchAsyncEvent(NS_LITERAL_STRING("seeking"));
// Set the Variable if the Seekstarted while active playing
if(mPlayingThroughTheAudioChannel) {
mPlayingThroughTheAudioChannelBeforeSeek = true;
}
}
void HTMLMediaElement::SeekCompleted()