Skip to content

Commit

Permalink
正式版:1.1.0;1、更新Android、iOS SDK;2、iOS视频画面模式调整为自适应缩放
Browse files Browse the repository at this point in the history
  • Loading branch information
Eafy committed Nov 13, 2019
1 parent d27fe18 commit 1e7c62f
Show file tree
Hide file tree
Showing 13 changed files with 139 additions and 13 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ dependencies {
compileOnly 'com.facebook.react:react-native:+'
compileOnly files('src/main/assets')

implementation "com.jimi.jimivideoplayer:JimiVideoPlayer:1.3.7"
api "com.jimi.jimivideoplayer:JimiVideoPlayer:1.4.0"
}

Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ public void onStreamPlayerReceiveFrameInfo(FrameInfo frameInfo) {
event.putInt("audioBPS", frameInfo.audioBps);
event.putInt("timestamp", (int)frameInfo.timestamp);
event.putInt("totalFrameCount", frameInfo.totalFrameCount);
event.putInt("onlineCount", frameInfo.onlineCount);
mContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
.emit(kOnStreamPlayerReceiveFrameInfo, event);
}
Expand Down
2 changes: 0 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ dependencies {
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+"

implementation "com.jimi.jimivideoplayer:JimiVideoPlayer:1.3.5"

implementation project(':react-native-fs')
implementation project(':react-native-rtmp-player-jm')
}
Expand Down
7 changes: 3 additions & 4 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ target 'example' do
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge',
'DevSupport',
'DevSupport',
'RCTText',
'RCTNetwork',
'RCTWebSocket',
'RCTWebSocket',
'RCTAnimation',
'RCTImage',
]
Expand All @@ -22,7 +22,7 @@ target 'example' do
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'


pod 'react-native-rtmp-player-jm', :podspec => '../node_modules/react-native/react-native-rtmp-player-jm/react-native-rtmp-player-jm.podspec'
pod 'react-native-rtmp-player-jm', :podspec => '../node_modules/react-native-rtmp-player-jm/react-native-rtmp-player-jm.podspec'

pod 'RNFS', :podspec => '../node_modules/react-native-fs'

Expand All @@ -33,4 +33,3 @@ target 'example' do
end

end

106 changes: 106 additions & 0 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
PODS:
- boost-for-react-native (1.63.0)
- DoubleConversion (1.1.6)
- Folly (2018.10.22.00):
- boost-for-react-native
- DoubleConversion
- glog
- glog (0.3.5)
- JimiVideoPlayer (1.4.0)
- React (0.58.6):
- React/Core (= 0.58.6)
- react-native-rtmp-player-jm (1.0.5):
- JimiVideoPlayer (= 1.4.0)
- React
- React/Core (0.58.6):
- yoga (= 0.58.6.React)
- React/CxxBridge (0.58.6):
- Folly (= 2018.10.22.00)
- React/Core
- React/cxxreact
- React/jsiexecutor
- React/cxxreact (0.58.6):
- boost-for-react-native (= 1.63.0)
- Folly (= 2018.10.22.00)
- React/jsinspector
- React/DevSupport (0.58.6):
- React/Core
- React/RCTWebSocket
- React/fishhook (0.58.6)
- React/jsi (0.58.6):
- Folly (= 2018.10.22.00)
- React/jsiexecutor (0.58.6):
- Folly (= 2018.10.22.00)
- React/cxxreact
- React/jsi
- React/jsinspector (0.58.6)
- React/RCTAnimation (0.58.6):
- React/Core
- React/RCTBlob (0.58.6):
- React/Core
- React/RCTImage (0.58.6):
- React/Core
- React/RCTNetwork
- React/RCTNetwork (0.58.6):
- React/Core
- React/RCTText (0.58.6):
- React/Core
- React/RCTWebSocket (0.58.6):
- React/Core
- React/fishhook
- React/RCTBlob
- RNFS (2.13.3):
- React
- yoga (0.58.6.React)

