Same family of bug, seen from the recording side, on iOS 26.6. The front camera track reports the sensor buffer
(1920x1080) whatever way the phone is held, and neither getSettings() nor screen.orientation will tell you how the
frame is actually drawn, which matches what you are seeing with screen.orientation stuck on portrait-primary in home
screen apps. What worked for me was to stop asking the APIs and measure the picture: draw one frame of the video
element onto a 16 by 16 canvas scaled from the larger reported dimension, and check which corner has paint. Bottom
left painted and top right not means the frame is tall. From that you can rotate the preview yourself, or in my case
decide whether to record the raw track or a canvas of the drawn frame. Write-up with the dead ends:
https://dev.to/lagudafuad/why-your-web-teleprompter-records-sideways-on-iphone-and-the-fix-549m and the code, MIT:
https://github.com/lagudafuadtosin/web-teleprompter (src/lib/camera.ts). The recorded-file half of this is WebKit bug
323550, which Apple has triaged as a regression, and my own thread here is 844826.