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

How to stop player? #399

Closed
A973C opened this issue Jan 1, 2020 · 3 comments
Closed

How to stop player? #399

A973C opened this issue Jan 1, 2020 · 3 comments
Assignees
Labels
Bug: Needs Confirmation 🧐 Bugs that are reported, but needs to be confirmed and replicated.

Comments

@A973C
Copy link

A973C commented Jan 1, 2020

Hi and happy new year all!

I'm playing with Amplitude and i'm facing a problem: I need a function to stop the player.
Can't find anything in the documentation about it.
I've found this info in the code Amplitude.stop(); but it's not functional : TypeError: Amplitude.stop is not a function

Could you please tell me how to stop the player (stop playing if active, clear playlist, disconnect live stream) ?

Thank you

@A973C A973C added the Bug: Needs Confirmation 🧐 Bugs that are reported, but needs to be confirmed and replicated. label Jan 1, 2020
@A973C
Copy link
Author

A973C commented Jan 3, 2020

To complete my request:
I'm loading distants songs dynamicaly via an Ajax request. When the player is active (songs loaded) and I want to load and play an other album, the 2 lists are playing simultanously...

That's why I wanted to stop the player before loading the new album/songs list.

Thank you for your help!

@enemyss
Copy link

enemyss commented Jan 3, 2020

I had similar issue, using Amplitude.pause() helped (#184). Though I would suggest using Amplitude.addPlaylist( key, data, songs) - won't need to use pause function and previous lists will be stored.

@farsoo
Copy link

farsoo commented May 20, 2020

Same issue for me, the Amplitude.stop() function is not working (TypeError: Amplitude.stop is not a function) and i can't execute the 'stop' callback.

If i use Amplitude.pause() , the live streaming is stopping but when i try to execute the pause callback, in the browser console i read: Invalid URI. Load of media resource failed.

I use AmplitudeJS 5.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Needs Confirmation 🧐 Bugs that are reported, but needs to be confirmed and replicated.
Projects
None yet
Development

No branches or pull requests

4 participants