Skip to content

Commit

Permalink
Fix some media stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
slmnio committed Jun 14, 2024
1 parent ee71a26 commit 634cac6
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions website/src/components/broadcast/roots/MediaOverlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
width="100%"
height="100%"
:class="{'black-out': ended }"
:controls="1"
@ready="playerReady"
@playing="playerPlaying"
@ended="playerEnded" />
Expand Down Expand Up @@ -112,6 +113,11 @@ export default {
videoId(newMedia) {
this.prepared = false;
},
async active(isActive) {
if (isActive && this.$refs.youtube.player) {
this.$refs.youtube.player.seekTo(0);
}
},
async animationActive(isActive) {
if (isActive && this.$refs.youtube.player) {
this.$refs.youtube.player.playVideo();
Expand Down Expand Up @@ -141,17 +147,18 @@ export default {
</script>
<style scoped>
.player {
.media-overlay:deep(.player) {
width: 100vw;
--overlap: 250px;
height: calc(100vh + calc(var(--overlap) * 2));
top: calc(var(--overlap) * -1);
position: absolute;
}
.player:hover, body:hover .player {
.media-overlay:deep(.player):hover,
body:hover :deep(.player) {
--overlap: 0px;
}
.player.black-out {
.media-overlay:deep(.player.black-out) {
filter: brightness(0);
}
</style>

0 comments on commit 634cac6

Please sign in to comment.