apivideo / api.video-reactnative-player

React Native video player
https://api.video
MIT License
17 stars 2 forks source link

[Feat]: Add setChromeless option to hide Mute button #21

Closed siebevd closed 2 months ago

siebevd commented 1 year ago

Version

1.0.2

Environment that reproduces the issue

Device: All OS: All

Use case description

When enabling hideControls the Mute button is still visisble. Would be useful to hide that, so we can add our own UI element for this

Proposed solution

From reading the Javascript docs, you need to call the setChromeless function to make that happen.

Would be useful to potentially add a chromeless prop as well (happy to make a PR)

Current solution, (although that makes the Sound button flash for a second)

 <ApiVideoPlayer
          videoId={stream_id}
          hideControls
          type="live"
          onReady={() => {
            playerControls.webref?.injectJavaScript(
              `apiVideoPlayer.setChromeless(true); true;`,
            );
          }}
          ref={player => (playerControls = player as ApiVideoPlayer)}
        />

Alternative solutions

No response

olivierapivideo commented 2 months ago

Hey, We've added this option in the 1.1.0 version. Let us know if you encounter any issue. Regards