2023-08-27 20:20:34 +00:00
|
|
|
<template>
|
2024-04-29 22:48:47 +00:00
|
|
|
<input
|
|
|
|
class="progress"
|
2024-01-30 16:34:20 +00:00
|
|
|
:max="player.duration"
|
|
|
|
min="0"
|
|
|
|
type="range"
|
|
|
|
:value="player.currentTime"
|
2024-04-29 22:48:47 +00:00
|
|
|
@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>
|
2024-04-29 22:48:47 +00:00
|
|
|
.progress {
|
|
|
|
height: 4px;
|
|
|
|
min-height: 4px;
|
|
|
|
position: absolute;
|
|
|
|
top: -2px;
|
|
|
|
width: 99%;
|
|
|
|
}
|
2023-08-27 20:20:34 +00:00
|
|
|
</style>
|