Video html embed with dynamic aspect ratios

Hi to anyone concerned with loading video embeds through collections!

I’m loading several vimeo hosted videos through a collection to a html embed. And the videos all have different aspect ratios. Does anyone know if it is possible to get the aspect ratio of the loaded video to properly set the size of the video container? I’m at a loss!

Thank you!