question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to loop entire playlist?

See original GitHub issue

I’m adding the songs to player like this:

angularPlayer.clearPlaylist(function() {
    angular.forEach(serverItems, function(item) {
      angularPlayer.addTrack(item);
    });
    angularPlayer.play();
});

But at the end, after all played how to restart the playlist and keep it in loop?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
oliwincommented, Feb 5, 2017

As solution I suggest:

$scope.play = function (genre) {

    $timeout(function () {
        
        angularPlayer.stop();
        angularPlayer.setCurrentTrack(null);

        angularPlayer.clearPlaylist(function () {

            if (genre !== undefined) {
                $scope.filtered = filterFilter($scope.songs, {'genre': genre});

            } else {

                $scope.filtered = $scope.songs;
            }

            if (random) {
                $scope.filtered = $filter('shuffleArray')($scope.filtered);
            }

            if ($scope.filtered.length == 0) {
                console.log("No songs by genre " + genre);
            }

            angular.forEach($scope.filtered, function (value) {
                angularPlayer.addTrack(value);
            });

            angularPlayer.play();

        });

    });
};
0reactions
rochapablocommented, Feb 10, 2017

@oliwin,

The play() was a method that I was using in another way, you can keep using, but you’ll have to implement that.

The main problem was showing the current name, which we change frommusic:isPlaying to ```‘track:progress’`` plus some code inside.

I’m playing all the songs using the play-all directive.

I don’t know if you read, but for me this link had helped me a lot.

Good luck

Read more comments on GitHub >

github_iconTop Results From Across the Web

Loop videos or playlists on YouTube - Computer
1. Go to a video that's part of a playlist. · 2. On the right, expand the playlist. · 3. In the playlist...
Read more >
How to loop a YouTube Video or a Playlist - The Windows Club
Open the playlist you want to loop on YouTube · You will see the list of videos in the playlist on the right...
Read more >
How to Loop a YouTube Playlist for Repeat Play - TechSwift
Playlists on YouTube actually have a loop button built in, but it's pretty easy to miss. Here's how to loop an entire playlist...
Read more >
[2022 Newest] How to Loop a Video/Playlist on YouTube?
Create or reproduce the playlist you want to loop. · Start reproducing the YouTube playlist. You should notice a menu with all the...
Read more >
Youtube repeat - Easily loop Youtube videos - Listen to music ...
Youtube Repeater allows anyone to loop YouTube videos or timed sections of videos with just a few clicks of the mouse. Endlessly repeat...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found