mirror of
https://github.com/koush/scrypted.git
synced 2026-09-17 17:20:39 +01:00
rebroadcast: fix regression in camera disconnection
This commit is contained in:
@@ -90,6 +90,7 @@ export async function startRebroadcastSession(ffmpegInput: FFMpegInput, options:
|
||||
let ffmpegIncomingConnectionTimeout: NodeJS.Timeout;
|
||||
let isActive = true;
|
||||
const events = new EventEmitter();
|
||||
events.on('error', e => console.error('rebroadcast error', e));
|
||||
const { console } = options;
|
||||
|
||||
let inputAudioCodec: string;
|
||||
@@ -133,10 +134,7 @@ export async function startRebroadcastSession(ffmpegInput: FFMpegInput, options:
|
||||
|
||||
const servers = [];
|
||||
|
||||
ffmpegIncomingConnectionTimeout = setTimeout(() => {
|
||||
kill();
|
||||
reject(new Error('timed out waiting for incoming initiate ffmpeg tcp connection'));
|
||||
}, 30000);
|
||||
ffmpegIncomingConnectionTimeout = setTimeout(kill, 30000);
|
||||
|
||||
for (const container of Object.keys(options.parsers)) {
|
||||
const parser = options.parsers[container];
|
||||
@@ -223,6 +221,7 @@ export async function startRebroadcastSession(ffmpegInput: FFMpegInput, options:
|
||||
|
||||
await socketPromise;
|
||||
clearTimeout(ffmpegIncomingConnectionTimeout);
|
||||
console.log('ok!');
|
||||
|
||||
return {
|
||||
inputAudioCodec,
|
||||
|
||||
4
plugins/prebuffer-mixin/package-lock.json
generated
4
plugins/prebuffer-mixin/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/prebuffer-mixin",
|
||||
"version": "0.1.101",
|
||||
"version": "0.1.102",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/prebuffer-mixin",
|
||||
"version": "0.1.101",
|
||||
"version": "0.1.102",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@scrypted/common": "file:../../common",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scrypted/prebuffer-mixin",
|
||||
"version": "0.1.101",
|
||||
"version": "0.1.102",
|
||||
"description": "Rebroadcast and Prebuffer for VideoCameras.",
|
||||
"author": "Scrypted",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
Reference in New Issue
Block a user