diff --git a/nodemon.json b/nodemon.json index 85892546..78a76f2e 100644 --- a/nodemon.json +++ b/nodemon.json @@ -5,5 +5,5 @@ "watch": ["src", "utils", "vite.config.ts", "public", "public/locales"], "ext": "ts,tsx,css,html,json", "ignore": ["src/**/*.spec.ts", "public/locales/en-US.json.d.ts"], - "exec": "concurrently \"vite build\" -- \"ts-json-as-const public/locales/en-US.json\" -- \"prettier --write public/locales/en-US.json.d.ts\"" + "exec": "concurrently \"vite build\" \"ts-json-as-const public/locales/en-US.json\" \"prettier --write public/locales/en-US.json.d.ts\"" } diff --git a/src/features/videoHistory/index.ts b/src/features/videoHistory/index.ts index da75c7d7..a478f395 100644 --- a/src/features/videoHistory/index.ts +++ b/src/features/videoHistory/index.ts @@ -16,6 +16,9 @@ export async function setupVideoHistory() { const playerContainer = isWatchPage() ? (document.querySelector("div#movie_player") as YouTubePlayerDiv | null) : isShortsPage() ? null : null; // If player container is not available, return if (!playerContainer) return; + const playerVideoData = await playerContainer.getVideoData(); + // If the video is live return + if (playerVideoData.isLive) return; const { video_id: videoId } = await playerContainer.getVideoData(); if (!videoId) return; const videoElement = document.querySelector("video.video-stream.html5-main-video") as HTMLVideoElement | null;