amplitudejs icon indicating copy to clipboard operation
amplitudejs copied to clipboard

Song time / progress bar not working on mobile devices

Open JollyGoodWeb opened this issue 5 years ago • 11 comments

Issue description

Thanks for the awesome opensource software! Noticed an issue though - the track time / progress bar does not increase / move, on mobile devices. This is present on both the version I've implemented on my own site, and on the main 521 Dimensions website if I visit on mobile.

Environment

  • Amplitude.js Version: "5.2.0"

Steps to reproduce the issue

  1. Attempt to use Amplitude on any mobile device (tested on several).

Thanks in advance for your time!

JollyGoodWeb avatar Aug 11 '20 19:08 JollyGoodWeb

Thanks @JollyGoodWeb !

This is an open issue we are looking in to. What's happening is on mobile devices the binding of event listeners (#433). I have an idea I'm testing, but it's still a WIP. I'll comment here when it's pushed!

danpastori avatar Aug 11 '20 20:08 danpastori

@danpastori sorry for creating a duplicate in that case - new to GitHub, but that'll teach me to look for things first!

Thanks again for your time

JollyGoodWeb avatar Aug 11 '20 20:08 JollyGoodWeb

No worries! We have a couple open issues to finish up ;)

danpastori avatar Aug 11 '20 20:08 danpastori

I have found One Temporary Fix for this .... Load the Player in Paused State... Just after Amplitude.init, call Amplitude.pause(); ... Now player will be in paused state, so whenever you play a song, it will fix that issue of time and progressbar.

kartikcool15 avatar Aug 16 '20 08:08 kartikcool15

@kartikcool15 thanks so much for taking the time to reply. I'm a bit of a newbie when it comes to js, would you mind letting me know where I'm going wrong please? I've tried to implement your solution but with no joy. The song will still play, but the progress bar/time remain unchanged.

Here is how the code looks - have I inserted Amplitude.paused(); in the incorrect place?

Thanks in advance if you're able to take a look!

2020-08-16_11h08_55

JollyGoodWeb avatar Aug 16 '20 10:08 JollyGoodWeb

Sorry for my mistake ... Its Amplitude.pause(); "pause" not "paused"

kartikcool15 avatar Aug 16 '20 13:08 kartikcool15

@kartikcool15 that works perfectly, thanks so much for that!!

JollyGoodWeb avatar Aug 16 '20 13:08 JollyGoodWeb

<3 <3 <3

kartikcool15 avatar Aug 16 '20 13:08 kartikcool15

Can confirm this worked for me too. Thanks @kartikcool15 👍

liamcrean avatar Sep 08 '20 06:09 liamcrean

i m here for this problem , exists a official solution ? Can explain what file need to be edited, and what code need to be replaced? paste here ...

zerg052689 avatar Sep 14 '20 06:09 zerg052689

We're slammed with client work right now. Hopefully @danpastori will have some time soon to dive into this.

Also, we're working on a sponsorship program that we will be releasing in the near future. We're hoping to give backers some awesome perks as well as set a goal to make us 100% open source.

We're working hard to get this to you ASAP!

jaydrogers avatar Sep 14 '20 13:09 jaydrogers