Skip to content

Commit

Permalink
fix: remove subtitlies for VideoPlayer2 (#1708)
Browse files Browse the repository at this point in the history
  • Loading branch information
devsargam authored Jan 12, 2025
1 parent d575872 commit 0ddb2b1
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/components/VideoPlayer2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export const VideoPlayer: FunctionComponent<VideoPlayerProps> = ({
options,
contentId,
onReady,
subtitles,
onVideoEnd,
appxVideoId,
appxCourseId,
Expand Down Expand Up @@ -411,16 +410,6 @@ export const VideoPlayer: FunctionComponent<VideoPlayerProps> = ({
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,
Expand Down

0 comments on commit 0ddb2b1

Please sign in to comment.