leoasis / react-sound

Sound component to play audio in your web apps
ISC License
491 stars 80 forks source link

Change playbackRate while playing #77

Open camiloperezv opened 5 years ago

camiloperezv commented 5 years ago

I want to change the playback rate, but i can not call this.setState of a playback value because this will call render method and start the sound again.

As you can se https://jsbin.com/UGIxoJis/1/edit?html,output you can modify the playbackRate while a media is being played.

How can I access to the current sound element to modify his playbackRate?