Add support for oneboxing twitter videos

This commit is contained in:
David Taylor 2017-03-17 20:49:29 +00:00
parent ea45cc1293
commit 89d41ecb39
1 changed files with 4 additions and 0 deletions

View File

@ -22,6 +22,10 @@ class TwitterApi
if large = m['sizes']['large']
result << "<img class='tweet-image' src='#{m['media_url_https']}' width='#{large['w']}' height='#{large['h']}'>"
end
elsif m['type'] == 'video'
if large = m['sizes']['large']
result << "<iframe class='tweet-video' src='https://twitter.com/i/videos/#{tweet['id_str']}' width='#{large['w']}' height='#{large['h']}' frameborder='0'></iframe>"
end
end
end
result << "</div>"