Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This function is run from onload in the body tag vlc is my embed tag and vlc2 is my object tag
- function addListen() {
- //use php to see if the user has IE or Other
- <?php if (ae_detect_ie()) { ?>
- //If IE run this code
- vlc2.attachEvent('MediaPlayerEndReached', function listen() {
- if(document.getElementById("btn").value == "Loop: p" + unescape("%E5")){
- console.log("point A");
- vlc2.playlist.play();
- document.getElementById("counter").innerHTML = parseInt(document.getElementById("counter").innerHTML) + 1;
- }
- });
- <?php } else { ?>
- //If not IE run this code
- vlc.addEventListener('MediaPlayerEndReached', function listenn() {
- if(document.getElementById("btn").value == "Loop: p" + unescape("%E5")){
- console.log("point B");
- vlc.playlist.play();
- document.getElementById("counter").innerHTML = parseInt(document.getElementById("counter").innerHTML) + 1;
- }
- }, false);
- <?php } ?>
- }
Advertisement
Add Comment
Please, Sign In to add comment