angular-soundmanager2
angular-soundmanager2 copied to clipboard
Problem while updating playlist
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.
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.