fix(ios): apply cropStart when in repeat mode (#3525)

This commit is contained in:
Krzysztof Moch 2024-02-08 14:59:33 +01:00 committed by GitHub
parent 9306d9a15d
commit 2c0e009876
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1363,7 +1363,8 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
#endif #endif
if _repeat { if _repeat {
let item: AVPlayerItem! = notification.object as? AVPlayerItem let item: AVPlayerItem! = notification.object as? AVPlayerItem
item.seek(to: CMTime.zero, completionHandler: nil)
item.seek(to: _source?.cropStart != nil ? CMTime(value: _source!.cropStart!, timescale: 1000) : CMTime.zero, completionHandler: nil)
self.applyModifiers() self.applyModifiers()
} else { } else {
self.setPaused(true) self.setPaused(true)