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

style: 🎨 Move 'player' to 'legacy player'

This commit is contained in:
Kenny 2022-04-29 07:52:03 -04:00
parent 36a995781a
commit 0cb7a3511a
2 changed files with 3 additions and 26 deletions

View file

@ -9,16 +9,6 @@
style="max-height: 50vh; display: block"
@webkitfullscreenchange="handleFullscreenChange"
/>
<v-progress-linear
active
background-color="primary"
background-opacity="0.5"
:buffer-value="buffered"
color="primary"
height="3"
query
:value="percentage"
/>
<!-- <v-slider v-model="value" step="0"></v-slider> -->
</div>
</template>
@ -26,21 +16,6 @@
<script>
export default {
props: ["vidSrc"],
data() {
return {
percentage: 0,
buffered: 0,
};
},
mounted() {
let vid = this.$refs.player;
vid.ontimeupdate = () => {
this.percentage = (vid.currentTime / vid.duration) * 100;
};
vid.addEventListener("progress", () => {
this.buffered = (vid.buffered.end(0) / vid.duration) * 100;
});
},
methods: {
handleFullscreenChange() {
if (document.fullscreenElement === this.$refs.player) {

View file

@ -5,7 +5,7 @@
<v-icon>mdi-chevron-down</v-icon>
</v-btn>
<!-- VueTube Player V1 -->
<vuetubePlayer
<legacyPlayer
:sources="sources"
v-if="useBetaPlayer === 'true' && sources.length > 0"
/>
@ -209,6 +209,7 @@ import VidLoadRenderer from "~/components/vidLoadRenderer.vue";
import { getCpn } from "~/plugins/utils";
import SlimVideoDescriptionRenderer from "~/components/UtilRenderers/slimVideoDescriptionRenderer.vue";
import ItemSectionRenderer from "~/components/SectionRenderers/itemSectionRenderer.vue";
import legacyPlayer from "~/components/Player/legacy.vue"
import vuetubePlayer from "~/components/Player/index.vue";
import ShelfRenderer from "~/components/SectionRenderers/shelfRenderer.vue";
import mainCommentRenderer from "~/components/Comments/mainCommentRenderer.vue";
@ -222,6 +223,7 @@ export default {
VidLoadRenderer,
SlimVideoDescriptionRenderer,
vuetubePlayer,
legacyPlayer,
ItemSectionRenderer,
SwipeableBottomSheet,
mainCommentRenderer,