Add dual-stream support for Frigate with optional sub-stream selection
Features: - Optional sub-stream selection from already discovered streams - No additional scanning required - reuse existing results - UI: "Add Sub Stream" button to select secondary stream - UI: "Remove Sub Stream" button to clear selection - Smart stream routing in Frigate configs - Go2RTC: generates _main and _sub stream names - Frigate: detect on sub (CPU efficient), record on main (quality) - Frigate: auto-detection of stream resolution - Object detection: person, car, cat, dog - Motion-based recording by default - Live view streams configuration - Support for any resolution: HD, 4K, 8K+ - Comprehensive documentation with examples
This commit is contained in:
@@ -3,20 +3,28 @@ import { FrigateGenerator } from '../config-generators/frigate/index.js';
|
||||
|
||||
export class ConfigPanel {
|
||||
constructor() {
|
||||
this.stream = null;
|
||||
this.mainStream = null;
|
||||
this.subStream = null;
|
||||
}
|
||||
|
||||
render(stream) {
|
||||
this.stream = stream;
|
||||
render(mainStream, subStream = null) {
|
||||
this.mainStream = mainStream;
|
||||
this.subStream = subStream;
|
||||
|
||||
// Update selected stream info
|
||||
document.getElementById('selected-stream-type').textContent = stream.type;
|
||||
document.getElementById('selected-stream-url').textContent = this.maskCredentials(stream.url);
|
||||
// Update main stream info
|
||||
document.getElementById('selected-main-type').textContent = mainStream.type;
|
||||
document.getElementById('selected-main-url').textContent = this.maskCredentials(mainStream.url);
|
||||
|
||||
// Update sub stream info if provided
|
||||
if (subStream) {
|
||||
document.getElementById('selected-sub-type').textContent = subStream.type;
|
||||
document.getElementById('selected-sub-url').textContent = this.maskCredentials(subStream.url);
|
||||
}
|
||||
|
||||
// Generate configs
|
||||
const urlConfig = stream.url;
|
||||
const go2rtcConfig = Go2RTCGenerator.generate(stream);
|
||||
const frigateConfig = FrigateGenerator.generate(stream);
|
||||
const urlConfig = this.generateURLConfig();
|
||||
const go2rtcConfig = Go2RTCGenerator.generate(mainStream, subStream);
|
||||
const frigateConfig = FrigateGenerator.generate(mainStream, subStream);
|
||||
|
||||
// Update config displays
|
||||
document.getElementById('config-url').textContent = urlConfig;
|
||||
@@ -24,6 +32,13 @@ export class ConfigPanel {
|
||||
document.getElementById('config-frigate').textContent = frigateConfig;
|
||||
}
|
||||
|
||||
generateURLConfig() {
|
||||
if (this.subStream) {
|
||||
return `Main Stream:\n${this.mainStream.url}\n\nSub Stream:\n${this.subStream.url}`;
|
||||
}
|
||||
return this.mainStream.url;
|
||||
}
|
||||
|
||||
maskCredentials(url) {
|
||||
try {
|
||||
const urlObj = new URL(url);
|
||||
|
||||
Reference in New Issue
Block a user