Skip to content
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

Callback EndOfSong / Desactivate auto next song #238

Closed
1eadz opened this issue Jan 31, 2018 · 2 comments
Closed

Callback EndOfSong / Desactivate auto next song #238

1eadz opened this issue Jan 31, 2018 · 2 comments

Comments

@1eadz
Copy link

1eadz commented Jan 31, 2018

Hello,

Could you create a callback at the end of the song?
Is it possible to desactivate the auto next song at the end of a song.

My problem :
The user have a choice to make at the end of the song to choose the next song. Thereforce i need to pause the song at 95% of the song...

Thank you :)
Great work.

Cheers.

@chromahoen
Copy link

https://521dimensions.com/open-source/amplitudejs/docs#get-song-played-percentage-(version-3-2)

Amplitude.getSongPlayedPercentage();
Will give you the percentage.

@danpastori
Copy link
Contributor

If you combine what @chromahoen recommended with the getSongPlayedPercentage and add a time_updated callback method https://521dimensions.com/open-source/amplitudejs/docs#callbacks you can wait until the percentage is 95%. Then run what you need to run. If that's a pause, then Amplitude.pause()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants