diff --git a/android/src/main/java/com/jimi/rn/rtmp/JMRTMPPlayerManager.java b/android/src/main/java/com/jimi/rn/rtmp/JMRTMPPlayerManager.java index 25fd519..bc6f2ae 100644 --- a/android/src/main/java/com/jimi/rn/rtmp/JMRTMPPlayerManager.java +++ b/android/src/main/java/com/jimi/rn/rtmp/JMRTMPPlayerManager.java @@ -196,7 +196,7 @@ public void switchCamera(Boolean isFront, boolean autoPlay, Promise promise) { gJMVideoStreamPlayer.switchCamera(isFront, autoPlay, new JMSwitchCameraListener() { @Override public void onSwitchCameraHandler(boolean b, String s, long l, String s1) { - if (b && l == 0 && !TextUtils.isEmpty(s)) { + if (b && l == 0) { promise.resolve(s); } else { promise.reject(String.valueOf(l), s1 != null ? s1 : ""); diff --git a/ios/RNJimiRTMPPlayer/JMRTMPPlayerManager.m b/ios/RNJimiRTMPPlayer/JMRTMPPlayerManager.m index fe67818..c5f8c74 100644 --- a/ios/RNJimiRTMPPlayer/JMRTMPPlayerManager.m +++ b/ios/RNJimiRTMPPlayer/JMRTMPPlayerManager.m @@ -109,7 +109,7 @@ - (void)didJMSmartAppEngineExit RCT_EXPORT_METHOD(switchCamera:(BOOL)isFront autoPlay:(BOOL)bAuto resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) { [gJMVideoStreamPlayer switchCamera:isFront autoPlay:bAuto handler:^(BOOL success, NSString * _Nullable url, NSInteger code, NSString * _Nullable errMsg) { - if (success && code == 0 && url) { + if (success && code == 0) { resolve(url); } else { reject([NSString stringWithFormat:@"%ld", (long)code], errMsg ? errMsg : @"", nil); diff --git a/package.json b/package.json index 4a89a46..f950599 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-rtmp-player-jm", - "version": "1.1.5", + "version": "1.1.6", "description": "Jimi Video Player for RTMP SDK modules and view for React Native(Android & IOS), support react native 0.57+. ", "main": "index.js", "scripts": { diff --git a/react-native-rtmp-player-jm.podspec b/react-native-rtmp-player-jm.podspec index f371878..1b3e5a5 100644 --- a/react-native-rtmp-player-jm.podspec +++ b/react-native-rtmp-player-jm.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "react-native-rtmp-player-jm" - s.version = "1.1.2" + s.version = "1.1.6" s.summary = "Jimi RTMP Video Player SDK for React Native" s.description = <<-DESC