-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
In your slider, when updating volume in state, should be parse to float.
Line 16:
this.setState({volume_value:parseFloat(evt.volume)});
And isn't the listener should be remove when component unmount ?
`code
componentDidMount() {
this.DeviceEventVolumeListener = DeviceEventEmitter.addListener(
'VolumeControllerValueUpdatedEvent', (evt) => {
console.log("update view volume "+evt.volume);
this.setState({volume_value:parseFloat(evt.volume)});
}
);
ReactNativeVolumeController.update();
}
componentWillUnmount() {
this.DeviceEventVolumeListener.remove();
}`
Metadata
Metadata
Assignees
Labels
No labels