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

Single Video Loop #44

Closed
DArmbrister opened this issue Apr 10, 2013 · 2 comments
Closed

Single Video Loop #44

DArmbrister opened this issue Apr 10, 2013 · 2 comments

Comments

@DArmbrister
Copy link

I can't find any looping functionality in the documentation. I am trying to implement a single video loop for a playlist. Ideally the video would loop until the user selected another video in the playlist.

If there is no looping capability, any suggestions on where to start on building one myself would be greatly appreciated.

Thanks in advance,
-David

@travist
Copy link
Collaborator

travist commented Apr 11, 2013

Currently, the way that looping occurs is if you are in a playlist, and there are more items to be played in the playlist, it will play through them, and then loop at the end. It sounds to me like you want it to loop over a single media within the playlist. If this is what you want, it will require some custom code, but it will probably look something like this...

I haven't tested this, but it should work in theory...

minplayer.get('playlist', function(playlist) {
  minplayer.get('player', function(player) {
    player.ubind(playlist.uuid + ':player_ended', function() {
      playlist.loadItem(playlist.currentItem);
    });
  });
});

@DArmbrister
Copy link
Author

Thank you for the help.

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

2 participants