class LogoPlayer extends HTMLElement { constructor() { super(); this.attachShadow({ mode: 'open' }); } connectedCallback() { this.shadowRoot.innerHTML = `
Wash
`; // Fallback for video loading const video = this.shadowRoot.querySelector('#logo-video'); const fallback = this.shadowRoot.querySelector('.fallback'); video.addEventListener('error', () => { video.style.display = 'none'; fallback.style.display = 'flex'; }); video.addEventListener('loadeddata', () => { fallback.style.display = 'none'; }); } } customElements.define('logo-player', LogoPlayer);