From 2a0e3a589a74c65e4efff83a496a1211980c2ee9 Mon Sep 17 00:00:00 2001 From: dueeeke Date: Tue, 19 Mar 2019 23:43:36 +0800 Subject: [PATCH] release v2.5.6 --- README.md | 90 ++---------------------------------------------- app/build.gradle | 4 +-- 2 files changed, 5 insertions(+), 89 deletions(-) diff --git a/README.md b/README.md index 28252d45..48dc3dbe 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,6 @@ A video player based on [IjkPlayer](https://github.com/Bilibili/ijkplayer). [![](https://www.jitpack.io/v/dueeeke/dkplayer.svg)](https://www.jitpack.io/#dueeeke/dkplayer) [![API](https://img.shields.io/badge/API-16%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=16) -#### [Wiki](https://github.com/dueeeke/dkplayer/wiki) -#### [Demo](https://fir.im/1r3u) - ## 特性 * **支持直播和点播。** * **支持调整显示比例:默认、原始大小、16:9、4:3、铺满屏幕、居中裁剪。** @@ -27,91 +24,10 @@ A video player based on [IjkPlayer](https://github.com/Bilibili/ijkplayer). * **无缝衔接播放demo。** * **抖音demo。** -## 使用 - -1.添加类库 -``` -gradle - -allprojects { - repositories { - ... - maven { url 'https://jitpack.io' } - } -} - -dependencies { - # 必选,可兼容市面上绝大部分设备 - implementation 'com.github.dueeeke.dkplayer:dkplayer-java:2.5.6' - implementation 'com.github.dueeeke.dkplayer:dkplayer-armv7a:2.5.6' - - # 可选,用于兼容一些其他的CPU架构 - implementation 'com.github.dueeeke.dkplayer:dkplayer-armv5:2.5.6' - implementation 'com.github.dueeeke.dkplayer:dkplayer-arm64:2.5.6' - implementation 'com.github.dueeeke.dkplayer:dkplayer-x86:2.5.6' - implementation 'com.github.dueeeke.dkplayer:dkplayer-x86_64:2.5.6' - - # 可选,里面包含StandardVideoController的实现 - implementation 'com.github.dueeeke.dkplayer:dkplayer-ui:2.5.6' -} -``` -或者将library下载并导入项目中使用 - -2.添加布局 -```xml - -``` - -3.设置视频地址、标题、Controller等 -```java -ijkVideoView.setUrl(URL_VOD); //设置视频地址 -StandardVideoController controller = new StandardVideoController(this); -controller.setTitle("网易公开课-如何掌控你的自由时间"); //设置视频标题 -ijkVideoView.setVideoController(controller); //设置控制器,如需定制可继承BaseVideoController -ijkVideoView.start(); //开始播放,不调用则不自动播放 -``` - -4.在`Activity`中 -```java -@Override - protected void onPause() { - super.onPause(); - ijkVideoView.pause(); - } - - @Override - protected void onResume() { - super.onResume(); - ijkVideoView.resume(); - } - - @Override - protected void onDestroy() { - super.onDestroy(); - ijkVideoView.release(); - } - - - @Override - public void onBackPressed() { - if (!ijkVideoView.onBackPressed()) { - super.onBackPressed(); - } - } -``` - -5.在`AndroidManifest.xml`中 -``` - -``` +#### [Demo](https://fir.im/1r3u) -其他API的用法参照demo +## 使用 +#### [Wiki](https://github.com/dueeeke/dkplayer/wiki) ## 截图 |API演示|列表播放|扩展功能|画中画 diff --git a/app/build.gradle b/app/build.gradle index 960b3001..cb838d31 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 29 - versionName "2.5.5" + versionCode 30 + versionName "2.5.6" ndk { //打包时保留armeabi-v7a x86 so