Skip to content

Commit 0ddb2b1

Browse files
authored
fix: remove subtitlies for VideoPlayer2 (#1708)
1 parent d575872 commit 0ddb2b1

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/components/VideoPlayer2.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export const VideoPlayer: FunctionComponent<VideoPlayerProps> = ({
3838
options,
3939
contentId,
4040
onReady,
41-
subtitles,
4241
onVideoEnd,
4342
appxVideoId,
4443
appxCourseId,
@@ -411,16 +410,6 @@ export const VideoPlayer: FunctionComponent<VideoPlayerProps> = ({
411410
if (!playerRef.current && videoRef.current) {
412411
const videoElement = document.createElement('video-js');
413412
videoElement.classList.add('vjs-big-play-centered');
414-
if (subtitles) {
415-
const subtitlesEl = document.createElement('track');
416-
subtitlesEl.setAttribute('kind', 'subtitles');
417-
418-
subtitlesEl.setAttribute('label', 'English');
419-
subtitlesEl.setAttribute('srcLang', 'en');
420-
subtitlesEl.setAttribute('src', subtitles);
421-
422-
videoElement.append(subtitlesEl);
423-
}
424413
videoRef.current.appendChild(videoElement);
425414
const player: any = (playerRef.current = videojs(
426415
videoElement,

0 commit comments

Comments
 (0)