From 5e09f417077586c1b93c5a2f7789f0ef5bee278d Mon Sep 17 00:00:00 2001 From: Jan Stabenow Date: Tue, 8 Nov 2022 01:18:54 +0100 Subject: [PATCH] Mod switches to the improved SRT syntax --- CHANGELOG.md | 11 ++++++++--- src/misc/Changelog.js | 4 ++-- src/utils/restreamer.js | 4 ++-- src/views/Edit/Sources/Network.js | 8 +++----- src/views/Publication/Services/Core.js | 10 ++++++++++ 5 files changed, 25 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a9bb6d..9ba0699 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,15 +2,20 @@ ### v1.4.0 > v1.5.0 +- Add skills props to encoder and decoder components - Add `fps_mode` to x264, x265, vp9 encoder -- Add scale filter to non-hwaccel encoders +- Add `scale` filter to non-hwaccel encoders - Add PeerTube and Media Network to publication services (plattforms, software) -- Add reset button to hide a player logo (datarhei/restreamer#431) +- Add reset button to hide a player logo ([#431](https://github.com/datarhei/restreamer/issues/431)) +- Mod switches to the improved SRT syntax (thx to SA Consulting) - Mod improves display of progress data +- Mod uses deprecated param ocl - now ochl (ff5) - Mod simplifies the setup of Restreamer-to-Restreamer connections - Mod adds Istafeed.me as StreamKey service to Instagram's publishing service - Mod renames "Low delay" to "Low latency (buffer)" and set false as default (requires more feedback) -- Fix videojs-overlay logo size (datarhei/restreamer#431) +- Del removes support for clappr player +- Fix npm dependencies (security fixes) +- Fix videojs-overlay logo size ([#431](https://github.com/datarhei/restreamer/issues/431)) - Fix use of TLS for input from local RTMP server - Fix Icecast publication service settings (datarhei/restreamer#429) - Fix removes SRT bitstream on tee (OBS > RTMP > SRT is faulty) diff --git a/src/misc/Changelog.js b/src/misc/Changelog.js index 888d52b..b3b3b8d 100644 --- a/src/misc/Changelog.js +++ b/src/misc/Changelog.js @@ -115,11 +115,11 @@ export default function Changelog(props) { Changelog} + title={Update details (Changelog)} maxWidth={600} buttonsRight={ } > diff --git a/src/utils/restreamer.js b/src/utils/restreamer.js index d3d13b1..2afd5d3 100644 --- a/src/utils/restreamer.js +++ b/src/utils/restreamer.js @@ -1020,8 +1020,8 @@ class Restreamer { const port = getPort(cfg.host); address = - `srt://${host}${port}/?mode=caller&transtype=live&streamid=#!:m=request,r=${channelid}` + - (cfg.token.length !== 0 ? `,token=${cfg.token}` : '') + + `srt://${host}${port}/?mode=caller&transtype=live&streamid=${channelid},mode:request` + + (cfg.token.length !== 0 ? `,token:${cfg.token}` : '') + (cfg.passphrase.length !== 0 ? `&passphrase=${cfg.passphrase}` : ''); } else if (what === 'snapshot+memfs') { // snapshot+memfs diff --git a/src/views/Edit/Sources/Network.js b/src/views/Edit/Sources/Network.js index b92a089..acf2164 100644 --- a/src/views/Edit/Sources/Network.js +++ b/src/views/Edit/Sources/Network.js @@ -346,11 +346,9 @@ const getSRTAddress = (host, name, token, passphrase, publish) => { 'srt' + '://' + host + - '?mode=caller&transtype=live&streamid=#!:m=' + - (publish ? 'publish' : 'request') + - ',r=' + - name + - (token.length !== 0 ? ',token=' + encodeURIComponent(token) : ''); + '?mode=caller&transtype=live&streamid=' + + name + ',mode:' + (publish ? 'publish' : 'request') + + (token.length !== 0 ? ',token:' + encodeURIComponent(token) : ''); if (passphrase.length !== 0) { url += '&passphrase=' + encodeURIComponent(passphrase); diff --git a/src/views/Publication/Services/Core.js b/src/views/Publication/Services/Core.js index 38157cd..30b3116 100644 --- a/src/views/Publication/Services/Core.js +++ b/src/views/Publication/Services/Core.js @@ -114,6 +114,14 @@ function Service(props) { settings.v2_stream_id = url.hash.split('&')[0]; settings.v2_passphrase = ''; } + } else if (url.query) { + if (url.query.includes('passphrase=')) { + settings.v2_stream_id = url.query.split('streamid=')[1].split('&')[0]; + settings.v2_passphrase = url.query.split('&passphrase=')[1].split('&')[0]; + } else { + settings.v2_stream_id = url.query.split('streamid=')[1]; + settings.v2_passphrase = ''; + } } else { settings.v2_stream_id = ''; settings.v2_passphrase = ''; @@ -123,6 +131,8 @@ function Service(props) { if (url.query) { if (url.query.includes('token=')) { settings.v2_token = url.query.split('token=')[1].split('&')[0]; + } else if (url.query.includes('token:')) { + settings.v2_token = url.query.split('token:')[1].split('&')[0]; } else { settings.v2_token = ''; }