| Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| index 06d4a93b6dfca9cb3d42b26427ecb7be2d3f6673..778b3ef0ec4d09c31d1d78688030380766f90efe 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| @@ -1316,6 +1316,20 @@ void HTMLMediaElement::waitForSourceChange()
|
| layoutObject()->updateFromElement();
|
| }
|
|
|
| +void HTMLMediaElement::reportPlayerErrorToDevToolsConsole()
|
| +{
|
| + WTF_LOG(Media, "HTMLMediaElement::reportPlayerErrorToDevToolsConsole(%p)", this);
|
| +
|
| + if (!m_webMediaPlayer)
|
| + return;
|
| +
|
| + const WebString& message = m_webMediaPlayer->getErrorMessage();
|
| + if (message.isEmpty())
|
| + return;
|
| +
|
| + document().addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message));
|
| +}
|
| +
|
| void HTMLMediaElement::noneSupported()
|
| {
|
| WTF_LOG(Media, "HTMLMediaElement::noneSupported(%p)", this);
|
| @@ -1330,6 +1344,7 @@ void HTMLMediaElement::noneSupported()
|
| // 1 - Set the error attribute to a new MediaError object whose code attribute is set to
|
| // MEDIA_ERR_SRC_NOT_SUPPORTED.
|
| m_error = MediaError::create(MediaError::MEDIA_ERR_SRC_NOT_SUPPORTED);
|
| + reportPlayerErrorToDevToolsConsole();
|
|
|
| // 2 - Forget the media element's media-resource-specific text tracks.
|
| forgetResourceSpecificTracks();
|
| @@ -1367,6 +1382,7 @@ void HTMLMediaElement::mediaEngineError(MediaError* err)
|
| // 2 - Set the error attribute to a new MediaError object whose code attribute is
|
| // set to MEDIA_ERR_NETWORK/MEDIA_ERR_DECODE.
|
| m_error = err;
|
| + reportPlayerErrorToDevToolsConsole();
|
|
|
| // 3 - Queue a task to fire a simple event named error at the media element.
|
| scheduleEvent(EventTypeNames::error);
|
|
|