Loads a playlist using the "onReady" method and including additional arguments to return to our function.

  1. <script>
  2.  
  3. // Set up a function to "ping" once the player
  4. // is set up and ready to be interacted with.
  5. function doit(playerHandle, arg1, arg2, arg3){
  6. // Set the playlist
  7. player.setPlaylist("../song1.mp3|../song2.mp3");
  8. alert("arg: " + arg1 + " arg2: " + arg2 + " arg3: " + arg3);
  9. }
  10.  
  11. // Create a new player, setting the "media" option
  12. // to "none" so no playlist will load at start up
  13. // (over-riding the automatic playlist feature).
  14.  
  15. var player = new wimpyPlayer({
  16. media : "none"
  17. });
  18.  
  19. // Setting the "onReady" to the "doit" function.
  20. // Once the player is ready, the "doit" function will execute.
  21. player.onReady(doit, "first", "second", "third");
  22.  
  23. </script>
giItT1WQy@!-/#