Fix the rare cases that WebImage will lost animation when visibility changes. Always setup player to play as defaults to avoid this.
This commit is contained in:
parent
d0afa1ce35
commit
69413ec0ee
|
@ -82,12 +82,7 @@ public final class ImagePlayer : ObservableObject {
|
|||
|
||||
self.player = imagePlayer
|
||||
|
||||
// Setup poster frame
|
||||
if let cgImage = animatedImage.cgImage {
|
||||
currentFrame = PlatformImage(cgImage: cgImage, scale: animatedImage.scale, orientation: .up)
|
||||
} else {
|
||||
currentFrame = .empty
|
||||
}
|
||||
imagePlayer.startPlaying()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue