Procházet zdrojové kódy

Auto full-screen

master
Roderic Day před 5 roky
rodič
revize
6ab778a63b
2 změnil soubory, kde provedl 15 přidání a 1 odebrání
  1. +6
    -0
      pico.css
  2. +9
    -1
      pico.js

+ 6
- 0
pico.css Zobrazit soubor

@@ -46,6 +46,8 @@ body {
}
.media {
grid-area: media;
display: grid;
grid-template-rows: auto 1fr;
}
#textbox {
resize: none;
@@ -70,6 +72,10 @@ body {
resize: vertical;
position: relative;
}
.videos.full-screen {
height: 100% !important;
resize: none;
}
.video-container {
display: inline-block;
position: relative;

+ 9
- 1
pico.js Zobrazit soubor

@@ -244,6 +244,14 @@ const TextBox = {
}
const VideoOptions = {
available: ['mirror', 'square', 'full-screen'],
anyFullScreen: () => {
for(const username of State.online) {
if(State.options[username].has('full-screen')) {
return 'full-screen'
}
}
return ''
},
getFor: (username) => {
if(!State.options[username]) {
State.options[username] = new Set(['mirror', 'square'])
@@ -324,7 +332,7 @@ const Media = {
'mute'
),
),
m('.videos',
m('.videos', {className: VideoOptions.anyFullScreen()},
Object.keys(State.streams).map((username) =>
m(Video, {key: username, username})
),

Načítá se…
Zrušit
Uložit