Pogify / pogify

Listen to music with your live audience without getting DMCA-striked!
http://www.pogify.net
GNU Affero General Public License v3.0
55 stars 4 forks source link

Fixed disconnect error on navigating out of player by removing listen… #11

Closed jasoneffendi closed 4 years ago

jasoneffendi commented 4 years ago

What do your changes do? Fixed disconnect, issue #13 on README. Fixed by removing player state listener on player dismount.

How did you achieve this? Added this.player.removeListener("player_state_changed") on componentWillUnmount of HostPlayer component to prevent player state updates when no longer on player page.

Screenshot Non-visual changes

Reference your commit and/or a related issue Commit: https://github.com/Pogify/pogify/commit/49c8c790e61fd554448dbea72659076ef3ed7344 Issue found on https://github.com/Pogify/pogify/blob/master/README.md, known issue #13

Which maintainer approved you to make this contribution? @BeakerThe1st

Additional Info

BeakerThe1st commented 4 years ago

Thanks for contributing! Please do be sure to read the contributing guidelines before starting a contribution next time. We really do appreciate these types of changes, even though they can just be 1 line 👍