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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 2767253002: Don't GONE the unsuspended video only players (Closed)
Patch Set: Fixed logic for audible videos... Created 3 years, 9 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
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index 98b7e6b454afd2538629118c41797de3ec65f9af..38a3b80fb0a2a7733e04b47711d3eaee38dd20db 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -2027,10 +2027,11 @@ WebMediaPlayerImpl::UpdatePlayState_ComputePlayState(bool is_remote,
IsBackgroundedSuspendEnabled() && !IsResumeBackgroundVideosEnabled() &&
is_backgrounded && hasVideo();
bool can_play = !has_error && !is_remote && have_future_data;
- bool has_remote_controls = can_play && !must_suspend && hasAudio() &&
- !backgrounded_video_has_no_remote_controls;
-
- if (!has_remote_controls) {
+ bool has_remote_controls =
+ hasAudio() && !backgrounded_video_has_no_remote_controls;
+ bool alive = can_play && !must_suspend &&
+ (!background_suspended || has_remote_controls);
+ if (!alive) {
result.delegate_state = DelegateState::GONE;
result.is_idle = delegate_->IsIdle(delegate_id_);
} else if (paused_) {
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698