|
@@ -7,9 +7,10 @@ type Props = {
|
|
|
isShow: boolean
|
|
isShow: boolean
|
|
|
src: string
|
|
src: string
|
|
|
closeFu: () => void
|
|
closeFu: () => void
|
|
|
|
|
+ controls?: boolean
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function VideoModel({ isShow, src, closeFu }: Props) {
|
|
|
|
|
|
|
+function VideoModel({ isShow, src, closeFu, controls = false }: Props) {
|
|
|
const videoRef = useRef<HTMLVideoElement>(null)
|
|
const videoRef = useRef<HTMLVideoElement>(null)
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
@@ -40,6 +41,7 @@ function VideoModel({ isShow, src, closeFu }: Props) {
|
|
|
webkit-playsinline='true'
|
|
webkit-playsinline='true'
|
|
|
x5-video-player-type='h5'
|
|
x5-video-player-type='h5'
|
|
|
onEnded={closeFu}
|
|
onEnded={closeFu}
|
|
|
|
|
+ controls={controls}
|
|
|
>
|
|
>
|
|
|
<source type='video/mp4' src={src} />
|
|
<source type='video/mp4' src={src} />
|
|
|
Your browser does not support the video tag.
|
|
Your browser does not support the video tag.
|