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] getPlaylist Option #79

Open
ghenry22 opened this issue Sep 13, 2023 · 4 comments
Open

[feature] getPlaylist Option #79

ghenry22 opened this issue Sep 13, 2023 · 4 comments

Comments

@ghenry22
Copy link
Contributor

Is there a way to get the current playlist? We can get the current item and current position but there doesn't seem to be a way to get the full playlist.

@ghenry22 ghenry22 changed the title getPlaylist Option [feature] getPlaylist Option Sep 14, 2023
@jaagitteam
Copy link

hi, how you can get current item and current position? i tried number of things but it is not working for me.

@PavelShvets-dev
Copy link

hi, how you can get current item and current position? i tried number of things but it is not working for me.

hi, you need to listen status of your player instance and check event OnStatusTrackChangedData - here you'll find currentItem.

something like this:

audioPlayer.on("status", (statusCallback) => {
    if (undefined === statusCallback || undefined === statusCallback.value)
          return;
    if ("currentItem" in statusCallback.value) {
         // get current item from statusCallback.value.currentItem
    }
})

@PavelShvets-dev
Copy link

Is there a way to get the current playlist? We can get the current item and current position but there doesn't seem to be a way to get the full playlist.

Currently there is no way to extract the full list of items from your instance. The only way is to store it some where in your global variables.

@phiamo
Copy link
Owner

phiamo commented Nov 14, 2023 via email

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

4 participants