0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-01 17:32:39 +00:00
VueTube/NUXT/components/Player/index.vue
Kenny 36a995781a fix: Beta Player Updates
fix beta player (again), add 'seekbar' module and improve readability
2022-04-29 07:49:32 -04:00

50 lines
1 KiB
Vue

<template>
<div>
<video
ref="player"
controls
autoplay
:src="vidSrc"
width="100%"
style="max-height: 50vh; display: block"
@webkitfullscreenchange="handleFullscreenChange"
/>
<seekbar :video=$refs.player v-if="$refs.player" />
<!-- <v-slider v-model="value" step="0"></v-slider> -->
{{ vidSrc }}
</div>
</template>
<script>
import seekbar from '~/components/Player/seekbar.vue';
export default {
props: ["sources"],
components: {
seekbar
},
data() {
return {
vidSrc: "",
};
},
mounted() {
this.vidSrc = this.sources[this.sources.length-1].url;
},
methods: {
handleFullscreenChange() {
if (document.fullscreenElement === this.$refs.player) {
this.$vuetube.statusBar.hide();
this.$vuetube.navigationBar.hide();
} else {
this.$vuetube.statusBar.show();
this.$vuetube.navigationBar.show();
}
},
getPlayer() {
return this.$refs.player;
},
},
};
</script>