| Index: media/blink/webmediaplayer_impl.cc
|
| diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
|
| index d520d0f27ae8ce95a4c07d0244ce6b555ee3343a..887c99eba4c968c1746105295a0f9c856fd38265 100644
|
| --- a/media/blink/webmediaplayer_impl.cc
|
| +++ b/media/blink/webmediaplayer_impl.cc
|
| @@ -1711,7 +1711,8 @@ WebMediaPlayerImpl::UpdatePlayState_ComputePlayState(bool is_remote,
|
| // After HaveMetadata, we know which tracks are present and the duration.
|
| bool have_metadata = ready_state_ >= WebMediaPlayer::ReadyStateHaveMetadata;
|
|
|
| - // After HaveFutureData, Blink will call play() if the state is not paused.
|
| + // After HaveFutureData, Blink will call play() if the state is not paused;
|
| + // prior to this point |paused_| is not accurate.
|
| bool have_future_data =
|
| highest_ready_state_ >= WebMediaPlayer::ReadyStateHaveFutureData;
|
|
|
| @@ -1726,8 +1727,13 @@ WebMediaPlayerImpl::UpdatePlayState_ComputePlayState(bool is_remote,
|
| delegate_ && delegate_->IsPlayingBackgroundVideo();
|
| bool background_suspended = is_backgrounded_video &&
|
| !(can_play_backgrounded && is_background_playing);
|
| - bool background_pause_suspended = is_backgrounded && paused_;
|
| + bool background_pause_suspended =
|
| + is_backgrounded && paused_ && have_future_data;
|
|
|
| + // Idle suspension is allowed prior to have future data since there exist
|
| + // mechanisms to exit the idle state when the player is capable of reaching
|
| + // the have future data state; see didLoadingProgress().
|
| + //
|
| // TODO(sandersd): Make the delegate suspend idle players immediately when
|
| // hidden.
|
| bool idle_suspended = is_idle_ && paused_ && !seeking_ && !overlay_enabled_;
|
|
|