Skip to content

Commit

Permalink
change android so
Browse files Browse the repository at this point in the history
  • Loading branch information
CaiJingLong committed Mar 21, 2019
1 parent 83b5e07 commit 073022c
Show file tree
Hide file tree
Showing 16 changed files with 15 additions and 21 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.3

Use [GSYVideoPlayer](https://github.com/CarGuo/GSYVideoPlayer) android \*.so

## 0.1.2

fix ios fps problem.
Expand Down
6 changes: 1 addition & 5 deletions README-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ On this basis, rotation notification is added.
### Android
Unlike iOS, this is not modified, but rather a so library compiled with BiliBili version 0.8.8 + OpenSSL
Errors may be reported or flipped out during construction, because of problems with so Libraries
Vscode: You need to modify. vscode / launch. JSON
Add `"args": ["--target-platform", "android-arm"]`
Android studio: main.dart => Edit Configurations => Additional Arguments => `--target-platform android-arm`
Now, use [GSYVideoPlayer](https://github.com/CarGuo/GSYVideoPlayer) `.so` library.

## Simple Example

Expand Down
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ https://github.com/CaiJingLong/flutter_ijkplayer/blob/master/README-EN.md

[![pub package](https://img.shields.io/pub/v/flutter_ijkplayer.svg)](https://pub.dartlang.org/packages/flutter_ijkplayer)

最新版本查看pub
最新版本查看 pub

pubspec.yaml

Expand All @@ -50,16 +50,7 @@ iOS 的代码来自于 https://github.com/jadennn/flutter_ijk 中的 iOS 代码
### Android
和 iOS 不同,这个没有修改,而是使用 bilibili 的 0.8.8 版+openssl 编译的 so 库
构建时可能会报错,或者闪退,这个是因为 so 库的问题
vscode: 你需要修改.vscode/launch.json
添加 `"args": ["--target-platform", "android-arm"]`

android studio: 你需要点击 run 左边那个 main.dart=>Edit Configurations,然后在 Additional Arguments 中添加 `--target-platform android-arm`

打包时同理,尽量只保留 armv7 就可以了
现在使用 [GSYVideoPlayer](https://github.com/CarGuo/GSYVideoPlayer)中的 so 库
## Simple Example
Expand Down
Binary file modified android/src/main/libs/arm64-v8a/libijkffmpeg.so
Binary file not shown.
Binary file modified android/src/main/libs/arm64-v8a/libijkplayer.so
Binary file not shown.
Binary file modified android/src/main/libs/arm64-v8a/libijksdl.so
Binary file not shown.
Binary file modified android/src/main/libs/armeabi-v7a/libijkffmpeg.so
Binary file not shown.
Binary file modified android/src/main/libs/armeabi-v7a/libijkplayer.so
Binary file not shown.
Binary file modified android/src/main/libs/armeabi-v7a/libijksdl.so
Binary file not shown.
Binary file modified android/src/main/libs/x86/libijkffmpeg.so
Binary file not shown.
Binary file modified android/src/main/libs/x86/libijkplayer.so
Binary file not shown.
Binary file modified android/src/main/libs/x86/libijksdl.so
Binary file not shown.
6 changes: 4 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ android {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

ndk {
abiFilters "armeabi-v7a"
// abiFilters "armeabi-v7a"
abiFilters "armeabi-v7a", "arm64-v8a"
}
}

Expand All @@ -53,7 +54,8 @@ android {
}
debug {
ndk {
abiFilters "armeabi-v7a","x86"
// abiFilters "armeabi-v7a", "x86"
abiFilters "armeabi-v7a", "x86", "arm64-v8a"
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ class HomePageState extends State<HomePage> {
child: Icon(Icons.play_arrow),
onPressed: () async {
await controller.setNetworkDataSource(
// 'http://www.sample-videos.com/video123/mp4/720/big_buck_bunny_720p_20mb.mp4',
'https://www.sample-videos.com/video123/mp4/720/big_buck_bunny_720p_20mb.mp4',
// 'rtmp://172.16.100.245/live1',
// 'rtmp://172.16.100.245/live1',
// 'https://www.sample-videos.com/video123/flv/720/big_buck_bunny_720p_10mb.flv',
// "https://www.sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4",
// 'http://184.72.239.149/vod/smil:BigBuckBunny.smil/playlist.m3u8',
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.1.2"
version: "0.1.3"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_ijkplayer
description: Flutter version of bilibilibili ijkplayer, supports common playback protocols, easy to use.
version: 0.1.2
version: 0.1.3
author: caijinglong<cjl_spy@163.com>
homepage: https://github.com/CaiJingLong/flutter_ijkplayer

Expand Down

0 comments on commit 073022c

Please sign in to comment.