Fix duplicated code issue

This commit is contained in:
Zoe Roux 2023-05-05 02:08:28 +09:00
parent 954909fecd
commit f42eaeb953
No known key found for this signature in database

View File

@ -105,14 +105,6 @@ const Video = forwardRef<{ seek: (value: number) => void }, VideoProps>(function
useSubtitle(ref, subtitle, fonts);
useLayoutEffect(() => {
(async () => {
await initHls();
// Still load the hls source to list available qualities.
// Note: This may ask the server to transmux the audio/video by loading the index.m3u8
hls.loadSource(source.hls);
})();
}, [source.hls]);
useLayoutEffect(() => {
(async () => {
if (!ref?.current || !source.uri) return;