Hide the cursor when playing a video

This commit is contained in:
Zoe Roux 2023-04-04 14:33:29 +09:00
parent 298dc9af27
commit 9e3337e9c5
2 changed files with 15 additions and 9 deletions

View File

@ -20,7 +20,7 @@
import { forwardRef, ReactNode } from "react"; import { forwardRef, ReactNode } from "react";
import { Platform, Pressable, TextProps, View, PressableProps } from "react-native"; import { Platform, Pressable, TextProps, View, PressableProps } from "react-native";
import { LinkCore, TextLink, useLink } from "solito/link"; import { TextLink, useLink } from "solito/link";
import { useTheme, useYoshiki } from "yoshiki/native"; import { useTheme, useYoshiki } from "yoshiki/native";
import { alpha } from "./themes"; import { alpha } from "./themes";

View File

@ -154,7 +154,7 @@ export const Player: QueryPage<{ slug: string }> = ({ slug }) => {
flexGrow: 1, flexGrow: 1,
bg: "black", bg: "black",
// @ts-ignore Web only // @ts-ignore Web only
cursor: "unset", cursor: displayControls ? "unset" : "none",
})} })}
> >
<Pressable <Pressable
@ -177,7 +177,13 @@ export const Player: QueryPage<{ slug: string }> = ({ slug }) => {
}, 400); }, 400);
setPlay(!isPlaying); setPlay(!isPlaying);
}} }}
{...css(StyleSheet.absoluteFillObject)} {...css([
StyleSheet.absoluteFillObject,
{
// @ts-ignore Web only
cursor: "unset",
},
])}
> >
<Video <Video
links={data?.link} links={data?.link}