Improve live streaming (#16447)

* config file changes

* config migrator

* stream selection on single camera live view

* camera streaming settings dialog

* manage persistent group streaming settings

* apply streaming settings in camera groups

* add ability to clear all streaming settings from settings

* docs

* update reference config

* fixes

* clarify docs

* use first stream as default in dialog

* ensure still image is visible after switching stream type to none

* docs

* clarify docs

* add ability to continue playing stream in background

* fix props

* put stream selection inside dropdown on desktop

* add capabilities to live mode hook

* live context menu component

* resize observer: only return new dimensions if they've actually changed

* pass volume prop to players

* fix slider bug, https://github.com/shadcn-ui/ui/issues/1448

* update react-grid-layout

* prevent animated transitions on draggable grid layout

* add context menu to dashboards

* use provider

* streaming dialog from context menu

* docs

* add jsmpeg warning to context menu

* audio and two way talk indicators in single camera view

* add link to debug view

* don't use hook

* create manual events from live camera view

* maintain grow classes on grid items

* fix initial volume state on default dashboard

* fix pointer events causing context menu to end up underneath image on iOS

* mobile drawer tweaks

* stream stats

* show settings menu for non-restreamed cameras

* consistent settings icon

* tweaks

* optional stats to fix birdseye player

* add toaster to live camera view

* fix crash on initial save in streaming dialog

* don't require restreaming for context menu streaming settings

* add debug view to context menu

* stats fixes

* update docs

* always show stream info when restreamed

* update camera streaming dialog

* make note of no h265 support for webrtc

* docs clarity

* ensure docs show streams as a dict

* docs clarity

* fix css file

* tweaks
This commit is contained in:
Josh Hawkins authored and GitHub committed 2025-02-10 09:42:35 -07:00
1 parent 2a28964e63
commit dd7820e4ee
31 files changed
+2681 -219

No files matched your search

+27 -7
View File
@@ -87,7 +87,7 @@ export interface CameraConfig {
live: {
height: number;
quality: number;
stream_name: string;
streams: { [key: string]: string };
};
motion: {
contour_area: number;
@@ -175,10 +175,18 @@ export interface CameraConfig {
alerts: {
required_zones: string[];
labels: string[];
retain: {
days: number;
mode: string;
};
};
detections: {
required_zones: string[];
labels: string[];
retain: {
days: number;
mode: string;
};
};
};
rtmp: {
@@ -230,6 +238,24 @@ export type CameraGroupConfig = {
order: number;
};
export type StreamType = "no-streaming" | "smart" | "continuous";
export type CameraStreamingSettings = {
streamName: string;
streamType: StreamType;
compatibilityMode: boolean;
playAudio: boolean;
volume: number;
};
export type GroupStreamingSettings = {
[cameraName: string]: CameraStreamingSettings;
};
export type AllGroupsStreamingSettings = {
[groupName: string]: GroupStreamingSettings;
};
export interface FrigateConfig {
audio: {
enabled: boolean;
@@ -326,12 +352,6 @@ export interface FrigateConfig {
camera_groups: { [groupName: string]: CameraGroupConfig };
live: {
height: number;
quality: number;
stream_name: string;
};
logger: {
default: string;
logs: Record<string, string>;
+14
View File
@@ -32,3 +32,17 @@ export type LiveStreamMetadata = {
};
export type LivePlayerError = "stalled" | "startup" | "mse-decode";
export type AudioState = Record<string, boolean>;
export type StatsState = Record<string, boolean>;
export type VolumeState = Record<string, number>;
export type PlayerStatsType = {
streamType: string;
bandwidth: number;
latency: number | undefined;
totalFrames: number;
droppedFrames: number | undefined;
decodedFrames: number | undefined;
droppedFrameRate: number | undefined;
};