I get asked a lot about the video in the header of skin 6 on our Mingle demo site. The code couldn’t be pasted into the ThemeForest comments or FAQs so I was emailing upon request. Well, now that we have this great help site it only makes sense to share this code with everyone:
Below is the code used for the skin 6 video header. This was entered into a “Top Graphic” (not slide show) area:
<div style="margin: -20px; height: 445px; overflow: hidden;">
<div onclick="jQuery('#DemoVideoHeader').append('<iframe width=990 height=587 src=http://www.youtube.com/embed/B7UmUX68KtE?rel=0&hd=1&autoplay=1&wmode=Opaque&frameborder=0></iframe>').css('display','block'); this.style.display='none'">
<img src="YourVideoImageHere.jpg" style="cursor:pointer" />
</div>
<div style="display:none" id="DemoVideoHeader"></div>
</div>
http://pastebin.com/i0stUkVU
The following pieces of the code need to be changed for your site.
1. The video URL:
http://www.youtube.com/embed/
B7UmUX68KtE?rel=0&hd=1&autoplay=1&wmode=Opaque
In the example code you will find the iframe with this “src”. You can copy your URL or just replace the video ID bolded above.
2. The height of the main DIV and the video:
The height relates directly to getting the overlay curve at the bottom to cover the player controls. The sample code has these heights. DIV container “height: 445px;
” and video iframe “height=587
“. Setting the height of the dive container slightly shorter than the video is what lets the curve cover the controls.
3. The placeholder image.
Videos on YouTube have really low resolution thumbnails that show before the video plays. To deal with this a large image is shown before the video and when clicked it is hidden and the video immediately show. It happens too fast for you to see it but that’s what happens.
You need to update this video to one of your own. In the example we have the following fake image:
<img src="YourVideoImageHere.jpg" style="cursor:pointer" />
Change that to your own image on your server and you’re done.