Add posterUrl to MEDIA_DATA global object

Introduces a new optional 'posterUrl' property to the MEDIA_DATA object on the window, updating both the runtime initialization and TypeScript type declaration.
This commit is contained in:
Yiannis Christodoulou 2025-10-19 13:56:47 +03:00
parent 1de914ec02
commit 0fac57ee9b

View File

@ -5,7 +5,8 @@ import "./index.css";
if (typeof window !== "undefined") { if (typeof window !== "undefined") {
window.MEDIA_DATA = { window.MEDIA_DATA = {
videoUrl: "", videoUrl: "",
mediaId: "" mediaId: "",
posterUrl: ""
}; };
window.lastSeekedPosition = 0; window.lastSeekedPosition = 0;
} }
@ -15,6 +16,7 @@ declare global {
MEDIA_DATA: { MEDIA_DATA: {
videoUrl: string; videoUrl: string;
mediaId: string; mediaId: string;
posterUrl?: string;
}; };
seekToFunction?: (time: number) => void; seekToFunction?: (time: number) => void;
lastSeekedPosition: number; lastSeekedPosition: number;