Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Adding ability to specify URL options to the html5 embed

  • Loading branch information...
commit 0aa2738a595d2a173ce9131e6d2c7a8489ae337d 1 parent 7e6cce0
Michael Bianco iloveitaly authored

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. +3 2 lib/youtube_it/model/video.rb
5 lib/youtube_it/model/video.rb
@@ -202,10 +202,11 @@ def embed_html5(params = {})
202 202 :id => params[:id] || "",
203 203 :width => params[:width] || "425",
204 204 :height => params[:height] || "350",
205   - :frameborder => params[:frameborder] || "0"
  205 + :frameborder => params[:frameborder] || "0",
  206 + :url_params => params[:url_params] || {}
206 207 }
207 208 <<EDOC
208   -<iframe class="#{opts[:class]}" id="#{opts[:id]}" type="text/html" width="#{opts[:width]}" height="#{opts[:height]}" src="http://www.youtube.com/embed/#{unique_id}" frameborder="#{opts[:frameborder]}"></iframe>
  209 +<iframe class="#{opts[:class]}" id="#{opts[:id]}" type="text/html" width="#{opts[:width]}" height="#{opts[:height]}" src="http://www.youtube.com/embed/#{unique_id}?#{Rack::Utils::build_query(opts[:url_params])}" frameborder="#{opts[:frameborder]}"></iframe>
209 210 EDOC
210 211 end
211 212

0 comments on commit 0aa2738

Please sign in to comment.
Something went wrong with that request. Please try again.