0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-26 05:05:23 +00:00

fix: 🐛 some player fixes

This commit is contained in:
Front 2022-04-24 00:07:05 -04:00
parent ae32d702fc
commit 6da5ca92ef
2 changed files with 15 additions and 5 deletions

View file

@ -1,8 +1,8 @@
<template>
<div>
<div @click="toggleControls()" class="content" :style="showControls ? 'background: rgba(0, 0, 0, 0.5);' : '' ">
<div @click="toggleControls()" class="content">
<div v-show="showControls">
<div v-show="showControls" class="controls">
<v-btn class="pausePlay" text @click="playing = !playing">
<v-icon size="5em" color="white">mdi-{{ playing ? "pause" : "play" }}</v-icon>
</v-btn>
@ -54,6 +54,7 @@ export default {
watch: {
playing() {
console.log("Changed Playback State");
this.playing ? this.$refs.player.play() : this.$refs.player.pause();
},
},
@ -62,9 +63,11 @@ export default {
const src = this.sources[this.sources.length - 1].url;
this.vidSrc = src;
console.log(this.sources, src);
console.log("Beta Player Sources Debug:", this.sources, src);
setInterval(this.updateTiming, 100);
setTimeout(function() { this.$refs.player.play(); }, 1000); // Auto Play
setInterval(this.updateTiming, 100); // Auto Update Scrubber
},
methods: {
@ -114,6 +117,9 @@ export default {
}
/*** General Overlay Styling ***/
.controls {
z-index: 999;
}
.pausePlay {
position: absolute;
top: 50%;

View file

@ -5,7 +5,11 @@
<v-icon>mdi-chevron-down</v-icon>
</v-btn>
<!-- VueTube Player V1 -->
<vuetubePlayer :sources="sources" v-if="useBetaPlayer === 'true'" />
<vuetubePlayer
:sources="sources"
v-if="useBetaPlayer === 'true' && sources.length > 0"
/>
<!-- Stock Player -->
<videoPlayer
id="player"