You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
745 B
40 lines
745 B
import {Video} from "@tarojs/components";
|
|
import {FC} from "react";
|
|
import Taro from "@tarojs/taro";
|
|
import styles from './videoFull.module.scss'
|
|
|
|
interface Props {
|
|
url: string
|
|
}
|
|
|
|
const VideoFull: FC<Props> = () => {
|
|
const {url} = Taro.useRouter().params
|
|
|
|
Taro.useLoad(() => {
|
|
if (!url) {
|
|
Taro.showModal({
|
|
title: '播放地址错',
|
|
success(){
|
|
Taro.navigateBack()
|
|
}
|
|
})
|
|
}
|
|
})
|
|
|
|
return (
|
|
<Video
|
|
className={styles.video}
|
|
controls
|
|
src={url!}
|
|
autoplay
|
|
showCenterPlayBtn
|
|
enablePlayGesture
|
|
autoPauseIfOpenNative
|
|
autoPauseIfNavigate
|
|
showFullscreenBtn={false}
|
|
enableProgressGesture={false}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export default VideoFull
|
|
|