Skip to content
This repository has been archived by the owner on Aug 7, 2018. It is now read-only.

Commit

Permalink
Update react-wavesurfer.js (#34)
Browse files Browse the repository at this point in the history
-Fixed volume not being set if 0 or 0.0
-Fixed initial play state not being set
  • Loading branch information
TrevorHinesley authored and mspae committed May 3, 2017
1 parent 9119a9d commit 99c04cc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/react-wavesurfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,14 @@ class Wavesurfer extends Component {
}

// set initial volume
if (this.props.volume) {
if (this.props.volume != null) {
this._wavesurfer.setVolume(this.props.volume);
}

// set initial playing state
if (this.props.playing) {
this.wavesurfer.play()
}

// set initial zoom
if (this.props.zoom) {
Expand Down

0 comments on commit 99c04cc

Please sign in to comment.