Created
July 10, 2013 09:52
-
-
Save PoTHuYJoHN/5965045 to your computer and use it in GitHub Desktop.
Video via iframe using Youtube and Vimeo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//VIMEO | |
var html = $('<iframe>', { | |
src: $this.attr('href'), | |
width: 490, | |
height: 270, | |
frameborder: 0, | |
webkitAllowFullScreen : '', | |
mozallowfullscreen: '', | |
allowFullScreen : '' | |
}).appendTo(video.$screen); | |
<a class="video-outer" href="http://player.vimeo.com/video/<?= $item->note4 ?>?title=0&byline=0&portrait=0&color=35a1cc&autoplay=1&loop=1" onclick="return video.show(this);"> | |
<span class="play-icon"></span> | |
<span class="play-label"></span> | |
</a> | |
//YOUTUBE | |
var html = $('<iframe>', { | |
src: $this.attr('href'), | |
width: 490, | |
height: 270, | |
frameborder: 0, | |
scrolling: 'no', | |
wmode: 'opaque' | |
}).appendTo(video.$screen); | |
<a class="video-outer" href="http://www.youtube.com/embed/<?=$item->note4?>?autoplay=1&loop=1&playlist=<?=$item->note4?>&wmode=transparent" onclick="return video.show(this);"> | |
<span class="play-icon"></span> | |
<span class="play-label"></span> | |
</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment