feat: autoplay for related videos

Add autoplay support for related videos. Move the playlist autoplay code
into this shared script. Add the SameSite=Strict attribute to the
autoplay cookie due to Firefox soon rejecting cookies which use
SameSite=None without the secure attribute.

Closes: #50

Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
Umimaso
2021-06-21 00:56:26 +01:00
committed by Jesús
parent ff7aae05c4
commit 2d1794889a
2 changed files with 152 additions and 118 deletions

View File

@@ -345,6 +345,14 @@ label[for=options-toggle-cbox] {
.side-videos { grid-area: side-videos; }
.side-videos .related-autoplay {
list-style: none;
display: grid;
grid-template-columns: repeat(2, auto);
justify-content: start;
grid-column-gap: 0.5rem;
}
/* playlist items */
.side-videos .site-playlist {
border-style: solid;