mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FIX: switch to iframe when embedding YouTube playlist
This commit is contained in:
@ -17,7 +17,7 @@ class Onebox::Engine::YoutubeOnebox
|
|||||||
alias_method :yt_onebox_to_html, :to_html
|
alias_method :yt_onebox_to_html, :to_html
|
||||||
|
|
||||||
def to_html
|
def to_html
|
||||||
if video_id
|
if video_id && !params['list']
|
||||||
video_width = (params['width'] && params['width'].to_i <= 695) ? params['width'] : 480 # embed width
|
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
|
video_height = (params['height'] && params['height'].to_i <= 500) ? params['height'] : 270 # embed height
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user