rebroadcast: revert risky querystring change

This commit is contained in:
Koushik Dutta
2022-10-04 23:35:46 -07:00
parent a88069f1ff
commit f63ce576f7
4 changed files with 11 additions and 15 deletions

View File

@@ -373,20 +373,10 @@ export class RtspClient extends RtspBase {
fullUrl = path;
}
else {
const u = new URL(fullUrl);
u.pathname += (u.pathname.endsWith('/') ? '' : '/') + path;
fullUrl = u.toString();
// 9/27-2022
// this seems wrong actually. even though ffmpeg does deliver
// query strings after paths, that does not seem to be behavior that is accepted
// on all cameras. rather, amcrest cameras seem to support this quirk.
// early 2021
// strangely, relative RTSP urls do not behave like expected from an HTTP-ish server.
// ffmpeg will happily suffix path segments after query strings:
// SETUP rtsp://localhost:5554/cam/realmonitor?channel=1&subtype=0/trackID=0 RTSP/1.0
// fullUrl += (fullUrl.endsWith('/') ? '' : '/') + path;
fullUrl += (fullUrl.endsWith('/') ? '' : '/') + path;
}
}

View File

@@ -1,4 +1,10 @@
.DS_Store
out/
node_modules/
dist/*.map
*.map
fs
src
.vscode
dist/*.js
.venv
tsconfig.json

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/prebuffer-mixin",
"version": "0.9.42",
"version": "0.9.43",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/prebuffer-mixin",
"version": "0.9.42",
"version": "0.9.43",
"license": "Apache-2.0",
"dependencies": {
"@scrypted/common": "file:../../common",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/prebuffer-mixin",
"version": "0.9.42",
"version": "0.9.43",
"description": "Video Stream Rebroadcast, Prebuffer, and Management Plugin for Scrypted.",
"author": "Scrypted",
"license": "Apache-2.0",