Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Cast button hidden until tab refresh when switching between two players that have different themes #942

Open
1 task done
arghhhhh opened this issue Jul 2, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@arghhhhh
Copy link

arghhhhh commented Jul 2, 2024

Is there an existing issue for this?

  • I have searched the existing issues

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

mux-video-react

Which browsers are you using?

Chrome, Safari, Firefox, Edge ("Edgeium")

Which operating systems are you using?

None

Description

When switching between two different players on the same page--one with the default theme and the other with either the minimal or microvideo theme--the second player's cast button is hidden until switching back and forth between tabs.

unnamed

Reduced test case

https://codesandbox.io/p/sandbox/mux-player-react-cast-button-bug-demo-pt2r48

Steps to reproduce

  1. See that casting is available for video player
  2. Hit 'switch player' button
  3. See that cast button is hidden on second player
  4. Open a different browser tab
  5. Return to the original tab and verify that the cast button is now visible

Current Behavior

Cast button on second player is hidden

Expected Behavior

Cast button on second player is visible

Errors

No response

What version of the package are you using?

2.7.0

@arghhhhh arghhhhh added bug Something isn't working Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug labels Jul 2, 2024
@arghhhhh
Copy link
Author

arghhhhh commented Jul 3, 2024

In case I didn't make it clear, the temporary solution to this issue is ensuring that both players on the page utilize the same theme.

@heff
Copy link
Contributor

heff commented Jul 11, 2024

That is an unexpected fix... Does using the same theme work with both themes or could it be an issue with one of the themes? i.e. One of the themes could be waiting until the browser says casing is available before showing the button.

Which browsers are you using?
Chrome, Safari, Firefox, Edge ("Edgeium")

I don't see any issues in Safari on my side. Just confirming you tested it there.

Otherwise I'm not near a chromecast at the moment but will verify chrome when I am. Right now it just never shows the casting icon for me.

@arghhhhh
Copy link
Author

That is an unexpected fix... Does using the same theme work with both themes or could it be an issue with one of the themes? i.e. One of the themes could be waiting until the browser says casing is available before showing the button.

Which browsers are you using?
Chrome, Safari, Firefox, Edge ("Edgeium")

I don't see any issues in Safari on my side. Just confirming you tested it there.

Otherwise I'm not near a chromecast at the moment but will verify chrome when I am. Right now it just never shows the casting icon for me.

Using the same theme works with both themes. As for Safari, I don't have a mac available to test.

@luwes
Copy link
Contributor

luwes commented Jul 24, 2024

it should only show in Chrome and Edge, they only support casting.
the logic in media-chrome should hide it in the other browsers.

not exactly sure why on theme change it doesn't show right away, I suppose there are no events that are triggering a new evaluation of the casting support.

relevant code:
https://github.com/muxinc/media-chrome/blob/16e43f2a8dd8ce877e54c9243563d095ef9889ca/src/js/media-store/state-mediator.js#L988-L1019

@luwes luwes removed the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants