Skip to content

Instantly share code, notes, and snippets.

@PoTHuYJoHN
Created July 10, 2013 09:52
Show Gist options
  • Save PoTHuYJoHN/5965045 to your computer and use it in GitHub Desktop.
Save PoTHuYJoHN/5965045 to your computer and use it in GitHub Desktop.
Video via iframe using Youtube and Vimeo
//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&amp;byline=0&amp;portrait=0&amp;color=35a1cc&amp;autoplay=1&amp;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