Przeglądaj źródła

Full screen parts

master
Roderic Day 5 lat temu
rodzic
commit
92204981e3
2 zmienionych plików z 15 dodań i 7 usunięć
  1. +13
    -5
      pico.css
  2. +2
    -2
      pico.js

+ 13
- 5
pico.css Wyświetl plik

.videos { .videos {
display: inline-grid; display: inline-grid;
grid-auto-flow: column; grid-auto-flow: column;
--gap: 1em;
grid-gap: var(--gap);
padding: var(--gap);
grid-gap: 3px;
justify-content: start;
overflow: hidden; overflow: hidden;
resize: both;
resize: vertical;
height: 200px; height: 200px;
width: 100%;
} }
.video-container { .video-container {
background-color: lightsteelblue; background-color: lightsteelblue;
.video-option { .video-option {
display: block; display: block;
} }
.video-container video {
position: absolute;
}
.video-container.square { .video-container.square {
height: 100%; height: 100%;
width: var(--height); width: var(--height);
overflow: hidden;
} }
.video-container.square video { .video-container.square video {
object-fit: cover; object-fit: cover;
.video-container.mirror video { .video-container.mirror video {
transform: scaleX(-1); transform: scaleX(-1);
} }
.video-container.full-screen {
position: initial;
}
.video-container.full-screen video {
position: relative;
}
@media only screen and (min-width: 800px) { @media only screen and (min-width: 800px) {
.chat { .chat {
grid-template-areas: grid-template-areas:

+ 2
- 2
pico.js Wyświetl plik

} }
} }
const VideoOptions = { const VideoOptions = {
available: ['mirror', 'square'],
available: ['mirror', 'square', 'full-screen'],
getFor: (username) => { getFor: (username) => {
if(!State.options[username]) { if(!State.options[username]) {
State.options[username] = new Set(VideoOptions.available)
State.options[username] = new Set(['mirror', 'square'])
} }
return State.options[username] return State.options[username]
}, },

Ładowanie…
Anuluj
Zapisz