fix: audio files: captions are not shown in player

This commit is contained in:
Yiannis Christodoulou 2025-10-26 12:57:48 +02:00
parent 25f06aeb14
commit 031fc34176

View File

@ -724,7 +724,7 @@ function VideoJSPlayer({ videoId = 'default-video' }) {
const subtitleTracks = hasSubtitles const subtitleTracks = hasSubtitles
? backendSubtitles.map((track) => ({ ? backendSubtitles.map((track) => ({
kind: 'subtitles', kind: 'subtitles',
src: mediaData?.siteUrl + track.src, src: (!isDevMode ? mediaData?.siteUrl : '') + track.src,
srclang: track.srclang, srclang: track.srclang,
label: track.label, label: track.label,
default: track.default || false, default: track.default || false,
@ -1002,7 +1002,7 @@ function VideoJSPlayer({ videoId = 'default-video' }) {
// Use native text tracks on iOS for fullscreen caption support // Use native text tracks on iOS for fullscreen caption support
// On other devices, use Video.js text tracks for full CSS positioning control // On other devices, use Video.js text tracks for full CSS positioning control
nativeTextTracks: isIOS, nativeTextTracks: isIOS && mediaData.data?.media_type !== 'audio' ? true : false,
// Use native video tracks instead of emulated - disabled for consistency // Use native video tracks instead of emulated - disabled for consistency
nativeVideoTracks: false, nativeVideoTracks: false,