livekit / client-sdk-swift

LiveKit Swift Client SDK. Easily build live audio or video experiences into your mobile app, game or website.
https://livekit.io
Apache License 2.0
174 stars 84 forks source link

[Mac Catalyst] Incorrect video rotation #343

Closed hiroshihorie closed 2 weeks ago

hiroshihorie commented 4 months ago

Describe the bug Video appears 90 degrees rotated incorrectly.

I think some logic in WebRTC's RTCCameraCapturer that determines rotation works differently somehow for catalyst, so I need to make a patch in WebRTC.

SDK Version v2.0.4

iOS/macOS Version Any supported version

Steps to Reproduce Publish local track

Expected behavior Correct rotation

Related: #340

rdougan commented 1 month ago

Do you have the best way to work around this? VideoView has rotationOverride, but that will still stream the rotated video, so other clients have to also handle that.

hiroshihorie commented 1 month ago

Do you also see this with Mac Catalyst ?

rdougan commented 1 month ago

Yeah, I see the rotation issue on Mac Catalyst. You can fix the rotation by using rotation override. However on the client, you have to then detect the rotation issue and fix it in there as well. In my case, the client is JS and I’m using css to transform the video element.

hiroshihorie commented 2 weeks ago

I think this will fix it: https://github.com/webrtc-sdk/webrtc/pull/126

hiroshihorie commented 2 weeks ago

Merged in main and will be in next release