| Index: media/blink/webmediaplayer_impl.cc
|
| diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
|
| index b552a9b538b2a1e5066854b4b93baf247605575b..41b7d717e6525214457aa1b9e77f0818ffbc6df8 100644
|
| --- a/media/blink/webmediaplayer_impl.cc
|
| +++ b/media/blink/webmediaplayer_impl.cc
|
| @@ -1322,6 +1322,18 @@ void WebMediaPlayerImpl::OnError(PipelineStatus status) {
|
| if (suppress_destruction_errors_)
|
| return;
|
|
|
| +#if defined(OS_ANDROID)
|
| + if (status == PipelineStatus::DEMUXER_ERROR_DETECTED_HLS) {
|
| + renderer_factory_selector_->SetUseMediaPlayer(true);
|
| +
|
| + pipeline_controller_.Stop();
|
| +
|
| + main_task_runner_->PostTask(
|
| + FROM_HERE, base::Bind(&WebMediaPlayerImpl::StartPipeline, AsWeakPtr()));
|
| + return;
|
| + }
|
| +#endif
|
| +
|
| ReportPipelineError(load_type_, status, media_log_.get());
|
| media_log_->AddEvent(media_log_->CreatePipelineErrorEvent(status));
|
|
|
| @@ -1812,21 +1824,6 @@ void WebMediaPlayerImpl::DataSourceInitialized(bool success) {
|
| if (observer_ && IsNewRemotePlaybackPipelineEnabled() && data_source_)
|
| observer_->OnDataSourceInitialized(data_source_->GetUrlAfterRedirects());
|
|
|
| -#if defined(OS_ANDROID)
|
| - // We can't play HLS URLs with WebMediaPlayerImpl, so in cases where they are
|
| - // encountered, instruct the HTML media element to use the MediaPlayerRenderer
|
| - // instead.
|
| - //
|
| - // TODO(tguilbert): Detect the presence of HLS based on demuxing results,
|
| - // rather than the URL string. See crbug.com/663503.
|
| - if (data_source_) {
|
| - const GURL url_after_redirects = data_source_->GetUrlAfterRedirects();
|
| - if (MediaCodecUtil::IsHLSURL(url_after_redirects)) {
|
| - renderer_factory_selector_->SetUseMediaPlayer(true);
|
| - }
|
| - }
|
| -#endif
|
| -
|
| if (!success) {
|
| SetNetworkState(WebMediaPlayer::kNetworkStateFormatError);
|
|
|
|
|