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

Problem while updating playlist #60

Open
ghost opened this issue Nov 8, 2016 · 1 comment
Open

Problem while updating playlist #60

ghost opened this issue Nov 8, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 8, 2016

Hello, i am facing a problem when i update my playlist run time. what i need to do is load songs based on user preferences. when my current song is playing and i load new songs my current playing song stops in mobile. When i use clearPlaylist it doesnt work but if i remove songs from playlist then it works fine in web but song stops in mobile. I want to load new songs without halting the current playing song.
is there any way to start song from particular time ?? like play song from 1:10

here is my code ::

$timeout(function() {
angularPlayer.clearPlaylist(function(result){
angularPlayer.addTrack(song);
});
},0);

Please help.

@NevenLeung
Copy link

You can use the angular event to set this.

$rootScope.$broadcast('track:progress', trackProgress);

trackProgress is the number of played progress. The range of it is from 0 to 100. Calculate the progress number, and use the function above to set the position you want.

A better solution may be not clear the song playing, use removeSong() to remove other songs. When the song is finished, remove it later.

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

1 participant