mirror of
https://github.com/VueTubeApp/VueTube
synced 2024-11-23 03:35:15 +00:00
feat: ✨ Beta Player Duration Information
This commit is contained in:
parent
cd7797b9b7
commit
29ee7dd347
1 changed files with 19 additions and 0 deletions
|
@ -8,6 +8,10 @@
|
|||
</v-btn>
|
||||
</div>
|
||||
|
||||
<div class="bottomVideoControls">
|
||||
{{ watched }} <span style="color: #999;">/ {{ video.duration }}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -21,6 +25,12 @@
|
|||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.bottomVideoControls {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.pausePlay {
|
||||
min-height: 5em;
|
||||
min-width: 5em;
|
||||
|
@ -49,9 +59,18 @@
|
|||
return {
|
||||
playing: true,
|
||||
controls: true,
|
||||
|
||||
watched: 0,
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.video.ontimeupdate = () => {
|
||||
console.log(this.video.currentTime)
|
||||
this.watched = this.video.currentTime;
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
togglePlaying() {
|
||||
if (this.video.paused) {
|
||||
|
|
Loading…
Reference in a new issue