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
and when onVolumeChanged gets fired when the user changes the volume, it calls 'handleVolumeChange' where the argument is a SyntheticBaseEvent (see image below from webstorm)
I want to get the new volume level so I can update the state variable. Is there another means to get the new volume?
The text was updated successfully, but these errors were encountered:
robertlight
changed the title
onVolumeChange(e) is called on volume change but e.target.value is undefined
onVolumeChange(e) is called with a SyntheticBaseEvent, but I need new volume
Jan 17, 2025
I am currently using this HACK within my handleVolumeChange event handler... setState( {...state,volume: document.getElementsByTagName('audio')[0].volume});
There must be a more elegant 'react-like' method without resorting to document.getElementsByTagName()
I am playing an mpg url via:
and when onVolumeChanged gets fired when the user changes the volume, it calls 'handleVolumeChange' where the argument is a SyntheticBaseEvent (see image below from webstorm)
I want to get the new volume level so I can update the state variable. Is there another means to get the new volume?
The text was updated successfully, but these errors were encountered: