diff --git a/src/pages/index/Video.tsx b/src/pages/index/Video.tsx index e70e838..9196914 100644 --- a/src/pages/index/Video.tsx +++ b/src/pages/index/Video.tsx @@ -1,20 +1,47 @@ -import { useEffect } from 'react' +import { useEffect, useState } from 'react' +import Taro from '@tarojs/taro'; + +const videoUrl = 'https://oss.wsdns.cn/20260406/2be0376cac054f2ba86dd35a2bc52e11.mp4' +// 添加版本号解决缓存问题 +const videoVersion = 'v=1.0' +const posterUrl = `${videoUrl}?x-oss-process=video/snapshot,t_1000,f_jpg,w_396,h_222,m_fast` const MyPage = () => { + const [isPlaying, setIsPlaying] = useState(false) useEffect(() => { }, []) + // 点击播放按钮 + const handlePlay = () => { + const video = document.querySelector('video') + if (video) { + video.play() + setIsPlaying(true) + } + } + return (
+ + {/* 移动端播放引导(可选的UI增强) */} +
+ 如视频无法播放,请点击视频区域 +
) }