Call receiveVideo
This commit is contained in:
parent
2613b79eb6
commit
7bf21be246
|
@ -66,6 +66,8 @@ final class LiveViewController: UIViewController {
|
|||
audioBitrateSlider?.value = Float(RTMPStream.defaultAudioBitrate) / 1024
|
||||
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(on(_:)), name: UIDevice.orientationDidChangeNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(didEnterBackground(_:)), name: UIApplication.didEnterBackgroundNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(didBecomeActive(_:)), name: UIApplication.didBecomeActiveNotification, object: nil)
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
|
@ -221,6 +223,16 @@ final class LiveViewController: UIViewController {
|
|||
rtmpStream.orientation = orientation
|
||||
}
|
||||
|
||||
@objc
|
||||
private func didEnterBackground(_ notification: Notification) {
|
||||
// rtmpStream.receiveVideo = false
|
||||
}
|
||||
|
||||
@objc
|
||||
private func didBecomeActive(_ notification: Notification) {
|
||||
// rtmpStream.receiveVideo = true
|
||||
}
|
||||
|
||||
override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?) {
|
||||
if Thread.isMainThread {
|
||||
currentFPSLabel?.text = "\(rtmpStream.currentFPS)"
|
||||
|
|
Loading…
Reference in New Issue