fix(ios): fix onBandwidth update event (old ios api is deprecated and doens't work) (#4140)

This commit is contained in:
Olivier Bouillet
2024-09-03 15:33:43 +02:00
committed by GitHub
parent c51c061f43
commit d6bae3cd07
3 changed files with 9 additions and 3 deletions

View File

@@ -1661,7 +1661,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
}
guard let lastEvent = accessLog.events.last else { return }
onVideoBandwidthUpdate?(["bitrate": lastEvent.observedBitrate, "target": reactTag])
onVideoBandwidthUpdate?(["bitrate": lastEvent.indicatedBitrate, "target": reactTag])
}
func handleTracksChange(playerItem _: AVPlayerItem, change _: NSKeyValueObservedChange<[AVPlayerItemTrack]>) {