mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-12 10:39:57 +00:00
Detect local file based on file URL
This commit is contained in:
@@ -8,7 +8,7 @@ let session;
|
|||||||
let currentMedia;
|
let currentMedia;
|
||||||
|
|
||||||
|
|
||||||
const isLocalFile = window.location.protocol === "file:";
|
const isLocalFile = srcUrl.startsWith("file:");
|
||||||
|
|
||||||
const mediaElement = isLocalFile
|
const mediaElement = isLocalFile
|
||||||
? document.querySelector("video, audio")
|
? document.querySelector("video, audio")
|
||||||
|
|||||||
Reference in New Issue
Block a user