Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2683)

Unified Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 1580733002: [Android cast] Make the local player exit seeking mode on cast start (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed by changing the state in the local player instead, which avoids IPCs Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/android/webmediaplayer_android.cc
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc
index bf8594db964b8d3a8306e248729f577b416710df..dfb678535f2ae36f9d841ec14e556719c3338986 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -1026,6 +1026,14 @@ void WebMediaPlayerAndroid::OnMediaPlayerPlay() {
}
void WebMediaPlayerAndroid::OnMediaPlayerPause() {
+ // Complete a seek operation upon entering pause state. Pause is called as
+ // part of remote media player preparation. There might be a seek operation
+ // initiated locally while the media is not playing, and it needs to be
+ // completed before the remote player starts playing.
+ // (see crbug.com/568161)
+ if (seeking())
+ OnSeekComplete(seek_time_);
aberent 2016/01/12 15:54:56 What effect does this have on local playback, e.g.
dgn 2016/01/13 12:25:54 Removed that line. Tried first to do that when swi
+
UpdatePlayingState(false);
client_->playbackStateChanged();
}

Powered by Google App Engine
This is Rietveld 408576698