Deprioritize Twitter card in generic onebox (PR #408)

We prefer to render our own video/image, rather than loading an iframe. For Facebook videos, the twitter card iframe contains an auto-playing video which is not user friendly. With this change, the facebook video will be displayed in a native <video> player, without autoplay.


I believe we should prefer card_html over article_html if has_text?. That is because card_html will be more interactive than simple title and description onebox.

Also note that now card_html will never be used because 99.9% of the sites that include twitter:card will always include twitter:title and twitter:description.

So the condition should become:

return article_html  if is_article?
return video_html    if is_video?
return image_html    if is_image?
return embedded_html if is_embedded?
return card_html     if is_card?
return article_html  if has_text?

Sure, I support that change @techAPJ

Done via: