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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 2400293003: Don't show download button for HLS streams (Closed)
Patch Set: nit Created 4 years, 2 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/HTMLMediaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index 2d4ba9c1bf6d8b627aa5ec992cf75d0aa081584f..663d3259f11ff836bcf984413ac765a5f1a5f191 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -389,6 +389,17 @@ bool HTMLMediaElement::isMediaStreamURL(const String& url) {
return s_mediaStreamRegistry ? s_mediaStreamRegistry->contains(url) : false;
}
+bool HTMLMediaElement::isHLSURL(const KURL& url) {
+ // Keep the same logic as in media_codec_util.h.
+ if (url.isNull() || url.isEmpty())
+ return false;
+
+ if (!url.isLocalFile() && !url.protocolIs("http") && !url.protocolIs("https"))
+ return false;
+
+ return url.getString().contains("m3u8");
+}
+
HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName,
Document& document)
: HTMLElement(tagName, document),

Powered by Google App Engine
This is Rietveld 408576698