diff --git a/dom/media/mediasource/MediaSource.cpp b/dom/media/mediasource/MediaSource.cpp index 328f3dbad3c0..1021e09427f1 100644 --- a/dom/media/mediasource/MediaSource.cpp +++ b/dom/media/mediasource/MediaSource.cpp @@ -341,19 +341,14 @@ MediaSource::Enabled(JSContext* cx, JSObject* aGlobal) } // We want to restrict to YouTube only. - // We define that as the origin being https://*.youtube.com. - // We also support https://*.youtube-nocookie.com. + // We define that as the origin being *.youtube.com. + // We also support *.youtube-nocookie.com nsIPrincipal* principal = nsContentUtils::ObjectPrincipal(global); nsCOMPtr uri; if (NS_FAILED(principal->GetURI(getter_AddRefs(uri))) || !uri) { return false; } - bool isHttps = false; - if (NS_FAILED(uri->SchemeIs("https", &isHttps)) || !isHttps) { - return false; - } - nsCOMPtr tldServ = do_GetService(NS_EFFECTIVETLDSERVICE_CONTRACTID); NS_ENSURE_TRUE(tldServ, false);