We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8017361 commit 080ee32Copy full SHA for 080ee32
Sources/swiftui-loop-videoplayer/view/loop/main/LoopPlayerMultiPlatform.swift
@@ -97,7 +97,13 @@ extension LoopPlayerMultiPlatform: UIViewRepresentable{
97
/// - context: The context for the view
98
@MainActor func updateUIView(_ uiView: UIView, context: Context) {
99
uiView.subviews.filter { $0 is ErrorView }.forEach { $0.removeFromSuperview() }
100
- uiView.subviews.compactMap{ $0 as? LoopingPlayerProtocol }.forEach { $0.setCommand(command) }
+ uiView.subviews.compactMap{ $0 as? LoopingPlayerProtocol }.forEach {
101
+ if let asset = getAssetIfChanged(settings: settings, asset: $0.currentAsset){
102
+ $0.update(asset: asset)
103
+ }else{
104
+ $0.setCommand(command)
105
+ }
106
107
108
updateView(uiView, error: error)
109
}
0 commit comments