feat(ios): allow to side load subtitles when playing hls stream (#4593)

This commit is contained in:
Krzysztof Moch
2025-07-07 10:58:20 +02:00
committed by GitHub
parent 1e0536ce4f
commit a561d6b85d
21 changed files with 1051 additions and 270 deletions
+16 -1
View File
@@ -21,6 +21,7 @@ import {
type onProgressData,
type ResizeMode,
type TextTrack,
type VideoConfig,
type VideoPlayerStatus,
type VideoViewRef,
} from 'react-native-video';
@@ -407,7 +408,21 @@ const VideoDemo = () => {
onPress={() => {
const newSource = {
uri: 'https://playertest.longtailvideo.com/adaptive/elephants_dream_v4/index.m3u8',
};
externalSubtitles: [
{
uri: 'https://bitdash-a.akamaihd.net/content/sintel/subtitles/subtitles_en.vtt',
label: 'External English',
language: 'en',
type: 'vtt',
},
{
uri: 'https://bitdash-a.akamaihd.net/content/sintel/subtitles/subtitles_fr.vtt',
label: 'External French',
language: 'External French',
type: 'vtt',
},
],
} satisfies VideoConfig;
player.replaceSourceAsync(newSource);
}}
/>