0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-25 20:55:17 +00:00
VueTube/NUXT/components/Player/watchtime.vue

30 lines
596 B
Vue
Raw Normal View History

2022-05-28 05:16:27 +00:00
<template>
<div style="color: #fff; font-size: 0.75rem">
{{ humanWatchTime }}
<span style="color: #aaa"> / {{ humanDuration }} </span>
2022-05-28 05:16:27 +00:00
</div>
</template>
<script>
export default {
2022-06-07 18:29:57 +00:00
props: {
2022-06-08 15:59:43 +00:00
duration: {
type: Number,
required: true,
},
currentTime: {},
controls: {},
2022-05-28 05:16:27 +00:00
},
computed: {
humanDuration() {
if (this.duration) return this.$vuetube.humanTime(this.duration);
return "0:00";
},
humanWatchTime() {
if (this.currentTime) return this.$vuetube.humanTime(this.currentTime);
return "0:00";
},
},
2022-05-28 05:16:27 +00:00
};
</script>