Archived
2
0

add umute overlay.

This commit is contained in:
Miroslav Šedivý 2021-11-27 18:20:01 +01:00
parent d23e5db118
commit ef7975af80

View File

@ -21,8 +21,11 @@
@mouseenter.stop.prevent="onMouseEnter"
@mouseleave.stop.prevent="onMouseLeave"
/>
<div v-if="!playing" class="player-overlay">
<i @click.stop.prevent="toggle" v-if="playable" class="fas fa-play-circle" />
<div v-if="!playing && playable" class="player-overlay" @click.stop.prevent="toggle">
<i class="fas fa-play-circle" />
</div>
<div v-if="mutedOverlay && muted" class="player-overlay" @click.stop.prevent="unmute">
<i class="fas fa-volume-up" />
</div>
<div ref="aspect" class="player-aspect" />
</div>
@ -151,14 +154,12 @@
display: flex;
justify-content: center;
align-items: center;
i {
cursor: pointer;
&::before {
i::before {
font-size: 120px;
text-align: center;
}
}
&.hidden {
display: none;
@ -220,6 +221,7 @@
private focused = false
private fullscreen = false
private startsMuted = true
private mutedOverlay = true
get admin() {
return this.$accessor.user.admin
@ -515,6 +517,11 @@
}
}
unmute() {
this.$accessor.video.setMuted(false)
this.mutedOverlay = false
}
toggleControl() {
if (!this.playable) {
return