| 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 9e84f2d6a9358652452dc19e2294ac9399b89ae6..89e650c53da63b8928ae75fcbe3bda472dd1aa59 100644
|
| --- a/content/renderer/media/android/webmediaplayer_android.cc
|
| +++ b/content/renderer/media/android/webmediaplayer_android.cc
|
| @@ -1511,21 +1511,24 @@ void WebMediaPlayerAndroid::OnWaitingForDecryptionKey() {
|
| encrypted_client_->didResumePlaybackBlockedForKey();
|
| }
|
|
|
| -void WebMediaPlayerAndroid::OnHidden(bool must_suspend) {
|
| +void WebMediaPlayerAndroid::OnHidden() {
|
| if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| switches::kDisableMediaSuspend)) {
|
| return;
|
| }
|
|
|
| + OnSuspendRequested(false);
|
| +}
|
| +
|
| +void WebMediaPlayerAndroid::OnShown() {}
|
| +
|
| +void WebMediaPlayerAndroid::OnSuspendRequested(bool must_suspend) {
|
| // If we're idle or playing video, pause and release resources; audio only
|
| - // players are allowed to continue playing in the background unless indicated
|
| - // otherwise by the call.
|
| + // players are allowed to continue unless indicated otherwise by the call.
|
| if (must_suspend || (paused() && playback_completed_) || hasVideo())
|
| SuspendAndReleaseResources();
|
| }
|
|
|
| -void WebMediaPlayerAndroid::OnShown() {}
|
| -
|
| void WebMediaPlayerAndroid::OnPlay() {
|
| play();
|
| client_->playbackStateChanged();
|
|
|