Created
January 28, 2013 17:35
-
-
Save ramnathv/4657442 to your computer and use it in GitHub Desktop.
Embed Youtube Videos as iFrame
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
embed_youtube <- function(video_id){ | |
sprintf('<iframe width="1280" height="720" src="http://www.youtube.com/embed/%s" frameborder="0" | |
allowfullscreen style="background-image:url(http://img.youtube.com/vi/%s/0.jpg)"></iframe>', video_id, video_id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment