0

I have used a react-player for one of my video play website. I have mute video when video starts to play. When I unmute the video then it will unmute with the 100% volume but I need to start the volume to 50%.

It's working fine with the initialization. If I set the volume to 50% then it's working fine but with mute/unmute volume rise to the 100%

Please help me in this concern

Rav's Patel
  • 743
  • 6
  • 22

1 Answers1

1

This worked for me. You can set default volume to 0.5 by adding volume props to react-player component.

import ReactPlayer from 'react-player'

<ReactPlayer width='100%' height='100%' url={src} volume={0.5} />
dahyeko
  • 113
  • 1
  • 9