| | |
| | | controls |
| | | preload="auto" |
| | | @play="handleVideoPlay" |
| | | @ended="handleVideoEnded(index)" |
| | | @ended="handleVideoEnded" |
| | | ></video> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | const VideoShow = ref(false) |
| | | const showAll = ref(false) // 是否展示全部 |
| | | let loadingData |
| | | const fullscreenVideo = ref(null) |
| | | // 视频播放事件处理 |
| | | const handleVideoPlay = (event) => { |
| | | if (event.target.playbackRate !== 0.75) { |
| | |
| | | } |
| | | const handleVideoEnded = index => { |
| | | // 获取当前视频 |
| | | const video = videoRefs.value[index] |
| | | const video = fullscreenVideo.value |
| | | |
| | | // 重置视频播放时间为 0 |
| | | video.currentTime = 0 |
| | |
| | | // 播放 |
| | | const videoRef = ref(null); |
| | | const currentVideoIndex = ref(-1) |
| | | const fullscreenVideo = ref(null) |
| | | |
| | | const enterFullScreen = (index) => { |
| | | currentVideoIndex.value = index |
| | | VideoShow.value = true |