added video background support (mp4/webm)

This commit is contained in:
Steffen 2021-02-05 20:50:12 +01:00
parent 126dda1733
commit ad7fddd6a5
1 changed files with 15 additions and 0 deletions

View File

@ -10,6 +10,13 @@
: '' : ''
}" }"
> >
<video
id="background"
v-if="grimoire.background && grimoire.background.match(/\.(mp4|webm)$/i)"
:src="grimoire.background"
autoplay
loop
></video>
<div class="backdrop"></div> <div class="backdrop"></div>
<transition name="blur"> <transition name="blur">
<Intro v-if="!players.length"></Intro> <Intro v-if="!players.length"></Intro>
@ -299,6 +306,14 @@ ul {
} }
} }
/* video background */
video#background {
position: absolute;
width: 100%;
height: 100%;
object-fit: cover;
}
/* Night phase backdrop */ /* Night phase backdrop */
#app > .backdrop { #app > .backdrop {
position: absolute; position: absolute;