mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 20:24:27 -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 { css } = useYoshiki();
|
||||||
const token = useRef<string | null>(null);
|
const token = useRef<string | null>(null);
|
||||||
const setInfo = useSetAtom(infoAtom);
|
const setInfo = useSetAtom(infoAtom);
|
||||||
const video = useAtomValue(videoAtom);
|
const [video, setVideo] = useAtom(videoAtom);
|
||||||
const audio = useAtomValue(audioAtom);
|
const audio = useAtomValue(audioAtom);
|
||||||
const subtitle = useAtomValue(subtitleAtom);
|
const subtitle = useAtomValue(subtitleAtom);
|
||||||
|
const mode = useAtomValue(playModeAtom);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
async function run() {
|
async function run() {
|
||||||
@ -81,6 +82,10 @@ const Video = forwardRef<VideoRef, VideoProps>(function Video(
|
|||||||
run();
|
run();
|
||||||
}, [source]);
|
}, [source]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (mode === PlayMode.Hls) setVideo(-1);
|
||||||
|
}, [mode, setVideo]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View {...css({ flexGrow: 1, flexShrink: 1 })}>
|
<View {...css({ flexGrow: 1, flexShrink: 1 })}>
|
||||||
<NativeVideo
|
<NativeVideo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user