WordPress.org

Ready to get started?Download WordPress

Forums

WP YouTube Lyte
[resolved] pause playback (6 posts)

  1. hansford77
    Member
    Posted 1 year ago #

    Hi, I would like to be able to pause playback of the video from jquery. Is this possible?

    http://wordpress.org/extend/plugins/wp-youtube-lyte/

  2. futtta
    Member
    Plugin Author

    Posted 1 year ago #

    I suppose that, if the lyte-embed got loaded with enablejsapi=1 (cfr. faq), it should be possible to tie into it with jquery, but I don't really know how, to be honest.

    Hope this helps nonetheless!

  3. hansford77
    Member
    Posted 1 year ago #

    Thanks, I'll investigate further! On a related note, do you know how to reinitialise the plugin from jquery? as I need to do this after using quicksand.

  4. futtta
    Member
    Plugin Author

    Posted 1 year ago #

    you can reinitialise by issuing ly.te()

  5. hansford77
    Member
    Posted 1 year ago #

    Thanks for that. In case anyone else has the same problem, there is a slight issue in that sometimes d (document) is overwritten (either by quicksand or the reinitalisation), and the plugin stops working. I copied d=document into ly.te and it's fine now.

  6. futtta
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for that last point. It is nteresting, as I (incorrectly, apperantly) supposed 'd' was protected as it was defined in a closure.

    Anyway, instead of re-defining d, could you try if changing line 2 solves the bug as well;

    d = document;
    into
    var d = document;

    I would expect that to fix the problem as well (and it's ... cleaner :-) )

    I'll include this small tweak in 1.2.0 if it turns out OK.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.