You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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}
/>
The text was updated successfully, but these errors were encountered: