repod/src/components/Player/ProgressBar.vue

30 lines
458 B
Vue
Raw Normal View History

2023-08-27 20:20:34 +00:00
<template>
<input class="progress"
:max="player.duration"
min="0"
type="range"
:value="player.currentTime"
@change="(event) => $store.dispatch('player/seek', event.target.value)">
2023-08-27 20:20:34 +00:00
</template>
<script>
export default {
name: 'ProgressBar',
computed: {
2023-08-28 22:47:22 +00:00
player() {
return this.$store.state.player
2023-08-27 20:20:34 +00:00
},
},
}
</script>
<style scoped>
.progress {
height: 4px;
min-height: 4px;
position: absolute;
top: -2px;
width: 99%;
2023-08-27 20:20:34 +00:00
}
</style>