Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(581)

Unified Diff: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp

Issue 1827573004: Allow play/pause on default controls to clear media errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable MediaSource and MediaStream URLs. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
index 4e619ec06969922a5c0a691831df4a392867126f..20e2edbd502485a4a69b1295ea7913f02e9f426e 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
@@ -252,6 +252,10 @@ void MediaControls::reset()
m_timeline->setIsWanted(true);
}
+ // If the player has entered an error state, force it into the paused state.
+ if (mediaElement().error())
+ mediaElement().pause();
+
updatePlayState();
updateCurrentTimeDisplay();

Powered by Google App Engine
This is Rietveld 408576698