Blurring video when paused in SFW mode.

This commit is contained in:
2020-04-02 02:23:54 +02:00
parent baaa701249
commit c39bfb234d
2 changed files with 11 additions and 5 deletions

View File

@@ -9,10 +9,11 @@
:src="`/media/${release.trailer.path}`"
:poster="release.poster && (sfw ? `/img/${release.poster.sfw.thumbnail}` : `/media/${release.poster.thumbnail}`)"
:alt="release.title"
:class="{ sfw: sfw && paused }"
class="item trailer-video"
controls
@playing="playing = true"
@pause="playing = false"
@playing="playing = true; paused = false;"
@pause="playing = false; paused = true;"
>Sorry, the tailer cannot be played in your browser</video>
<video
@@ -20,10 +21,11 @@
:src="`/media/${release.teaser.path}`"
:poster="release.poster && (sfw ? `/img/${release.poster.sfw.thumbnail}` : `/media/${release.poster.thumbnail}`)"
:alt="release.title"
:class="{ sfw: sfw && paused }"
class="item trailer-video"
controls
@playing="playing = true"
@pause="playing = false"
@playing="playing = true; paused = false;"
@pause="playing = false; paused = true;"
>Sorry, the tailer cannot be played in your browser</video>
<img
@@ -122,6 +124,7 @@ export default {
data() {
return {
playing: false,
paused: false,
};
},
computed: {
@@ -228,6 +231,10 @@ export default {
.trailer-video {
max-width: 100%;
object-fit: cover;
&.sfw {
filter: blur(2rem);
}
}
@keyframes alert {