api.video-reactnative-player
api.video-reactnative-player copied to clipboard
[Feat]: Add setChromeless option to hide Mute button
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