1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Please HELP! How to call locker after clicking PLAY button...

Discussion in 'HTML & JavaScript' started by catwithhat, Nov 9, 2015.

  1. catwithhat

    catwithhat Jr. VIP Jr. VIP Premium Member

    Joined:
    Oct 6, 2010
    Messages:
    702
    Likes Received:
    514
    Location:
    Europe
    Hi!

    Its getting frustrating for me after 4 hours. I cant do it. :D

    Why its so easy to call locker after image click but video is so HARD! Can someone give me some instructions? I tried to hide PNG image over video and many other things. But I cant make it work.

    Please, if you know how to do it, give me some tips.

    Thanks a lot!
    cwh
     
  2. MrBlue

    MrBlue Senior Member

    Joined:
    Dec 18, 2009
    Messages:
    974
    Likes Received:
    680
    Occupation:
    Web/Bot Developer
    Can you paste the relevant code here?
     
  3. Porfoore

    Porfoore Newbie

    Joined:
    Nov 8, 2012
    Messages:
    19
    Likes Received:
    1
    Because the embedded video doesn't count like a part of your website (from coding side of view). You do not have the info (like the video play button id) to make such an if/when statement, on click event (or whatever). Even if you somehow manage to do it, your visitor could easily avoid the locker if he simply clicks on a full screen first.
    Your best solution is to lock the page right away, and make the video auto play as soon as page is opened. That way, the visitor will be able to see that there is the content he was looking for (which I guess was your primary goal) on your website, but it would still be locked. Visitor wont be able to enter the full screen or see the video properly (because of a locker), so he will probably do the offer. if he is interested in the content enough.
     
  4. revproxy

    revproxy BANNED BANNED Jr. VIP Premium Member

    Joined:
    Nov 20, 2015
    Messages:
    396
    Likes Received:
    100
    Gender:
    Male
    HTML:
    var v = document.getElementsByTagName("video")[0];
    v.addEventListener("play", function() { 
    // you code goes here
    });