thangngoc89 / react-howler

A React.js wrapper for howler.js (audio player)
https://khoanguyen.me/react-howler/
MIT License
361 stars 84 forks source link

Update `rate` in `toggleHowler` #145

Open mrdziuban opened 1 month ago

mrdziuban commented 1 month ago

Currently updating the rate prop after initial render has no effect. It looks like this is because componentDidUpdate calls toggleHowler and toggleHowler does not call this.rate like it does with this.volume.

This updates toggleHowler to add the appropriate call to this.rate when the new rate prop differs from the previous prop.