Index: media/blink/webmediaplayer_impl.cc |
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc |
index 7c10f9fe3981b98b65561a2e49d7f3a4fe8f9ca8..b69e9c074da3975ef2ea1c9da0cd1c6e87fcdb40 100644 |
--- a/media/blink/webmediaplayer_impl.cc |
+++ b/media/blink/webmediaplayer_impl.cc |
@@ -2334,10 +2334,16 @@ void WebMediaPlayerImpl::ReportTimeFromForegroundToFirstFrame( |
time_to_first_frame); |
} |
} |
-void WebMediaPlayerImpl::SwitchRenderer(bool disable_pipeline_auto_suspend) { |
+void WebMediaPlayerImpl::SwitchRenderer(bool is_rendered_remotely) { |
DCHECK(main_task_runner_->BelongsToCurrentThread()); |
- disable_pipeline_auto_suspend_ = disable_pipeline_auto_suspend; |
+ disable_pipeline_auto_suspend_ = is_rendered_remotely; |
ScheduleRestart(); |
+ if (client_) { |
+ if (is_rendered_remotely) |
+ client_->MediaRemotingStarted(); |
+ else |
+ client_->MediaRemotingStopped(); |
+ } |
} |
void WebMediaPlayerImpl::RecordUnderflowDuration(base::TimeDelta duration) { |