Implemented possibility to mute/unmute the videos #47
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andunmutedComponent
in order to customize the button/text to mute/unmute the videos.An easy example could be
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.