WordPress.org

Support

Support » Plugins and Hacks » mb.YTPlayer for background videos » [Resolved] multiple videos

[Resolved] multiple videos

  • first off, great plugin, easy to use, looks amazing.
    I was just wondering about implementing multiple videos, such as in the ‘demo’.
    I would love to be able to select which one was playing, as in the demo, creating a playlist of sorts (just with simple text links).
    I looked at the demo source code but am rather novice when it comes to javascript (and implementing it in wordpress).
    any help would be muchly appreciated, or any links to tutorials on how to do this.
    thanks

    http://wordpress.org/extend/plugins/wpmbytplayer/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author pupunzi

    @pupunzi

    Hi,
    At the time the WP version doesn’t have this feature implemented although it supports the method.

    The method you have to use to change the background video is:

    $('[bkgnd video ID]').changeMovie('[YT video url]');

    So, if you are using the YTPlayer for the frontpage you can add a link in the content like that:

    <a href="#" onclick="$('#bgndVideo_home').changeMovie('[YT video url]')"> new video </a>

    Bye,
    Matteo

    Hi,

    First of all thank you for this great plugin.

    I would like to to the same as mr_dw above, but when I tried to post your link code into html editor on page, clicking link does nothing.

    Do I need some plugin or special approach to paste such link with onclick atribute to make it work on page?

    Cheers,
    Michal

    Plugin Author pupunzi

    @pupunzi

    Hi,
    Sorry, the right syntax on wordpress is:

    <a href="javascript:void(0)" onclick="jQuery('#bgndVideo_home').changeMovie('[YT video url]')"> new video </a>

    The $ is not applicable to prevent cross library conflicts.

    Bye,
    Matteo

    Thanks for your support Matteo. I managed to make it work using your hint – I had to change only the div ID, so the code looked like:

    <a href="#" onclick="jQuery('#bgndVideo1').changeMovie('https://www.youtube.com/watch?v=xxxxxxxxxxx')"> new video </a>

    Thanks once again!
    Michal

    Plugin Author pupunzi

    @pupunzi

    Ok, That because your video has been inserted using the short code in the page editor; This case the DIV id is different as you can have more than one video per page (f.e.: one as background and one as in line player).

    Bye

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] multiple videos’ is closed to new replies.
Skip to toolbar