Advertisement
Guest User

Untitled

a guest
Oct 6th, 2015
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. var playlength = myplaylist.playlist.length
  2. var currentSong = 0;
  3.  
  4.  
  5. $("#jpId").jPlayer( {
  6. ready: function() { // The $.jPlayer.event.ready event
  7. $(this).jPlayer("setMedia", { // Set the media
  8. m4v: "m4v/presentation.m4v"
  9. }).jPlayer("play"); // Attempt to auto play the media
  10. },
  11. ended: function() { // The $.jPlayer.event.ended event
  12. currentSong++;
  13. if(currentSong==playlength)
  14. ------> Show your html
  15. },
  16. supplied: "m4v"
  17. );
  18.  
  19. var currentSong = 0;
  20. $("#music").bind($.jPlayer.event.ended,function(event){
  21. currentSong++;
  22. if(myplaylist.playlist.length == currentSong) {
  23. $('.show').html('Ended');
  24. }
  25. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement