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

[Feature Request] Add audio toggle #1

Open
ahnafnafee opened this issue Aug 23, 2022 · 4 comments
Open

[Feature Request] Add audio toggle #1

ahnafnafee opened this issue Aug 23, 2022 · 4 comments

Comments

@ahnafnafee
Copy link

Add audio mute on/off toggle to the custom controls

@tlenclos
Copy link

tlenclos commented Sep 7, 2022

Usually sound is managed by the device / OS directly.
There isn't any sound controls on Netflix or youtube player for example.

@foyarash
Copy link
Contributor

foyarash commented Sep 7, 2022

To complete what @tlenclos said, and to answer your original question

You can use the ControlTouchable component to create a touchable content that you then render either:

  • as a child of the VideoControls with an absolute position if you need it positioned anywhere in the controls container
  • as part of a custom slider component

Maybe you need it positioned before the fullscreen button in the slider ? If that's the case i can have a look at how to add custom controls to the slider

@ahnafnafee
Copy link
Author

Usually sound is managed by the device / OS directly. There isn't any sound controls on Netflix or youtube player for example.

In the case of Reddit or Instagram, audio can be toggled off with the mute button that's absolutely positioned on the video container. It's primarily for feeds with videos.

I added the audio component as an absolutely positioned child but it reset the video to the starting position instead of continuing to play.

@foyarash
Copy link
Contributor

foyarash commented Sep 8, 2022

Usually sound is managed by the device / OS directly. There isn't any sound controls on Netflix or youtube player for example.

In the case of Reddit or Instagram, audio can be toggled off with the mute button that's absolutely positioned on the video container. It's primarily for feeds with videos.

I added the audio component as an absolutely positioned child but it reset the video to the starting position instead of continuing to play.

Could you share your code ? The ControlTouchable component is not supposed to interact with the audio player

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants