Skip to content

Commit

Permalink
fix(ios): apply cropStart when in repeat mode (#3525)
Browse files Browse the repository at this point in the history
  • Loading branch information
KrzysztofMoch authored Feb 8, 2024
1 parent 9306d9a commit 2c0e009
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ios/Video/RCTVideo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,8 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
#endif
if _repeat {
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()
} else {
self.setPaused(true)
Expand Down

0 comments on commit 2c0e009

Please sign in to comment.