Closed
Description
Be sure to search for your issue before opening a new one.
Current Behavior
I am trying to Progrematicaly pass volume to React-player. As soon as the value of volume changes React-player throws the following error
Cannot read property 'setVolume' of undefined
Expected Behavior
It should set the volume to the react-player whenever the value of volume changes.
Other Information
I am passing currentVolume from parent.
const volume = typeof currentVolume !== 'undefined' ? currentVolume : 1;
return
<ReactPlayer
ref={player}
className="video-wrapper"
onReady={() => setIsReady(true)}
playing={shouldPlay && nodeInRange}
playsinline
onPause={onPause}
stopOnUnmount={false}
onPlay={onPlay}
volume={volume}
/>
Activity
Prevent errors when updating without a player
Prevent errors when updating without a player
Prevent errors when updating without a player
Prevent errors when updating without a player