webrtc-sdk / webrtc

BSD 3-Clause "New" or "Revised" License
225 stars 89 forks source link

Use `UIInterfaceOrientation` instead of `UIDeviceOrientation` for `RTCVideoFrame`'s rotation #92

Closed hiroshihorie closed 1 year ago

hiroshihorie commented 1 year ago

UIDeviceOrientation contains states such as .faceUp, .faceDown which are not ideal for determining capture rotation and causes undefined behavior. This patch will use interface orientation instead. Especially when the interface rotation is locked (by user) it had an undesirable behavior.

Also fixes issue : https://github.com/livekit/client-sdk-swift/issues/146