2022-05-28 05:16:27 +00:00
|
|
|
<template>
|
|
|
|
<div
|
2022-06-07 18:29:57 +00:00
|
|
|
style="color: #fff; left: 1rem; font-size: 0.75rem; position: absolute"
|
|
|
|
:style="fullscreen ? 'bottom: 4.25rem' : 'bottom: 1rem'"
|
2022-05-28 05:16:27 +00:00
|
|
|
>
|
|
|
|
{{ watched }}
|
2022-05-29 17:08:21 +00:00
|
|
|
<span style="color: #aaa"> / {{ duration }} </span>
|
2022-05-28 05:16:27 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2022-06-07 18:29:57 +00:00
|
|
|
props: {
|
|
|
|
video: {
|
|
|
|
type: Object,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
fullscreen: {
|
|
|
|
type: Boolean,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
},
|
2022-05-28 05:16:27 +00:00
|
|
|
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>
|