mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 03:09:43 +00:00
FIX: Add support for multiple TikTok aspect ratios (#20064)
This commit is contained in:
parent
06ad13b517
commit
aecd8b1eff
@ -23,7 +23,8 @@ module Onebox
|
|||||||
end
|
end
|
||||||
|
|
||||||
def to_html
|
def to_html
|
||||||
height = oembed_data.thumbnail_width >= oembed_data.thumbnail_height ? 727 : 742
|
video_height = oembed_data.thumbnail_height < 1024 ? 998 : oembed_data.thumbnail_height
|
||||||
|
height = (323.0 / 576) * video_height
|
||||||
|
|
||||||
<<-HTML
|
<<-HTML
|
||||||
<iframe
|
<iframe
|
||||||
@ -34,11 +35,12 @@ module Onebox
|
|||||||
seamless="seamless"
|
seamless="seamless"
|
||||||
scrolling="no"
|
scrolling="no"
|
||||||
style="
|
style="
|
||||||
min-width: 332px;
|
min-width: 323px;
|
||||||
height: #{height}px;
|
height: #{height}px;
|
||||||
|
border: 4px solid #fff;
|
||||||
border-top: 3px solid #fff;
|
border-top: 3px solid #fff;
|
||||||
border-radius: 9px;
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
border-radius: 9px;
|
||||||
"
|
"
|
||||||
></iframe>
|
></iframe>
|
||||||
HTML
|
HTML
|
||||||
|
Loading…
x
Reference in New Issue
Block a user