fix: player throws error whenever settings panel is openned

This commit is contained in:
--remove-section committed 2026-10-20 18:08:50 +05:30
1 parent 0c50acddd9
commit 2d5f49c32e
11 files changed
+113 -115

No files matched your search

+2 -2
View File
@@ -57,7 +57,7 @@ function addSubtitleTrackToReactPlayer(
const track = document.createElement("track");
const separator = subtitleTracks.url.includes("?") ? "&" : "?";
const urlParams = apiKey ? `${separator}api_key=${apiKey}` : "";
const urlParams = apiKey ? `${separator}ApiKey=${apiKey}` : "";
track.src = `${baseUrl}${subtitleTracks.url}${urlParams}`;
track.kind = "subtitles";
track.srclang = reqSubTrack.Language ?? "en";
@@ -458,7 +458,7 @@ export function VideoPlayer() {
let pgsRenderer: PgsRenderer | undefined;
const apiKey = api?.accessToken;
const separator = mediaSource.subtitle.url?.includes("?") ? "&" : "?";
const urlParams = apiKey ? `${separator}api_key=${apiKey}` : "";
const urlParams = apiKey ? `${separator}ApiKey=${apiKey}` : "";
if (
mediaSource.subtitle.format === "ass" ||