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

Implemented possibility to mute/unmute the videos #47

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

koo27
Copy link

@koo27 koo27 commented Dec 13, 2019

I needed to start the videos without sound, but needed to handle that by user hand.
So I implemented the possibility to add the property muted to the story object as a boolean value. If true, the video will start muted, otherwise you'll be able to hear the sound.
Please remember that you must specify the type="video" property in the story.

I also added two new props to the Stories object: mutedComponent and unmutedComponent in order to customize the button/text to mute/unmute the videos.

An easy example could be

mutedComponent={<h2 style={{ color: "white", fontSize: 22}}>UNMUTE</h2>}
unmutedComponent={<h2 style={{ color: "white", fontSize: 22}}>MUTE</h2>}

Of course you could use an Icon or whatever you prefer.

I tried to follow your code style, and hope everything is fine.
My side it seems to work great.

@imdewan
Copy link

imdewan commented Aug 18, 2023

can you give an example of how to use muted or how to trigger mute

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

Successfully merging this pull request may close these issues.

None yet

2 participants