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

Unified Diff: webkit/media/android/webmediaplayer_android.cc

Issue 15499006: Enable seek in fullscreen mode for MSE impl on android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add CancelPendingSeek() Created 7 years, 7 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: webkit/media/android/webmediaplayer_android.cc
diff --git a/webkit/media/android/webmediaplayer_android.cc b/webkit/media/android/webmediaplayer_android.cc
index 973c5f29bbda113c9df61ffc16523e42cc356e09..26ac790921d8bfef1576b2a3822fffbf7677f31a 100644
--- a/webkit/media/android/webmediaplayer_android.cc
+++ b/webkit/media/android/webmediaplayer_android.cc
@@ -155,11 +155,17 @@ void WebMediaPlayerAndroid::pause() {
void WebMediaPlayerAndroid::seek(double seconds) {
pending_seek_ = seconds;
+ if (seeking_ && media_source_delegate_)
+ media_source_delegate_->CancelPendingSeek();
seeking_ = true;
base::TimeDelta seek_time = ConvertSecondsToTimestamp(seconds);
+#if defined(GOOGLE_TV)
+ // TODO(qinmin): check if GTV can also defer the seek until the browser side
+ // player is ready.
if (media_source_delegate_)
media_source_delegate_->Seek(seek_time);
+#endif
if (proxy_)
proxy_->Seek(player_id_, seek_time);
}
@@ -499,6 +505,20 @@ void WebMediaPlayerAndroid::OnMediaPlayerPause() {
client_->playbackStateChanged();
}
+void WebMediaPlayerAndroid::OnMediaSeekRequest(base::TimeDelta time_to_seek,
+ bool request_texture_peer) {
+ if (!media_source_delegate_)
+ return;
+
+ if (seeking_)
+ media_source_delegate_->CancelPendingSeek();
acolwell GONE FROM CHROMIUM 2013/05/23 20:58:27 It's not clear to me why this is needed. It seems
qinmin 2013/05/23 22:03:36 changed the if statement to (!seeking_). If the se
+ seeking_ = true;
+ media_source_delegate_->Seek(time_to_seek);
+ OnTimeUpdate(time_to_seek);
+ if (request_texture_peer)
+ EstablishSurfaceTexturePeer();
+}
+
void WebMediaPlayerAndroid::UpdateNetworkState(
WebMediaPlayer::NetworkState state) {
network_state_ = state;
« media/base/android/media_source_player.cc ('K') | « webkit/media/android/webmediaplayer_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698