提交 db1cfddf authored 作者: 王鹏飞's avatar 王鹏飞

chore: update

上级 8840c701
......@@ -22,7 +22,7 @@ onMounted(() => {
duration.value = e.target.duration
}
video.value.ontimeupdate = () => {
currentTime.value = Math.floor(video.value?.currentTime) || 0
currentTime.value = video.value.currentTime
}
video.value.onplay = () => {
playing.value = true
......@@ -39,13 +39,10 @@ const togglePlay = () => {
playing.value ? video.value?.pause() : video.value?.play()
}
const handleInput = () => {
video.value.pause()
}
const handleChange = (value) => {
const handleInput = (value) => {
video.value.currentTime = value
video.value.play()
}
const hover = ref(false)
</script>
......@@ -97,10 +94,10 @@ const hover = ref(false)
<div class="live-slider" v-show="hover">
<el-slider
v-model="currentTime"
:step="0.1"
:max="duration"
size="small"
:show-tooltip="false"
@change="handleChange"
@input="handleInput" />
</div>
</LiveCover>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论