fix: Report media failures once per failure (#2666)

This commit is contained in:
Dermot Duffy
2026-08-09 10:48:17 -07:00
committed by GitHub
parent 8d8d486afa
commit 5e199b5612
22 changed files with 484 additions and 123 deletions
+11 -1
View File
@@ -74,6 +74,15 @@ export class AdvancedCameraCardViewerProvider extends LitElement implements Medi
@property({ attribute: false })
public cardWideConfig?: CardWideConfig;
// Whether to force this slide to behave as if it is selected and
// intersecting. Set by the carousel on its currently-selected slide. This is
// necessary: `render` below draws nothing until the slide has loaded, and a
// slide drawing nothing can have no height for IntersectionObserver to see.
// Left to the observer only, the slide would wait to be seen before drawing
// anything there was to see. See `LazyLoadConfiguration.forceSelected`.
@property({ attribute: false })
public forceSelected = false;
private _refProvider: Ref<MediaPlayerElement> = createRef();
private _lazyLoadController: LazyLoadController = new LazyLoadController(this);
@@ -177,9 +186,10 @@ export class AdvancedCameraCardViewerProvider extends LitElement implements Medi
}
protected willUpdate(changedProps: PropertyValues): void {
if (changedProps.has('viewerConfig')) {
if (changedProps.has('viewerConfig') || changedProps.has('forceSelected')) {
this._lazyLoadController.setConfiguration({
lazyLoad: this.viewerConfig?.lazy_load,
forceSelected: this.forceSelected,
});
}