From 52fd023b1f0adfe70127f55b98fa06d1ec68866c Mon Sep 17 00:00:00 2001 From: Sargam Poudel Date: Sun, 12 Jan 2025 09:30:07 +0530 Subject: [PATCH] fix: remove subtitlies for `VideoPlayer2` --- src/components/VideoPlayer2.tsx | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/components/VideoPlayer2.tsx b/src/components/VideoPlayer2.tsx index 1561175d7..7e52d6a05 100644 --- a/src/components/VideoPlayer2.tsx +++ b/src/components/VideoPlayer2.tsx @@ -38,7 +38,6 @@ export const VideoPlayer: FunctionComponent = ({ options, contentId, onReady, - subtitles, onVideoEnd, appxVideoId, appxCourseId, @@ -411,16 +410,6 @@ export const VideoPlayer: FunctionComponent = ({ if (!playerRef.current && videoRef.current) { const videoElement = document.createElement('video-js'); videoElement.classList.add('vjs-big-play-centered'); - if (subtitles) { - const subtitlesEl = document.createElement('track'); - subtitlesEl.setAttribute('kind', 'subtitles'); - - subtitlesEl.setAttribute('label', 'English'); - subtitlesEl.setAttribute('srcLang', 'en'); - subtitlesEl.setAttribute('src', subtitles); - - videoElement.append(subtitlesEl); - } videoRef.current.appendChild(videoElement); const player: any = (playerRef.current = videojs( videoElement,