Bug: chromecast button is hidden after loading the first video
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:
Loading another video after the first one:
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
- Have a working Chromecast on the same network
- Go to the above URL
- Click Video 1: See Cast button in the control bar.
- 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
possibly related https://github.com/muxinc/elements/issues/942
@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.