mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 18:13:25 +00:00
feat: finish audiotrack switching
This commit is contained in:
@@ -166,7 +166,7 @@ export const VideoPlayer = () => {
|
||||
}
|
||||
|
||||
setVideoSrc({
|
||||
uri: url, // multiple audio tracks: 'https://playertest.longtailvideo.com/adaptive/elephants_dream_v4/index.m3u8',
|
||||
uri: url,
|
||||
headers: {
|
||||
...stream.preferredHeaders,
|
||||
...stream.headers,
|
||||
@@ -210,18 +210,6 @@ export const VideoPlayer = () => {
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (hasStartedPlaying && selectedAudioTrack && stream) {
|
||||
void synchronizePlayback(selectedAudioTrack, stream);
|
||||
}
|
||||
}, [
|
||||
hasStartedPlaying,
|
||||
selectedAudioTrack,
|
||||
stream,
|
||||
synchronizePlayback,
|
||||
videoRef,
|
||||
]);
|
||||
|
||||
return (
|
||||
<GestureDetector gesture={composedGesture}>
|
||||
<View className="flex-1 items-center justify-center bg-black">
|
||||
|
Reference in New Issue
Block a user