From 40789c196dd5e3b64210610f8ebfc9c7d1dcd131 Mon Sep 17 00:00:00 2001 From: guy Date: Sat, 21 Nov 2026 23:06:25 -0300 Subject: [PATCH] OrbiSubs panel: include the passphrase in the SRT output URL so it can be copied and used Co-Authored-By: Claude Opus 5.5 --- panel/src/public/app.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/panel/src/public/app.js b/panel/src/public/app.js index 372c8ff..a9bb18b 100644 --- a/panel/src/public/app.js +++ b/panel/src/public/app.js @@ -351,7 +351,12 @@ function syncForm() { ? urlLine(t('Master HLS'), `${MEDIA}/hls/${slug}/master.m3u8`) + urlLine(t('Player'), `${MEDIA}/player.html?u=/hls/${slug}/master.m3u8`) : ''; $('#srt-url').innerHTML = f.srt_enabled.checked && f.srt_mode.value === 'listener' && f.srt_port.value - ? urlLine(t('Salida SRT'), `srt://${location.hostname}:${f.srt_port.value}`) : ''; + ? urlLine(t('Salida SRT'), srtOutUrl(location.hostname, f.srt_port.value, f.srt_passphrase.value.trim())) : ''; +} +// URL de la salida SRT para copiar a un reproductor: con passphrase, porque sin ella el listener +// rechaza la conexión ("Password required"). La latency no va: ffmpeg la lee en µs y VLC/OBS en ms. +function srtOutUrl(host, port, passphrase) { + return `srt://${host}:${port}` + (passphrase ? `?passphrase=${encodeURIComponent(passphrase)}` : ''); } function urlLine(label, url) { return `
${esc(label)} ${esc(url)}
`; @@ -513,8 +518,8 @@ function openView(c) { if (c.cfg.hls.enabled) urls.push(urlLine(t('Master HLS'), src), urlLine(t('Player'), `${MEDIA}/player.html?u=/hls/${c.slug}/master.m3u8`)); if (c.cfg.srt.enabled) { urls.push(c.cfg.srt.mode === 'listener' - ? urlLine(t('Salida SRT'), `srt://${location.hostname}:${c.cfg.srt.port}`) - : urlLine(t('Salida SRT (caller a)'), `srt://${c.cfg.srt.host}:${c.cfg.srt.port}`)); + ? urlLine(t('Salida SRT'), srtOutUrl(location.hostname, c.cfg.srt.port, c.cfg.srt.passphrase)) + : urlLine(t('Salida SRT (caller a)'), srtOutUrl(c.cfg.srt.host, c.cfg.srt.port, c.cfg.srt.passphrase))); if (c.cfg.srt.test && c.cfg.srt.mode === 'listener') urls.push(urlLine(t('HLS desde la salida SRT (608)'), `${MEDIA}/hls/${c.slug}-cc/index.m3u8`)); } $('#view-urls').innerHTML = urls.join('');