From d5d0e0f51ac7807db42dc90609962921e792ce62 Mon Sep 17 00:00:00 2001 From: Todd Anderson Date: Thu, 12 May 2022 13:56:55 -0400 Subject: [PATCH] Switching from willEnterForegroundNotification to didBecomeActiveNotification for resume notification. --- .../ios/Red5ProVideoViewExample.xcodeproj/project.pbxproj | 2 ++ .../ios/Red5ProVideoViewExample/Info.plist | 4 ++-- ios/R5VideoView/R5VideoView/R5StreamPublisher.m | 4 ++-- ios/R5VideoView/R5VideoView/R5StreamSubscriber.m | 4 ++-- ios/R5VideoView/R5VideoView/R5VideoView.m | 4 ++-- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/example/Red5ProVideoViewExample/ios/Red5ProVideoViewExample.xcodeproj/project.pbxproj b/example/Red5ProVideoViewExample/ios/Red5ProVideoViewExample.xcodeproj/project.pbxproj index f780174..f3b25c8 100644 --- a/example/Red5ProVideoViewExample/ios/Red5ProVideoViewExample.xcodeproj/project.pbxproj +++ b/example/Red5ProVideoViewExample/ios/Red5ProVideoViewExample.xcodeproj/project.pbxproj @@ -471,6 +471,7 @@ FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/Red5ProVideoViewExample/Frameworks\""; INFOPLIST_FILE = Red5ProVideoViewExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 10.0.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -493,6 +494,7 @@ FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/Red5ProVideoViewExample/Frameworks\""; INFOPLIST_FILE = Red5ProVideoViewExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 10.0.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", diff --git a/example/Red5ProVideoViewExample/ios/Red5ProVideoViewExample/Info.plist b/example/Red5ProVideoViewExample/ios/Red5ProVideoViewExample/Info.plist index ed7ce91..10d31e2 100644 --- a/example/Red5ProVideoViewExample/ios/Red5ProVideoViewExample/Info.plist +++ b/example/Red5ProVideoViewExample/ios/Red5ProVideoViewExample/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0 + $(MARKETING_VERSION) CFBundleSignature ???? CFBundleVersion @@ -40,7 +40,7 @@ NSCameraUsageDescription Red5 Pro Requires Camera for Broadcast. NSLocationWhenInUseUsageDescription - + NSMicrophoneUsageDescription Red5 Pro Requires Microphone for Broadcast. UIAppFonts diff --git a/ios/R5VideoView/R5VideoView/R5StreamPublisher.m b/ios/R5VideoView/R5VideoView/R5StreamPublisher.m index 6982c46..a0ab02f 100644 --- a/ios/R5VideoView/R5VideoView/R5StreamPublisher.m +++ b/ios/R5VideoView/R5VideoView/R5StreamPublisher.m @@ -74,14 +74,14 @@ -(void)stopObserving { - (void)addObservers { [self startObserving]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onWillResignActive:) name:UIApplicationWillResignActiveNotification object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onEnterForegroundActive:) name:UIApplicationWillEnterForegroundNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onEnterForegroundActive:) name:UIApplicationDidBecomeActiveNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onDeviceOrientation:) name:UIDeviceOrientationDidChangeNotification object:nil]; } - (void)removeObservers { [self stopObserving]; [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillResignActiveNotification object:nil]; - [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillEnterForegroundNotification object:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidBecomeActiveNotification object:nil]; [[NSNotificationCenter defaultCenter] removeObserver:self name:UIDeviceOrientationDidChangeNotification object:nil]; } diff --git a/ios/R5VideoView/R5VideoView/R5StreamSubscriber.m b/ios/R5VideoView/R5VideoView/R5StreamSubscriber.m index bbb23c7..f9e1879 100644 --- a/ios/R5VideoView/R5VideoView/R5StreamSubscriber.m +++ b/ios/R5VideoView/R5VideoView/R5StreamSubscriber.m @@ -55,13 +55,13 @@ -(void)stopObserving { - (void)addObservers { [self startObserving]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onWillResignActive:) name:UIApplicationWillResignActiveNotification object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onEnterForegroundActive:) name:UIApplicationWillEnterForegroundNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onEnterForegroundActive:) name:UIApplicationDidBecomeActiveNotification object:nil]; } - (void)removeObservers { [self stopObserving]; [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillResignActiveNotification object:nil]; - [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillEnterForegroundNotification object:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidBecomeActiveNotification object:nil]; } - (void)unpackProps:(NSDictionary *)props { diff --git a/ios/R5VideoView/R5VideoView/R5VideoView.m b/ios/R5VideoView/R5VideoView/R5VideoView.m index e0703ea..4ff23ec 100644 --- a/ios/R5VideoView/R5VideoView/R5VideoView.m +++ b/ios/R5VideoView/R5VideoView/R5VideoView.m @@ -85,12 +85,12 @@ - (void)onEnterForegroundActive:(NSNotification *)notification { - (void)addObservers { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onWillResignActive:) name:UIApplicationWillResignActiveNotification object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onEnterForegroundActive:) name:UIApplicationWillEnterForegroundNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onEnterForegroundActive:) name:UIApplicationDidBecomeActiveNotification object:nil]; } - (void)removeObservers { [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillResignActiveNotification object:nil]; - [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillEnterForegroundNotification object:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidBecomeActiveNotification object:nil]; } - (void)loadConfiguration:(R5Configuration *)configuration forKey:(NSString *)key andAttach:(BOOL)autoAttach {