fix: ensure poster works as expected and add it to the sample (#3643)
* fix: ensure poster works as expected and add it to the sample * chore: drop audioOnly property as not implemented on any platform * fix(ios): do not save pause state before seeking * fix(ts): onPlaybackRateChangeData was not correctly typed
This commit is contained in:
@@ -681,21 +681,18 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
||||
_pendingSeekTime = seekTime.floatValue
|
||||
return
|
||||
}
|
||||
let wasPaused = _paused
|
||||
|
||||
RCTPlayerOperations.seek(
|
||||
player: player,
|
||||
playerItem: item,
|
||||
paused: wasPaused,
|
||||
paused: _paused,
|
||||
seekTime: seekTime.floatValue,
|
||||
seekTolerance: seekTolerance.floatValue
|
||||
) { [weak self] (_: Bool) in
|
||||
guard let self else { return }
|
||||
|
||||
self._playerObserver.addTimeObserverIfNotSet()
|
||||
if !wasPaused {
|
||||
self.setPaused(false)
|
||||
}
|
||||
self.setPaused(_paused)
|
||||
self.onVideoSeek?(["currentTime": NSNumber(value: Float(CMTimeGetSeconds(item.currentTime()))),
|
||||
"seekTime": seekTime,
|
||||
"target": self.reactTag])
|
||||
|
Reference in New Issue
Block a user