mirror of
https://github.com/VueTubeApp/VueTube
synced 2024-11-09 13:05:07 +00:00
32 lines
600 B
Vue
32 lines
600 B
Vue
<template>
|
|
<div
|
|
style="
|
|
color: #fff;
|
|
left: 1.5rem;
|
|
bottom: 1.5rem;
|
|
font-size: 0.75rem;
|
|
position: absolute;
|
|
"
|
|
>
|
|
{{ watched }}
|
|
<span style="color: #aaa"> / {{ duration }} </span>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: ["video"],
|
|
data() {
|
|
return {
|
|
watched: 0,
|
|
duration: 0,
|
|
};
|
|
},
|
|
mounted() {
|
|
this.video.addEventListener("timeupdate", () => {
|
|
this.duration = this.$vuetube.humanTime(this.video.duration);
|
|
this.watched = this.$vuetube.humanTime(this.video.currentTime);
|
|
});
|
|
},
|
|
};
|
|
</script>
|