Onebox Twitter embedding

Yes, we can do that. This is the line where we build the iframe

What HTML structure would be most useful for you @awesomerobot? Something like

<div class='tweet-images'>
  <div class='aspect-image-full-size' style='--aspect-ratio:#{width}/#{height};'/>
    <iframe class='tweet-video' src='https://twitter.com/i/videos/blah' width='123' height='456' frameborder='0' allowfullscreen></iframe>
  </div>
</div>

And then we can re-use the aspect-image-full-size logic which we use for images?

1 Like