0

I am trying to embed the video from youtube for the intro page that will occupy the full screen using the wordpress core theme.

Here is the link for the demo of the template that i use :

http://themes.themegoods2.com/core/

If you go to home/Video background you will see the effect i want to have on my website.

Unfortunately, this is the effect that i get :

http://azurproductionvideo.com/intro/

I already tried all the solutions from the links below :

Embed youtube videos that play in fullscreen automatically

How to make a YouTube embedded video a full page width one?

http://avexdesigns.com/responsive-youtube-embed/

Full Width and Height Responsive Embedded YouTube Video

I would be very grateful for any suggestions or advice on how to fix this issue.

Thanks in advance for your help.

Community
  • 1
  • 1
mike
  • 313
  • 1
  • 4
  • 16

2 Answers2

1

I used this jquery plugin.

saved my youtube video id as a custom field.

then added this to my homepage

<script type="text/javascript">

    jQuery(function(){
        var homevideo = "<div id=\"bgndVideo_home\" data-property=\"{videoURL:'https://www.youtube.com/watch?v=<?php the_sub_field('video_id'); ?>', opacity:1, autoPlay:true, containment:'body', startAt:1, stopAt:0, mute:true, optimizeDisplay:true, showControls:false, printUrl:false, loop:true, addRaster:false, quality:'default', ratio:'16/9', realfullscreen:'true', stopMovieOnClick:'false', showYTLogo:'false', gaTrack:'false'}\"></div>";
        jQuery("body").prepend(homevideo);
        jQuery("#bgndVideo_home").mb_YTPlayer();
    });

    </script>

Here is the wordpress plugin for it

Moishy
  • 3,560
  • 3
  • 23
  • 42
  • Hello Mark, thank you in advance for your help can you explain me please how to add this plugin to wordpress – mike Jan 25 '16 at 20:31
1

No need to embed the youtube video inside the content of your page, the template author already explained that you just need to go to Core admin > Homepage and select youtube video background as homepage content

Mou
  • 451
  • 7
  • 14
  • thank you very much for your reply, this stuff doesn't work correctly or maybe i'm just doing something wrong. When i'm trying your solution the video is not in the middle of the screen – mike Jan 25 '16 at 20:19