livekit / client-sdk-swift

LiveKit Swift Client SDK. Easily build live audio or video experiences on iOS, macOS, tvOS, and visionOS.
https://livekit.io
Apache License 2.0
197 stars 97 forks source link

Synchronous VideoView internal state #348

Closed hiroshihorie closed 7 months ago

hiroshihorie commented 7 months ago

Update VideoView's internal state synchronously so properties such as avSampleBufferDisplayLayer can be accessed immediately.

hiroshihorie commented 7 months ago

If I enforce all properties of VideoView to be accessed from main thread, I can simplify a lot of internal code. UI components, inheriting from UIView should always be accessed from main thread, so it should be ok. But I wonder if I make the change, how will it affect current users.

If current users are using VideoView correctly from main thread, nothing will break.