0f17ea4e38
---
- Adicionado `SCALE` token table em `StreamCard` para escalonamento proporcional de todos os elementos do card (padding, texto, botões, ícones) nas variantes mini/sm/md/lg;
- Adicionado toggle "Pure mode" por card (salvo em `localStorage`): Play Stream abre o `.m3u8` direto, Run HTML abre `/player/{id}.html` com extensão real;
- Adicionado toggle "Open in new tab" por card (salvo em `localStorage`): todos os botões do card passam a abrir em nova aba quando ativo;
- Criado `GET /api/player-html/[id]` que serve HTML mínimo sem interface (sem botões Back/Mute), equivalente ao HTML estático antigo; servido via rewrite `next.config.ts` em `/player/:id.html`;
- Criado `GET /static/[id]` com player HTML otimizado para TVs: botões Back e Mute que somem após 5s, autoplay com fallback muted, tenta conexão direta ao MediaMTX (`:8888`) antes do proxy;
- Removido `player-static/[id]/route.ts`; `player/[id]/page.tsx` atualizado para apontar iframe ao `/static/{id}`;
- Melhorado proxy HLS (`/api/hls/`): repassa `Content-Length` e `Accept-Ranges`; segmentos `.ts` cacheados com `max-age=300, immutable`, playlists `.m3u8` com `no-cache, no-store`;
- Adicionado `Translate` ao `--disable-features` do Chromium para suprimir o popup de tradução do Google;
---
89 lines
2.9 KiB
Plaintext
89 lines
2.9 KiB
Plaintext
# Gerado automaticamente pela API — não editar manualmente
|
|
# Stream: {{STREAM_ID}}
|
|
|
|
[program:xvfb-{{STREAM_ID}}]
|
|
command=Xvfb {{DISPLAY}} -screen 0 {{RESOLUTION}}x24 -ac
|
|
autorestart=true
|
|
priority=10
|
|
stdout_logfile=/app/data/logs/{{STREAM_ID}}/xvfb.log
|
|
stderr_logfile=/app/data/logs/{{STREAM_ID}}/xvfb.log
|
|
|
|
[program:chromium-{{STREAM_ID}}]
|
|
command=bash -c "rm -rf \
|
|
/app/data/streams/{{STREAM_ID}}/chrome-profile/Singleton* \
|
|
/app/data/streams/{{STREAM_ID}}/chrome-profile/.org.chromium.* \
|
|
'/app/data/streams/{{STREAM_ID}}/chrome-profile/Default/Crash Reports' \
|
|
/app/data/streams/{{STREAM_ID}}/chrome-profile/Default/.org.chromium.* \
|
|
&& chromium \
|
|
--no-sandbox \
|
|
--test-type \
|
|
{{GPU_FLAGS}} --window-size={{CHROME_SIZE}} \
|
|
--start-fullscreen \
|
|
--user-data-dir=/app/data/streams/{{STREAM_ID}}/chrome-profile \
|
|
--no-first-run \
|
|
--disable-extensions \
|
|
--disable-background-networking \
|
|
--disable-sync \
|
|
--disable-background-timer-throttling \
|
|
--remote-debugging-port={{DEBUG_PORT}} \
|
|
--password-store=basic \
|
|
--disable-features=PasswordManagerRedesign,PasswordSuggestions,Translate \
|
|
'{{STREAM_URL}}'"
|
|
environment=DISPLAY={{DISPLAY}}
|
|
autorestart=true
|
|
priority=20
|
|
startsecs=5
|
|
stdout_logfile=/app/data/logs/{{STREAM_ID}}/chromium.log
|
|
stderr_logfile=/app/data/logs/{{STREAM_ID}}/chromium.log
|
|
|
|
[program:autologin-{{STREAM_ID}}]
|
|
command=/opt/scripts/autologin.sh
|
|
autorestart=false
|
|
priority=30
|
|
startsecs=0
|
|
environment=DISPLAY="{{DISPLAY}}",LOGIN_USER="{{USER}}",LOGIN_PASS="{{PASS}}",DEBUG_PORT="{{DEBUG_PORT}}",STREAM_DELAY="{{STREAM_DELAY}}"
|
|
stdout_logfile=/app/data/logs/{{STREAM_ID}}/autologin.log
|
|
stderr_logfile=/app/data/logs/{{STREAM_ID}}/autologin.log
|
|
|
|
[program:x11vnc-{{STREAM_ID}}]
|
|
environment=DISPLAY={{DISPLAY}}
|
|
command=bash -c "while [ ! -e /tmp/.X11-unix/X$(echo $DISPLAY | cut -d: -f2 | cut -d. -f1) ]; do sleep 0.2; done; exec x11vnc -nopw -listen 0.0.0.0 -rfbport {{VNC_PORT}} -xkb -forever -shared -threads"
|
|
autorestart=true
|
|
priority=40
|
|
stdout_logfile=/app/data/logs/{{STREAM_ID}}/vnc.log
|
|
stderr_logfile=/app/data/logs/{{STREAM_ID}}/vnc.log
|
|
|
|
[program:ffmpeg-{{STREAM_ID}}]
|
|
command=bash -c "sleep {{STREAM_DELAY}} && ffmpeg \
|
|
-loglevel warning \
|
|
-threads {{THREADS}} \
|
|
-f x11grab \
|
|
-video_size {{RESOLUTION}} \
|
|
-framerate {{FPS}} \
|
|
-i {{DISPLAY}} \
|
|
-f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 \
|
|
-shortest \
|
|
-c:v libx264 \
|
|
-preset {{PRESET}} \
|
|
-tune {{TUNE}} \
|
|
-profile:v baseline \
|
|
-level 3.1 \
|
|
-pix_fmt yuv420p \
|
|
-g {{GOP}} \
|
|
-keyint_min {{GOP}} \
|
|
-sc_threshold 0 \
|
|
-b:v {{BITRATE}} \
|
|
-maxrate {{BITRATE}} \
|
|
-bufsize {{BUFSIZE}} \
|
|
-c:a aac \
|
|
-b:a 128k \
|
|
-ar 44100 \
|
|
-ac 2 \
|
|
-vsync cfr \
|
|
-f flv rtmp://localhost:1935/live/{{STREAM_ID}}"
|
|
autorestart=true
|
|
startretries=999
|
|
priority=60
|
|
stdout_logfile=/app/data/logs/{{STREAM_ID}}/ffmpeg.log
|
|
stderr_logfile=/app/data/logs/{{STREAM_ID}}/ffmpeg.log
|