mirror of
https://github.com/koush/scrypted.git
synced 2026-05-05 22:00:27 +01:00
rebroadcast: show stream selection options when synthetic streams are configured (#2012)
* fix: show stream selection options when synthetic streams are configured * fix: show stream selection options and enforce FFmpeg parser for synthetic streams
This commit is contained in:
@@ -351,7 +351,12 @@ class PrebufferSession {
|
||||
|
||||
const currentParser = parser.isDefault ? STRING_DEFAULT : parser.parser;
|
||||
|
||||
const choices = this.canUseRtmpParser(this.advertisedMediaStreamOptions)
|
||||
const choices = this.mixin.streamSettings.storageSettings.values.synthenticStreams.includes(this.streamId)
|
||||
? [
|
||||
FFMPEG_PARSER_TCP,
|
||||
FFMPEG_PARSER_UDP,
|
||||
]
|
||||
: this.canUseRtmpParser(this.advertisedMediaStreamOptions)
|
||||
? [
|
||||
STRING_DEFAULT,
|
||||
SCRYPTED_PARSER_TCP,
|
||||
@@ -1405,6 +1410,7 @@ class PrebufferMixin extends SettingsMixinDeviceBase<VideoCamera> implements Vid
|
||||
|
||||
session = new PrebufferSession(this, {
|
||||
id: synthetic,
|
||||
container: 'rtsp',
|
||||
}, false, false);
|
||||
this.sessions.set(id, session);
|
||||
this.console.log('stream', synthetic, 'is synthetic and will be rebroadcast on demand.');
|
||||
|
||||
@@ -227,7 +227,7 @@ export function createStreamSettings(device: MixinDeviceBase<VideoCamera>) {
|
||||
hide: false,
|
||||
};
|
||||
|
||||
if (msos?.length > 1) {
|
||||
if (msos?.length > 1 || storageSettings.values.synthenticStreams.length > 0) {
|
||||
return {
|
||||
enabledStreams,
|
||||
defaultStream: createStreamOptions(streamTypes.defaultStream, msos),
|
||||
|
||||
Reference in New Issue
Block a user