| 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 72b4c7a7d160b5c4fef9ad6a5aed5e573f7eccf8..703773364b11cffccadb65b7c6f82a1210f35b4f 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| @@ -1317,6 +1317,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);
|
| @@ -1331,6 +1345,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();
|
| @@ -1368,6 +1383,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);
|
|
|