Skip to content

Commit

Permalink
video improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
positivecrash committed Jun 10, 2024
1 parent 3c68258 commit a72d0d3
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,13 @@
<p class="textsmall">Look at the video and re-order words according to numbers.</p>

<div class="videocontainer" v-if="datavideo">
<video muted id="video">
<video muted id="video" controlsList="nodownload">
<source :src="datavideo" type="video/mp4"/>
</video>
<a href="javascript:;" class="videocontrol" @click.prevent="contolvideo">
<IconPlay v-if="videoplay" />
<IconPause v-else />
<IconPause v-if="videoplay" />
<IconPlay v-else />

</a>
</div>

Expand Down Expand Up @@ -353,13 +354,24 @@ const contolvideo = () => {
}
}
onMounted( () => {
onMounted( async () => {
document.addEventListener('contextmenu', e => {
if(e.target.nodeName === 'VIDEO') {
e.preventDefault();
}
});
watch(datavideo, value => {
if(value) {
setTimeout( () => {
URL.revokeObjectURL(value);
}, 1)
}
})
})
</script>

<style scoped>
Expand Down

0 comments on commit a72d0d3

Please sign in to comment.