2022-03-24 22:47:48 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<video
|
2022-04-01 13:04:52 +00:00
|
|
|
controls
|
|
|
|
autoplay
|
|
|
|
:src="vidSrc"
|
|
|
|
width="100%"
|
|
|
|
@webkitfullscreenchange="handleFullscreenChange"
|
|
|
|
ref="player"
|
|
|
|
style="max-height: 50vh"
|
2022-03-24 22:47:48 +00:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2022-04-01 13:04:52 +00:00
|
|
|
export default {
|
|
|
|
props: ["vidSrc"],
|
2022-03-24 22:47:48 +00:00
|
|
|
|
2022-04-01 13:04:52 +00:00
|
|
|
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();
|
|
|
|
}
|
|
|
|
},
|
2022-03-24 22:47:48 +00:00
|
|
|
|
2022-04-01 13:04:52 +00:00
|
|
|
getPlayer() {
|
|
|
|
return this.$refs.player;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2022-03-24 22:47:48 +00:00
|
|
|
</script>
|