Add automatic provider detection.

This commit is contained in:
Dermot Duffy
2022-01-14 21:31:16 -08:00
parent 225b272a85
commit 2277726a22
4 changed files with 25 additions and 4 deletions
+3 -2
View File
@@ -50,7 +50,8 @@ const FRIGATE_MENU_MODES = [
'above',
'below',
] as const;
const LIVE_PROVIDERS = ['frigate', 'frigate-jsmpeg', 'webrtc'] as const;
const LIVE_PROVIDERS = ['auto', 'frigate', 'frigate-jsmpeg', 'webrtc'] as const;
export type LiveProvider = typeof LIVE_PROVIDERS[number];
export class FrigateCardError extends Error {}
@@ -445,7 +446,7 @@ export type NextPreviousControlConfig = z.infer<typeof nextPreviousControlConfig
* Live view configuration section.
*/
const liveConfigDefault = {
provider: 'frigate' as const,
provider: 'auto' as const,
preload: false,
lazy_load: true,
draggable: true,