fix(ios): set _isBuffering = true only if newValue is also true (#4532)

This commit is contained in:
Ben Winters
2025-05-10 10:46:18 -04:00
committed by GitHub
parent fc1e3f4fd1
commit 089e938aeb

View File

@@ -1604,8 +1604,8 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
)
}
func handlePlaybackBufferKeyEmpty(playerItem _: AVPlayerItem, change _: NSKeyValueObservedChange<Bool>) {
if !_isBuffering {
func handlePlaybackBufferKeyEmpty(playerItem _: AVPlayerItem, change: NSKeyValueObservedChange<Bool>) {
if !_isBuffering && change.newValue == true {
_isBuffering = true
}
}