serversideup / amplitudejs

AmplitudeJS: Open Source HTML5 Web Audio Library. Design your web audio player, the way you want. No dependencies required.
https://521dimensions.com/open-source/amplitudejs
MIT License
4.2k stars 424 forks source link

Volume resets back to default value when switching songs #431

Open CRYPTO-7CA opened 4 years ago

CRYPTO-7CA commented 4 years ago

Issue description

Suppose the default volume when doing Amplitude.init() is equal to 100. Suppose the user wants half of that volume or 20%. The user slides the volume slider accordingly, so that the music is being played not so loud. Then when changing songs the volume is back at it's initiated default value, which is 100 rather than staying at 50% or 20%.

Environment

What's My Browser Support link: https://www.whatsmybrowser.org/b/5F3KO Amplitude.js Version: 5.1.0

Steps to reproduce the issue

  1. Play any song
  2. Set the volume to something else, so that you can clearly differentiate the volume of it's initial value and it's newly set value.
  3. Skip to the next song or select another song from the playlist
  4. Bug was reproduced. The next song plays at the volume, that was initiated with by Amplitude.init() rather than set by the user

What is expected?

The next song plays at the same volume as the user has set before.

Link to where issue can be reproduced

This can be reproduced in the examples here. I found this being reproduced in Flat Black Example and Blue Playlist Example.

https://521dimensions.com/open-source/amplitudejs/docs/examples/

Here's mine (server is running only during daytime in Central European timezone): https://lenny-telecommunications.duckdns.org/WEB_DEVELOPMENT_LAB_PROJECTS/music_player_electric_dnb/music_player_electric_DnB

Additional details / screenshots

That's all the information needed from me.

jaydrogers commented 4 years ago

Thanks for the detailed bug report. 🙌

I was able to replicate this as well!

varun-khachane commented 1 year ago

Hi, I would like to work on this issue. Can you please assign it to me?