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

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

Issue 2440563004: Switch to using an explicit ended signal instead of time comparison. (Closed)
Patch Set: Fix ended event in ARI. Created 4 years, 2 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 2a38656ab6be6de1b38eebe2792234a1712bd711..3e26eccd6952492e75ad17b90c14015c1bf1643c 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -714,7 +714,7 @@ void WebMediaPlayerAndroid::OnPlaybackComplete() {
// know that the playback has finished. To solve this, we set the
// current time to media duration when OnPlaybackComplete() get called.
interpolator_.SetBounds(duration_, duration_, default_tick_clock_.NowTicks());
- client_->timeChanged();
+ client_->timeChanged(true);
// If the loop attribute is set, timeChanged() will update the current time
// to 0. It will perform a seek to 0. Issue a command to the player to start
@@ -755,7 +755,7 @@ void WebMediaPlayerAndroid::OnSeekComplete(
UpdateReadyState(WebMediaPlayer::ReadyStateHaveEnoughData);
- client_->timeChanged();
+ client_->timeChanged(playback_completed_);
}
void WebMediaPlayerAndroid::OnMediaError(int error_type) {

Powered by Google App Engine
This is Rietveld 408576698