WordPress.org

Forums

mb.YTPlayer for background videos
[resolved] Video as background of element Not body (4 posts)

  1. andresgh
    Member
    Posted 2 years ago #

    Hello,

    I have been trying to figure out how to add a YouTube video as the background of a div not the body. I took a look at your repo but didn't figure out how to make your example work in the wordpress verion. I also tried using the shortdcode but didn't work.

    Is there a way to add the video as the background of a div(element)?

    Thank You.

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

  2. pupunzi
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,
    Yes but at the moment there's a bug that let you use this feature only if the actual page is neither the Home or the front page...

    If you try including this on any other page you'll see the video inside the div:

    [mbYTPlayer url="http://www.youtube.com/watch?v=V2rifmjZuKQ" id="videoInPlace" opacity="1" ratio="4/3" quality="default" showcontrols="true" mute="false" loop="false" addraster="false"]
    <div id="videoInPlace" style="width: 100%; height: 350px;"></div>

    I'll solve this problem for the next release.
    Bye,
    Matteo

  3. andresgh
    Member
    Posted 2 years ago #

    Hello I was able to use the video as a background of an element in the home page by using

    <a id="bgndVideo" href="http://www.youtube.com/watch?v=ScNNfyq3d_w" class="movie {opacity:1, isBgndMovie:{width:460,mute:true}, ID:'control',showControls:'true', ratio:'16/9',quality:'default'}"></a>

    the only place I can't get it to work in is mobile devices, my biggest target in mobile is iPad 3, is this the bug you were talking about?

    If not is there a way to make it work in mobile devices?

  4. pupunzi
    Member
    Plugin Author

    Posted 2 years ago #

    Targeting video background to a mobile device is almost impossible at the moment, not only because flash is not available on iOs devices (I'm working on to use HTML5 to embed the YT player) but also because they don't allow auto-play for video and audio.
    Once it will became possible I'll implement it on this plugin.

    Using the player in elements could work on the iPad; but not at the moment as the plug-in is using the YT flash player API to show videos.

    Bye,
    Matteo

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic