Skip to content

Commit

Permalink
update demo bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
jianjunxiao committed Aug 3, 2017
1 parent 72f3819 commit 87904d3
Show file tree
Hide file tree
Showing 20 changed files with 31 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .idea/encodings.xml

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

2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -24,7 +24,7 @@ allprojects {
}
dependencies {
compile 'com.github.xiaoyanger0825:NiceVieoPlayer:v1.9'
compile 'com.github.xiaoyanger0825:NiceVieoPlayer:v2.0'
}
```
**在对应视频界面所在的Activity的Manifest.xml中需要添加如下配置:**
Expand Down
4 changes: 2 additions & 2 deletions config.gradle
Expand Up @@ -5,8 +5,8 @@ ext {
buildToolsVersion: "25.0.2",
minSdkVersion : 16,
targetSdkVersion : 25,
versionCode : 19,
versionName : "1.9"
versionCode : 20,
versionName : "2.0"
]

dependVersion = [
Expand Down
28 changes: 18 additions & 10 deletions nicevideoplayer/build.gradle
Expand Up @@ -12,7 +12,9 @@ android {
versionName rootProject.ext.android.versionName

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

ndk {
abiFilters 'armeabi', 'armeabi-v7a', 'x86'
}
}

buildTypes {
Expand All @@ -22,6 +24,12 @@ android {
}
}

sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}

lintOptions {
abortOnError false
}
Expand All @@ -38,15 +46,15 @@ dependencies {
compile rootProject.ext.dependencies.appcompatV7
compile rootProject.ext.dependencies.junit
// required, enough for most devices.
compile 'tv.danmaku.ijk.media:ijkplayer-java:0.8.0'
compile 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.0'
// Other ABIs: optional
compile 'tv.danmaku.ijk.media:ijkplayer-armv5:0.8.0'
// compile 'tv.danmaku.ijk.media:ijkplayer-arm64:0.8.0'
compile 'tv.danmaku.ijk.media:ijkplayer-x86:0.8.0'
// compile 'tv.danmaku.ijk.media:ijkplayer-x86_64:0.8.0'
// ExoPlayer as IMediaPlayer: optional, experimental
// compile 'tv.danmaku.ijk.media:ijkplayer-exo:0.8.0'
compile 'tv.danmaku.ijk.media:ijkplayer-java:0.8.1'
// compile 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.1'
// Other ABIs: optional
// compile 'tv.danmaku.ijk.media:ijkplayer-armv5:0.8.1'
// compile 'tv.danmaku.ijk.media:ijkplayer-arm64:0.8.1'
// compile 'tv.danmaku.ijk.media:ijkplayer-x86:0.8.1'
// compile 'tv.danmaku.ijk.media:ijkplayer-x86_64:0.8.1'
// ExoPlayer as IMediaPlayer: optional, experimental
// compile 'tv.danmaku.ijk.media:ijkplayer-exo:0.8.1'
}

//apply plugin: 'com.github.dcendents.android-maven'
Expand Down
Binary file added nicevideoplayer/libs/arm64-v8a/libijkffmpeg.so
Binary file not shown.
Binary file added nicevideoplayer/libs/arm64-v8a/libijkplayer.so
Binary file not shown.
Binary file added nicevideoplayer/libs/arm64-v8a/libijksdl.so
Binary file not shown.
Binary file added nicevideoplayer/libs/armeabi-v7a/libijkffmpeg.so
Binary file not shown.
Binary file added nicevideoplayer/libs/armeabi-v7a/libijkplayer.so
Binary file not shown.
Binary file added nicevideoplayer/libs/armeabi-v7a/libijksdl.so
Binary file not shown.
Binary file added nicevideoplayer/libs/armeabi/libijkffmpeg.so
Binary file not shown.
Binary file added nicevideoplayer/libs/armeabi/libijkplayer.so
Binary file not shown.
Binary file added nicevideoplayer/libs/armeabi/libijksdl.so
Binary file not shown.
Binary file added nicevideoplayer/libs/x86/libijkffmpeg.so
Binary file not shown.
Binary file added nicevideoplayer/libs/x86/libijkplayer.so
Binary file not shown.
Binary file added nicevideoplayer/libs/x86/libijksdl.so
Binary file not shown.
Binary file added nicevideoplayer/libs/x86_64/libijkffmpeg.so
Binary file not shown.
Binary file added nicevideoplayer/libs/x86_64/libijkplayer.so
Binary file not shown.
Binary file added nicevideoplayer/libs/x86_64/libijksdl.so
Binary file not shown.
Expand Up @@ -477,10 +477,13 @@ public void onCompletion(IMediaPlayer mp) {
= new IMediaPlayer.OnErrorListener() {
@Override
public boolean onError(IMediaPlayer mp, int what, int extra) {
mCurrentState = STATE_ERROR;
mController.onPlayStateChanged(mCurrentState);
LogUtil.d("onError ——> STATE_ERROR ———— what:" + what);
return false;
// 直播流播放时去调用mediaPlayer.getDuration会导致-38和-2147483648错误,忽略该错误
if (what != -38 && what != -2147483648 && extra != -38 && extra != -2147483648) {
mCurrentState = STATE_ERROR;
mController.onPlayStateChanged(mCurrentState);
LogUtil.d("onError ——> STATE_ERROR ———— what:" + what + ", extra: " + extra);
}
return true;
}
};

Expand Down Expand Up @@ -521,6 +524,8 @@ public boolean onInfo(IMediaPlayer mp, int what, int extra) {
mTextureView.setRotation(extra);
LogUtil.d("视频旋转角度:" + extra);
}
} else if (what == IMediaPlayer.MEDIA_INFO_NOT_SEEKABLE) {
LogUtil.d("视频不能seekTo,为直播视频");
} else {
LogUtil.d("onInfo ——> what:" + what);
}
Expand Down

0 comments on commit 87904d3

Please sign in to comment.