Split live providers into chunks.

This commit is contained in:
Dermot Duffy
2022-10-09 08:39:04 -07:00
parent 4dbde2895f
commit 0d09286c8c
13 changed files with 642 additions and 576 deletions
+4 -1
View File
@@ -29,7 +29,6 @@ import { dispatchFrigateCardErrorEvent } from './message.js';
import { ThumbnailCarouselTap } from './thumbnail-carousel.js';
import './surround-basic.js';
import './timeline-core.js';
import { ifDefined } from 'lit/directives/if-defined.js';
interface ThumbnailViewContext {
@@ -122,6 +121,10 @@ export class FrigateCardSurround extends LitElement {
* Called before each update.
*/
protected willUpdate(changedProperties: PropertyValues): void {
if (this.timelineConfig?.mode && this.timelineConfig.mode !== 'none') {
import('./timeline-core.js');
}
// Once the component will certainly update, dispatch a media request. Only
// do so if properties relevant to the request have changed (as per their
// hasChanged).