diff --git a/src/components/video/video.tsx b/src/components/video/video.tsx index 3c2cc29..fd9aeaf 100644 --- a/src/components/video/video.tsx +++ b/src/components/video/video.tsx @@ -8,7 +8,6 @@ import videoEvents from "@/hooks/videoEvents"; const deviation: number = 1 const HVideo: FC = (opt: HVideoOptions) => { let video: Taro.VideoContext - const [currentTime, setCurrentTime] = useState(0) try { @@ -42,9 +41,13 @@ const HVideo: FC = (opt: HVideoOptions) => { /** 判断是否进入断点 */ opt.breakpoint.forEach(d => { if (time < d + deviation && time > d - deviation) { - video.exitFullScreen() + video?.pause() video?.seek(d - deviation) + if (process.env.TARO_ENV === 'h5') { + document?.exitFullscreen() + } + video?.exitFullScreen() // if (opt.preview) { // Taro.showModal({ @@ -107,11 +110,14 @@ const HVideo: FC = (opt: HVideoOptions) => {