How to know video orientation to adjust container dimensions

I would like to adjust the width of my container based on whether the video is portrait or landscape, is there a way to know the orientation of a video it (even if just for videos shot on a phone) So I can dynamically adjust the css?

I need to know the orientation of uploaded or recorded videos, not what device orientation they are using at the moment. Basically if the width is greater than the height of the video

Thanks 

Hi Fadi Zananiri,

I think just do container dimensions ( auto ) instead of px or percentage.

Then container will be automatically adjust according video.

.Container {    width: auto;    height: auto ; }


Thanks

 

Thanks, but I need to know the orientation ahead of time because I need to control/fix the width of portrait videos so they do not run over the bottom of my screen. Any suggestion how?

Thanks, I need to know the orientation of uploaded or recorded videos, not what device orientation they are using at the moment. Basically if the width is greater than the height of the video

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.