DEPENDENCIES:
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- react-native-rtmp-player-jm (from `../node_modules/react-native-rtmp-player-jm/react-native-rtmp-player-jm.podspec`)
- React/Core (from `../node_modules/react-native`)
- React/CxxBridge (from `../node_modules/react-native`)
- React/DevSupport (from `../node_modules/react-native`)
- React/RCTAnimation (from `../node_modules/react-native`)
- React/RCTImage (from `../node_modules/react-native`)
- React/RCTNetwork (from `../node_modules/react-native`)
- React/RCTText (from `../node_modules/react-native`)
- React/RCTWebSocket (from `../node_modules/react-native`)
- RNFS (from `../node_modules/react-native-fs`)
- yoga (from `../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
trunk:
- boost-for-react-native
- JimiVideoPlayer

EXTERNAL SOURCES:
DoubleConversion:
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
Folly:
:podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
glog:
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
React:
:path: "../node_modules/react-native"
react-native-rtmp-player-jm:
:podspec: "../node_modules/react-native-rtmp-player-jm/react-native-rtmp-player-jm.podspec"
RNFS:
:podspec: "../node_modules/react-native-fs"
yoga:
:path: "../node_modules/react-native/ReactCommon/yoga"

SPEC CHECKSUMS:
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
DoubleConversion: bb338842f62ab1d708ceb63ec3d999f0f3d98ecd
Folly: de497beb10f102453a1afa9edbf8cf8a251890de
glog: aefd1eb5dda2ab95ba0938556f34b98e2da3a60d
JimiVideoPlayer: 1731769101972b0e140c9238aa31939e1b2e65d8
React: 130b87b2d5e2baac646954282cab87be986d98fc
react-native-rtmp-player-jm: a227854b94b71eb12182518913a5351413f8ee28
RNFS: c9bbde46b0d59619f8e7b735991c60e0f73d22c1
yoga: 32d7ef1081951e9a35a4c72a7be797598b138a48

PODFILE CHECKSUM: d3a51f5973489d00996ecef0a970b00c08d76b83

COCOAPODS: 1.8.4
10 changes: 10 additions & 0 deletions example/ios/example.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"react": "16.6.3",
"react-native": "0.58.6",
"react-native-fs": "2.13.3",
"react-native-rtmp-player-jm": "^1.0.5"
"react-native-rtmp-player-jm": "^1.0.9"
},
"devDependencies": {
"babel-core": "^7.0.0-bridge.0",
Expand Down
2 changes: 2 additions & 0 deletions ios/RNJimiRTMPPlayer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.jimi.RNJimiRTMPPlayer;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -323,6 +324,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.jimi.RNJimiRTMPPlayer;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
Expand Down
3 changes: 2 additions & 1 deletion ios/RNJimiRTMPPlayer/JMRTMPMonitorManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ @implementation JMRTMPMonitorManager
}
}

- (UIView *)view
- (UIImageView *)view
{
if (gJMRTMPMonitor == nil) {
gJMRTMPMonitor = [[Monitor alloc] init];
gJMRTMPMonitor.contentMode = UIViewContentModeScaleAspectFit;
}

return gJMRTMPMonitor;
Expand Down
3 changes: 2 additions & 1 deletion ios/RNJimiRTMPPlayer/JMRTMPPlayerManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ - (void)didStreamPlayerRecordWithStatus:(STREAM_RECORD_STATUS)status path:(NSStr
[self sendEventWithName:kOnStreamPlayerRecordStatus body:body];
}

- (void)didStreamPlayerReceiveFrameInfoWithVideoWidth:(NSInteger)videoWidth videoHeight:(NSInteger)videoHeight videoBPS:(NSInteger)videoBps audioBPS:(NSInteger)audioBps timestamp:(NSUInteger)timestamp totalFrameCount:(NSInteger)totalFrameCount
- (void)didStreamPlayerReceiveFrameInfoWithVideoWidth:(NSInteger)videoWidth videoHeight:(NSInteger)videoHeight videoBPS:(NSInteger)videoBps audioBPS:(NSInteger)audioBps timestamp:(NSUInteger)timestamp totalFrameCount:(NSInteger)totalFrameCount onlineCount:(NSInteger)onlineCount
{
NSMutableDictionary *body = [self getEmptyBody];
body[@"width"] = @(videoWidth);
Expand All @@ -264,6 +264,7 @@ - (void)didStreamPlayerReceiveFrameInfoWithVideoWidth:(NSInteger)videoWidth vide
body[@"audioBPS"] = @(audioBps);
body[@"timestamp"] = @(timestamp);
body[@"totalFrameCount"] = @(totalFrameCount);
body[@"onlineCount"] = @(onlineCount);

[self sendEventWithName:kOnStreamPlayerReceiveFrameInfo body:body];
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-rtmp-player-jm",
"version": "1.0.9",
"version": "1.1.0",
"description": "Jimi Video Player for RTMP SDK modules and view for React Native(Android & IOS), support react native 0.57+. ",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions react-native-rtmp-player-jm.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "react-native-rtmp-player-jm"
s.version = "1.0.9"
s.version = "1.1.0"
s.summary = "Jimi RTMP Video Player SDK for React Native"

s.description = <<-DESC
Expand All @@ -12,7 +12,7 @@ Pod::Spec.new do |s|
s.license = "MIT"
s.author = { "Eafy" => "lizhijian_21@163.com" }
s.platform = :ios, "8.0"

s.requires_arc = true

s.source = { :git => "https://github.com/Eafy/react-native-rtmp-player-jm.git", :tag => "#{s.version}" }

Expand Down

0 comments on commit 1e7c62f

Please sign in to comment.