From 318b85677ea6ae1ab4dc849d0eb3380cedaa69e5 Mon Sep 17 00:00:00 2001 From: lzj Date: Wed, 8 Apr 2020 17:05:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2=E6=91=84?= =?UTF-8?q?=E5=83=8F=E5=A4=B4=E6=88=90=E5=8A=9F=E5=8D=B4=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/src/main/java/com/jimi/rn/rtmp/JMRTMPPlayerManager.java | 2 +- ios/RNJimiRTMPPlayer/JMRTMPPlayerManager.m | 2 +- package.json | 2 +- react-native-rtmp-player-jm.podspec | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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