|
@@ -10,7 +10,7 @@ Subject: Allow playing audio in background
|
|
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
|
|
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
|
|
--- a/media/blink/webmediaplayer_impl.cc
|
|
--- a/media/blink/webmediaplayer_impl.cc
|
|
+++ b/media/blink/webmediaplayer_impl.cc
|
|
+++ b/media/blink/webmediaplayer_impl.cc
|
|
-@@ -1082,6 +1082,12 @@ bool WebMediaPlayerImpl::HasAudio() const {
|
|
|
|
|
|
+@@ -1080,6 +1080,12 @@ bool WebMediaPlayerImpl::HasAudio() const {
|
|
return pipeline_metadata_.has_audio;
|
|
return pipeline_metadata_.has_audio;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -23,7 +23,7 @@ diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_imp
|
|
void WebMediaPlayerImpl::EnabledAudioTracksChanged(
|
|
void WebMediaPlayerImpl::EnabledAudioTracksChanged(
|
|
const blink::WebVector<blink::WebMediaPlayer::TrackId>& enabledTrackIds) {
|
|
const blink::WebVector<blink::WebMediaPlayer::TrackId>& enabledTrackIds) {
|
|
DCHECK(main_task_runner_->BelongsToCurrentThread());
|
|
DCHECK(main_task_runner_->BelongsToCurrentThread());
|
|
-@@ -3505,7 +3511,11 @@ bool WebMediaPlayerImpl::ShouldPausePlaybackWhenHidden() const {
|
|
|
|
|
|
+@@ -3493,7 +3499,11 @@ bool WebMediaPlayerImpl::ShouldPausePlaybackWhenHidden() const {
|
|
// Audio only stream is allowed to play when in background.
|
|
// Audio only stream is allowed to play when in background.
|
|
// TODO: We should check IsBackgroundOptimizationCandidate here. But we need
|
|
// TODO: We should check IsBackgroundOptimizationCandidate here. But we need
|
|
// to move the logic of checking video frames out of that function.
|
|
// to move the logic of checking video frames out of that function.
|