diff --git a/README.md b/README.md index 58557ff1..2be01d71 100644 --- a/README.md +++ b/README.md @@ -42,14 +42,14 @@ allprojects { dependencies { # required, enough for most devices. - implementation 'com.github.dueeeke.dkplayer:dkplayer-java:2.4.2' - implementation 'com.github.dueeeke.dkplayer:dkplayer-armv7a:2.4.2' + implementation 'com.github.dueeeke.dkplayer:dkplayer-java:2.4.3' + implementation 'com.github.dueeeke.dkplayer:dkplayer-armv7a:2.4.3' # Other ABIs: optional - implementation 'com.github.dueeeke.dkplayer:dkplayer-armv5:2.4.2' - implementation 'com.github.dueeeke.dkplayer:dkplayer-arm64:2.4.2' - implementation 'com.github.dueeeke.dkplayer:dkplayer-x86:2.4.2' - implementation 'com.github.dueeeke.dkplayer:dkplayer-x86_64:2.4.2' + implementation 'com.github.dueeeke.dkplayer:dkplayer-armv5:2.4.3' + implementation 'com.github.dueeeke.dkplayer:dkplayer-arm64:2.4.3' + implementation 'com.github.dueeeke.dkplayer:dkplayer-x86:2.4.3' + implementation 'com.github.dueeeke.dkplayer:dkplayer-x86_64:2.4.3' } ``` 或者将library下载并导入项目中使用 @@ -77,6 +77,7 @@ PlayerConfig playerConfig = new PlayerConfig.Builder() .enableMediaCodec()//启动硬解码,启用后可能导致视频黑屏,音画不同步 .usingSurfaceView() //启用SurfaceView显示视频,不调用默认使用TextureView .savingProgress() //保存播放进度 + .disableAudioFocus() //关闭AudioFocusChange监听 .build(); ijkVideoView.setPlayerConfig(playerConfig); ``` diff --git a/app/build.gradle b/app/build.gradle index 2b3ded4c..79e96655 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,8 +12,8 @@ android { applicationId "com.dueeeke.dkplayer" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 22 - versionName "2.4.2" + versionCode 23 + versionName "2.4.3" ndk { //打包时只保留armeabi-v7a so diff --git a/app/src/main/java/com/dueeeke/dkplayer/widget/controller/FloatController.java b/app/src/main/java/com/dueeeke/dkplayer/widget/controller/FloatController.java index dd4ccfb2..10578a37 100644 --- a/app/src/main/java/com/dueeeke/dkplayer/widget/controller/FloatController.java +++ b/app/src/main/java/com/dueeeke/dkplayer/widget/controller/FloatController.java @@ -61,8 +61,11 @@ public void onClick(View v) { } else if (id == R.id.start_play) { doPauseResume(); } else if (id == R.id.btn_skip) { - if (PIPManager.getInstance().getActClass() != null) - getContext().startActivity(new Intent(getContext(), PIPManager.getInstance().getActClass())); + if (PIPManager.getInstance().getActClass() != null) { + Intent intent = new Intent(getContext(), PIPManager.getInstance().getActClass()); + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + getContext().startActivity(intent); + } } }