How to detect if home assistant run in browser or companion app

HI. I have a page in lovelace containing an stream from an webcam (resolution 720:480). What I want to do is to display as is in HA running in computer’s browser and, if it runs on companion app on smartphone to displaying rotated by 90 degree. How can I know if this card is displayed in companion/smartphone or in browser/computer ?

Thanks
Robert