Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Call an iframe's function based on YouTube player status

    On my website I have an embedded YouTube player on one of my top page slides. When the video status is 'playing', I want to target an iframe within my page and call a function in it. This unfortunately isn't working either on its own.

    document.getElementById('player').contentWindow.pauseS();

    When the YouTube player is paused or ends, I want to call a different function:

    document.getElementById('player').contentWindow.playS();
    How can I script this? I've included a jsfiddle:

    http://jsfiddle.net/tqub3/

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •