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

Cannot read property 'setVolume' of undefined #1074

Closed
ehsantekgenisys opened this issue Nov 11, 2020 · 0 comments
Closed

Cannot read property 'setVolume' of undefined #1074

ehsantekgenisys opened this issue Nov 11, 2020 · 0 comments

Comments

@ehsantekgenisys
Copy link

ehsantekgenisys commented Nov 11, 2020

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}
/>

Webmaster1116 added a commit to Webmaster1116/video-player that referenced this issue May 20, 2021
webmiraclepro added a commit to webmiraclepro/video-player that referenced this issue Sep 9, 2022
philip-luther added a commit to philip-luther/react-player that referenced this issue Nov 22, 2024
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

No branches or pull requests

1 participant