Index: third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp |
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp |
index 36ef45117fe63fa5a41b48feb7d9b07465783d47..e76fa538b58fbedf92501b749bc467c85e41b308 100644 |
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp |
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp |
@@ -35,6 +35,7 @@ |
#include "core/dom/shadow/ShadowRoot.h" |
#include "core/events/MouseEvent.h" |
#include "core/frame/LocalFrame.h" |
+#include "core/html/HTMLMediaSource.h" |
#include "core/html/HTMLVideoElement.h" |
#include "core/html/TimeRanges.h" |
#include "core/html/shadow/MediaControls.h" |
@@ -284,6 +285,12 @@ PassRefPtrWillBeRawPtr<MediaControlPlayButtonElement> MediaControlPlayButtonElem |
void MediaControlPlayButtonElement::defaultEventHandler(Event* event) |
{ |
if (event->type() == EventTypeNames::click) { |
+ // Allow play attempts for plain src= media to force a reload in the error state. This allows potential |
+ // recovery for transient network and decoder resource issues. |
+ const String& url = mediaElement().currentSrc().getString(); |
+ if (mediaElement().error() && !HTMLMediaElement::isMediaStreamURL(url) && !HTMLMediaSource::lookup(url)) |
wolenetz
2016/03/24 23:05:04
A web app could have explicitly revoked the MediaS
philipj_slow
2016/03/29 13:24:15
Maybe just gate this on KURL::protocolIsInHTTPFami
DaleCurtis
2016/03/29 21:41:14
Depending on the failure type data/blob URLs may h
|
+ mediaElement().load(); |
+ |
mediaElement().togglePlayState(); |
updateDisplayType(); |
event->setDefaultHandled(); |