mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 01:59:58 +00:00
Fix YouTube casting
This commit is contained in:
@@ -4,7 +4,17 @@ import { CAST_LOADER_SCRIPT_URL
|
|||||||
, CAST_SCRIPT_URLS } from "../lib/endpoints";
|
, CAST_SCRIPT_URLS } from "../lib/endpoints";
|
||||||
|
|
||||||
|
|
||||||
(window.wrappedJSObject as any).chrome = cloneInto({}, window);
|
const _window = (window.wrappedJSObject as any);
|
||||||
|
|
||||||
|
_window.chrome = cloneInto({}, window);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* YouTube won't load the cast SDK unless it thinks the
|
||||||
|
* presentation API exists.
|
||||||
|
*/
|
||||||
|
if (window.location.host === "www.youtube.com") {
|
||||||
|
_window.navigator.presentation = cloneInto({}, window);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user