adds video support

This commit is contained in:
Christian Beutel
2025-03-16 18:01:12 +01:00
parent 6cfa21c025
commit 8706fe7ac9
23 changed files with 937 additions and 97 deletions

View File

@@ -18,6 +18,13 @@ export function readAsDataURLAsync(file: File) {
});
}
export function isVideoURL(url: string) {
if(url.startsWith("data")) {
return url.startsWith("data:video")
}
return url.includes("mp4") || url.includes("ogg") || url.includes("webm")
}
export function saveAs(data: Blob, fileName: string) {
var a = document.createElement("a") as HTMLAnchorElement;
a.setAttribute("style", "display: none");

View File

@@ -72,7 +72,6 @@ export function createMarkerFromWaypoint(waypoint: Waypoint, onDragEnd?: (marker
marker.on("dragend", () => onDragEnd(marker, waypoint.id,));
}
waypoint.marker = marker
return marker;
}