From aca50e90aa51d865b72700a2ad5a5d89c60cd643 Mon Sep 17 00:00:00 2001 From: Christian Pillsbury Date: Thu, 7 Sep 2023 07:44:44 -0700 Subject: [PATCH] fix(mux-player): placeholder not applying properly to media-poster-image since v1.0. Update css rules to show poster if placeholder only. --- packages/mux-player/src/styles.css | 2 +- packages/mux-player/src/template.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mux-player/src/styles.css b/packages/mux-player/src/styles.css index 19710729a..2c675fa97 100644 --- a/packages/mux-player/src/styles.css +++ b/packages/mux-player/src/styles.css @@ -48,7 +48,7 @@ media-poster-image { height: 100%; } -media-poster-image:not([src]) { +media-poster-image:not([src]):not([placeholdersrc]) { display: none; } diff --git a/packages/mux-player/src/template.ts b/packages/mux-player/src/template.ts index 1de8b249e..1aac36db0 100644 --- a/packages/mux-player/src/template.ts +++ b/packages/mux-player/src/template.ts @@ -99,7 +99,7 @@ export const content = (props: MuxTemplateProps) => html` part="poster" exportparts="poster, img" src="${props.poster === '' ? false : props.poster ?? false}" - placeholder-src="${props.placeholder ?? false}" + placeholdersrc="${props.placeholder ?? false}" >