Blurring video when paused in SFW mode.

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

View File

@ -460,7 +460,6 @@ async function associateReleaseMedia(releases) {
return; return;
} }
// TODO: internal duplicate filtering
// TODO: media count limits // TODO: media count limits
// TODO: catch errors // TODO: catch errors
// TODO: stage by role // TODO: stage by role