Skip to content

Commit

Permalink
handler の実行タイミングを調整
Browse files Browse the repository at this point in the history
  • Loading branch information
zztkm committed Oct 8, 2024
1 parent 351d863 commit 8f57757
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sora/VideoView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,14 @@ public class VideoView: UIView {
*/
public func clear() {
if !isRendering {
handlers.onClear?()
DispatchQueue.main.async {
if let bgView = self.backgroundView {
self.bringSubviewToFront(bgView)
} else {
self.bringSubviewToFront(self.defaultBackgroundView)
}
}
handlers.onClear?()
}
}

Expand All @@ -190,11 +190,11 @@ public class VideoView: UIView {
*/
public func start() {
if !isRendering {
handlers.onStart?()
DispatchQueue.main.async {
self.bringSubviewToFront(self.contentView)
self.isRendering = true
}
handlers.onStart?()
}
}

Expand Down

0 comments on commit 8f57757

Please sign in to comment.