New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On mobile devices (iPad, Android phone), progress bar doesn't update on first song #433
Comments
I am having the same issue. Additionally, I can reproduce the issue on desktop (using Firefox 71 64bit for Linux) in Responsive Design Mode (RDM) if (and only if) I reload the page using any preset device settings. All examples work as expected on desktop otherwise, even in RDM when not using a preset. The only difference I observe from OP's description is that I can't count on these features to start working when I play the second song. Sometimes, I have to switch between songs several times before it begins to work as expected, at which point it continues to work as expected indefinitely. I cannot discern a pattern as to why it begins to work sometimes and not other times. edit: this issue only presents on v5.1.0, so I have downgraded to v5.0.3 for the time being. A couple of observations that may be helpful -
Amplitude.init({
/* songs here, etc. */
callbacks: {
initialized: function() {
Amplitude.getAudio().addEventListener('play', function() {
// should log 'play' when audio begins playing; does not work in responsive design mode!
console.log('play');
});
}
}
}); |
I am able to replicate this on the main site too: https://521dimensions.com/open-source/amplitudejs I am escalating this to @danpastori for further review. |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry that our FREE software with FREE support offended you. Glad that you found a solution that works for you. |
This comment was marked as abuse.
This comment was marked as abuse.
So I've definitely narrowed this down to the native @mrhanna The Fix hopefully coming soon 🤞 |
I have found One Temporary Fix for this .... Load the Player in Paused State... Just after Amplitude.init, call Amplitude.paused(); ... Now player will be in paused state, so whenever you play a song, it will fix that issue of time and progressbar. |
Thank you @kartikcool15 ! This will work for until a fix is in place for sure! |
@danpastori : Thanks, I am using amplitudejs since long, So mostly familiar with most of the issues |
You're a rockstar @kartikcool15, thanks! |
One typo in the solution above. |
With the release of Amplitude 5.3, this has been fixed. The issue stemmed from re-binding events on song changes which was caused by creating a new Audio object. Let me know if any more bugs come up! |
Issue description
Use an iPad (Safari or Chrome) or Android phone (Samsung browser or Chrome) and navigate to:
https://521dimensions.com/open-source/amplitudejs/docs/examples/
Play the first song loaded in any of the examples. Note that the song will play, but the progress bar will not update. The current time will also not update. Tapping on the progress bar will change the position on the song, but you will not see any indication of the new song position on either the current time nor the progress bar. Once you change songs, everything mentioned previously will work.
This is a particular problem for me because I would like to use the single song player. Because there is only one "song", I am unable to get the current time & progress bar to work properly on the mobile devices I've tested on.
Environment
https://www.whatsmybrowser.org/b/YQMFU
https://www.whatsmybrowser.org/b/SJTQE
https://www.whatsmybrowser.org/b/4KKMB
Steps to reproduce the issue
What is expected?
Current time updates while song plays. Progress bar updates while song plays.
Link to where issue can be reproduced
https://521dimensions.com/open-source/amplitudejs/docs/examples/
Additional details / screenshots
The text was updated successfully, but these errors were encountered: