Skip to content

Commit

Permalink
adding jump to time expose
Browse files Browse the repository at this point in the history
  • Loading branch information
Digital authored and Digital committed Apr 22, 2024
1 parent 3b42667 commit 3e86191
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions v2/src/components/VNewPersistentPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,12 @@ const handleClickAnywhere = (e) => {
}
}
const jumpToTime = (time: number) => {
if ($mediaPlayerRef.value) {
$mediaPlayerRef.value.currentTime = time
}
}
onMounted(async () => {
// keyboard accessibility
window.addEventListener("keydown", (event) => {
Expand Down Expand Up @@ -708,6 +714,7 @@ defineExpose({
toggleMinimize,
toggleMute,
togglePlay,
jumpToTime,
$mediaPlayerRef,
})
</script>
Expand Down

0 comments on commit 3e86191

Please sign in to comment.