elements icon indicating copy to clipboard operation
elements copied to clipboard

Bug: chromecast button is hidden after loading the first video

Open MarkLyck opened this issue 10 months ago • 2 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Which Mux Elements/Packages does this apply to? Select all that apply

mux-player

Which browsers are you using?

Chrome

Which operating systems are you using?

macOS

Description

When using mux-player with svelte-kit, the chromecast button appears in the control-bar for the first video that is loaded.

However if the website has multiple videos, using the same mux-player. If you navigate to another video, the chromecast button is not shown.

I can reproduce this with a barebones mux-player

<mux-player playback-id={playbackId}></mux-player>

The user can still cast by right clicking the video and clicking "cast" on Google Chrome. But the cast button should always be visible on the mux-player controls if it can chromecast the video.

When the first video is shown: Image

Loading another video after the first one: Image

Refreshing the page makes the chromecast button appear again.

Reduced test case

https://stackblitz.com/edit/sveltejs-kit-template-default-kcsjlzj5?file=src%2Froutes%2Fvideo2%2F%2Bpage.svelte

Steps to reproduce

  1. Have a working Chromecast on the same network
  2. Go to the above URL
  3. Click Video 1: See Cast button in the control bar.
  4. Click Video 2: See no cast button in the control bar.

Current Behavior

the ChromeCast button only loads on the first video that is played.

Expected Behavior

The Chromecast button should be shown in the control bar whenever Chromecast is available.

Errors

No response

What version of the package are you using?

v3.3.0

MarkLyck avatar Feb 28 '25 16:02 MarkLyck

possibly related https://github.com/muxinc/elements/issues/942

luwes avatar Feb 28 '25 17:02 luwes

@luwes possibly 👀, for me I'm not using two different themes, and it also happens when not using a theme.

I added a link to a minimal reproduction with svelte-kit.

MarkLyck avatar Mar 01 '25 03:03 MarkLyck