mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Fix android auto not selected by default
This commit is contained in:
parent
0fbfd5731d
commit
1abee46f6d
@ -70,9 +70,10 @@ const Video = forwardRef<VideoRef, VideoProps>(function Video(
|
||||
const { css } = useYoshiki();
|
||||
const token = useRef<string | null>(null);
|
||||
const setInfo = useSetAtom(infoAtom);
|
||||
const video = useAtomValue(videoAtom);
|
||||
const [video, setVideo] = useAtom(videoAtom);
|
||||
const audio = useAtomValue(audioAtom);
|
||||
const subtitle = useAtomValue(subtitleAtom);
|
||||
const mode = useAtomValue(playModeAtom);
|
||||
|
||||
useEffect(() => {
|
||||
async function run() {
|
||||
@ -81,6 +82,10 @@ const Video = forwardRef<VideoRef, VideoProps>(function Video(
|
||||
run();
|
||||
}, [source]);
|
||||
|
||||
useEffect(() => {
|
||||
if (mode === PlayMode.Hls) setVideo(-1);
|
||||
}, [mode, setVideo]);
|
||||
|
||||
return (
|
||||
<View {...css({ flexGrow: 1, flexShrink: 1 })}>
|
||||
<NativeVideo
|
||||
|
Loading…
x
Reference in New Issue
Block a user