Permalink
Browse files

Autoplay the video as user already clicked play

Make the YouTube video autoplay, considering that the user has already
clicked a play button
  • Loading branch information...
1 parent 8810181 commit c1ec58dbee8b9488d39fc80615d2d8ae4e946ff7 Xeross committed Dec 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 plugin/youtube.rb
View
@@ -76,7 +76,7 @@ def render(context)
@style = "width:100%;height:100%;background:#000 url(http://i2.ytimg.com/vi/#{@id}/0.jpg) center center no-repeat;background-size:contain;position:absolute"
- @emu = "http://www.youtube.com/embed/#{@id}"
+ @emu = "http://www.youtube.com/embed/#{@id}?autoplay=1"
@videoFrame = CGI.escapeHTML("<iframe style=\"vertical-align:top;width:100%;height:100%;position:absolute;\" src=\"#{@emu}\" frameborder=\"0\" allowfullscreen></iframe>")

0 comments on commit c1ec58d

Please sign in to comment.