rosaage

vlc looping

Mar 15th, 2014
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //This function is run from onload in the body tag   vlc is my embed tag and vlc2 is my object tag
  2. function addListen() {
  3.                 //use php to see if the user has IE or Other
  4.                 <?php  if (ae_detect_ie()) {  ?>
  5.                 //If IE run this code
  6.                 vlc2.attachEvent('MediaPlayerEndReached', function listen() {
  7.                     if(document.getElementById("btn").value == "Loop: p" + unescape("%E5")){
  8.                         console.log("point A");
  9.                         vlc2.playlist.play();
  10.                         document.getElementById("counter").innerHTML = parseInt(document.getElementById("counter").innerHTML) + 1;
  11.                     }
  12.                 });
  13.                 <?php } else {  ?>
  14.                 //If not IE run this code
  15.                 vlc.addEventListener('MediaPlayerEndReached', function listenn() {
  16.                     if(document.getElementById("btn").value == "Loop: p" + unescape("%E5")){
  17.                         console.log("point B");
  18.                         vlc.playlist.play();
  19.                         document.getElementById("counter").innerHTML = parseInt(document.getElementById("counter").innerHTML) + 1;
  20.                     }
  21.                 }, false);
  22.                 <?php }  ?>
  23.             }
Advertisement
Add Comment
Please, Sign In to add comment