| Index: media/blink/webmediaplayer_impl.cc
|
| diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
|
| index f9576714f7344cdacfdfe82d41dac78e5f068a9f..a959d29615257fe45d36029eb7ae334adb0ca29d 100644
|
| --- a/media/blink/webmediaplayer_impl.cc
|
| +++ b/media/blink/webmediaplayer_impl.cc
|
| @@ -57,6 +57,10 @@
|
| #include "third_party/WebKit/public/web/WebLocalFrame.h"
|
| #include "third_party/WebKit/public/web/WebView.h"
|
|
|
| +#if defined(OS_ANDROID)
|
| +#include "media/base/android/media_codec_util.h"
|
| +#endif
|
| +
|
| using blink::WebCanvas;
|
| using blink::WebMediaPlayer;
|
| using blink::WebRect;
|
| @@ -1233,6 +1237,23 @@ void WebMediaPlayerImpl::DataSourceInitialized(bool success) {
|
| DVLOG(1) << __FUNCTION__;
|
| DCHECK(main_task_runner_->BelongsToCurrentThread());
|
|
|
| +#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 create a new WebMediaPlayer
|
| + // instance with the correct URL to trigger WebMediaPlayerAndroid creation.
|
| + //
|
| + // TODO(tguilbert): Remove this code path once we have the ability to host a
|
| + // MediaPlayer within a Mojo media renderer. http://crbug.com/580626
|
| + if (data_source_) {
|
| + const GURL url_after_redirects = data_source_->GetUrlAfterRedirects();
|
| + if (MediaCodecUtil::IsHLSPath(url_after_redirects)) {
|
| + client_->requestReload(url_after_redirects);
|
| + // |this| may be destructed, do nothing after this.
|
| + return;
|
| + }
|
| + }
|
| +#endif
|
| +
|
| if (!success) {
|
| SetNetworkState(WebMediaPlayer::NetworkStateFormatError);
|
|
|
|
|