Skip to content

Commit 4fe483d

Browse files
committed
Only set _isBuffering = true if newValue is also true
1 parent 987be4b commit 4fe483d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ios/Video/RCTVideo.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,8 +1604,8 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
16041604
)
16051605
}
16061606

1607-
func handlePlaybackBufferKeyEmpty(playerItem _: AVPlayerItem, change _: NSKeyValueObservedChange<Bool>) {
1608-
if !_isBuffering {
1607+
func handlePlaybackBufferKeyEmpty(playerItem _: AVPlayerItem, change: NSKeyValueObservedChange<Bool>) {
1608+
if !_isBuffering && change.newValue == true {
16091609
_isBuffering = true
16101610
}
16111611
}

0 commit comments

Comments
 (0)