Replies: 1 comment
-
if u researched and know how to do this natively ur welcome to post a snippet and submit a PR. alternatively a solution is to add the queue, skip to the index you want, then modify the queue via TP.remove. pseudocode:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I need to play a list of songs in the app(may be 50 tracks), I set the queue using
setQueue
function. The list is displayed on the home screen, when I click one if the song(assume the 5th song in the list), I want to play the 5th song and load the cover image for this song, but the player always play the first track in the queue, I need to skip to the selected song, so there will be a delayed issue on the UI and audio loading, because the image of the first track is loaded and then quickly switch to the 5th track, load the image again, and the audio starts to play after loading for a while.I wonder if there is a property like
defaultTrackIndex
for the queue, so in this case I can pass a index to the player, I expect it to play the audio from the selected index, not the first one. So the UI and audio will load consistently. Is that possible or is there a workaround for this case? Any suggestion is appreciated.PS: I know I can use
load(track)
to load the selected song, but I need to play songs in a queue, if useload(track)
I need to handle the switch logic, usesetQueue(tracks)
andskipToNext, skipToPrevious
functions is more convenient.Beta Was this translation helpful? Give feedback.
All reactions