Skip to content

Commit

Permalink
Smoothing of initialization process.
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo4405 committed Dec 19, 2023
1 parent f7501b3 commit 7e2252e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Sources/IO/IOStream.swift
Original file line number Diff line number Diff line change
Expand Up @@ -278,16 +278,16 @@ open class IOStream: NSObject {
/// Specifies the drawable.
public var drawable: (any IOStreamDrawable)? {
get {
mixer.videoIO.drawable
lockQueue.sync { mixer.videoIO.drawable }
}
set {
mixer.videoIO.drawable = newValue
guard #available(tvOS 17.0, *) else {
return
}
lockQueue.async {
self.mixer.videoIO.drawable = newValue
guard #available(tvOS 17.0, *) else {
return
}
#if os(iOS) || os(tvOS) || os(macOS)
if self.mixer.videoIO.hasDevice {
if newValue != nil && self.mixer.videoIO.hasDevice {
self.mixer.session.startRunning()
}
#endif
Expand Down

0 comments on commit 7e2252e

Please sign in to comment.