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

Feature request: function to play song by index #240

Closed
mistermantas opened this issue Feb 9, 2018 · 4 comments
Closed

Feature request: function to play song by index #240

mistermantas opened this issue Feb 9, 2018 · 4 comments

Comments

@mistermantas
Copy link

Would simplify my use case significantly:

  1. a stack of song arts is present, like on spotify
  2. swiping left or right lets you skip to that song
  3. a swipe runs a callback to get the index for the needed song
  4. then, once you have that, you get to play the song, right?

But nope. I don’t see anything in the docs for this so far.

@Bagera
Copy link
Contributor

Bagera commented Apr 6, 2018

Can't you use Amplitude.getSongByIndex() and then Amplitude.playNow()?

@mistermantas
Copy link
Author

To answer your question, @Bagera, yes! Sort of.

When you use playNow(), the track isn't played from the queue. It's like a temporary strap on.

You could use it. I chose a different way to do it, I think, which I can share if anyone is looking for it.

But it's hacky. That's the thing.

@danpastori
Copy link
Contributor

@danpastori
Copy link
Contributor

Use the Amplitude.playSongAtIndex()

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