From 7608409fdbaffdad9b77e2442fcdf26976f3cf2f Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Tue, 26 May 2015 18:03:50 +0530 Subject: [PATCH] UX: allow youtube embed width and height to be passed as param --- plugins/lazyYT/plugin.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/lazyYT/plugin.rb b/plugins/lazyYT/plugin.rb index 7a9b8fc2a28..866765e7e6f 100644 --- a/plugins/lazyYT/plugin.rb +++ b/plugins/lazyYT/plugin.rb @@ -17,8 +17,11 @@ class Onebox::Engine::YoutubeOnebox def to_html if video_id + video_width = (params['width'] && params['width'].to_i <= 695) ? params['width'] : 480 # embed width + video_height = (params['height'] && params['height'].to_i <= 500) ? params['height'] : 270 # embed height + # Put in the LazyYT div instead of the iframe - "
" + "
" else super end