feat: add onAdError event listener (#3381)
* feat: add onAdError event listener * feat: remove onAdError event listener and use already existing * feat: add ERROR event to docs
This commit is contained in:
committed by
GitHub
parent
4d9334b477
commit
596c02d2b3
@@ -146,7 +146,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
||||
name: UIApplication.willResignActiveNotification,
|
||||
object: nil
|
||||
)
|
||||
|
||||
|
||||
NotificationCenter.default.addObserver(
|
||||
self,
|
||||
selector: #selector(applicationDidBecomeActive(notification:)),
|
||||
@@ -1346,11 +1346,11 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
||||
_playerObserver.removePlayerTimeObserver()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@objc func handleAVPlayerAccess(notification:NSNotification!) {
|
||||
let accessLog:AVPlayerItemAccessLog! = (notification.object as! AVPlayerItem).accessLog()
|
||||
let lastEvent:AVPlayerItemAccessLogEvent! = accessLog.events.last
|
||||
|
||||
|
||||
onVideoBandwidthUpdate?(["bitrate": lastEvent.observedBitrate, "target": reactTag])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user