├── app ├── .gitignore ├── libs │ ├── x86 │ │ ├── libijksdl.so │ │ ├── libijkffmpeg.so │ │ └── libijkplayer.so │ ├── armeabi │ │ ├── libijksdl.so │ │ ├── libijkffmpeg.so │ │ └── libijkplayer.so │ ├── x86_64 │ │ ├── libijksdl.so │ │ ├── libijkffmpeg.so │ │ └── libijkplayer.so │ ├── arm64-v8a │ │ ├── libijksdl.so │ │ ├── libijkffmpeg.so │ │ └── libijkplayer.so │ ├── armeabi-v7a │ │ ├── libijksdl.so │ │ ├── libijkffmpeg.so │ │ └── libijkplayer.so │ └── ijkplayer-java-release.aar ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── drawable │ │ │ │ ├── loading.png │ │ │ │ ├── bar_light.png │ │ │ │ ├── bar_sound.png │ │ │ │ ├── btn_back.png │ │ │ │ ├── btn_full.png │ │ │ │ ├── btn_mini.png │ │ │ │ ├── btn_pause.png │ │ │ │ ├── btn_play.png │ │ │ │ ├── seekbar_ratio.png │ │ │ │ ├── btn_back_active.png │ │ │ │ ├── btn_full_active.png │ │ │ │ ├── btn_pause_active.png │ │ │ │ ├── btn_play_active.png │ │ │ │ ├── play_btn_back.xml │ │ │ │ ├── play_btn_full.xml │ │ │ │ ├── play_btn_play.xml │ │ │ │ ├── play_btn_pause.xml │ │ │ │ ├── shar_list_item.xml │ │ │ │ ├── shape_top.xml │ │ │ │ ├── shape_bottom.xml │ │ │ │ ├── thumb_image.xml │ │ │ │ ├── shar_list.xml │ │ │ │ ├── po_seekbar.xml │ │ │ │ └── progress_vertical.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ ├── shar_list_text_item.xml │ │ │ │ ├── activity_main.xml │ │ │ │ └── play.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── codef │ │ │ │ └── ijkplay_demo │ │ │ │ ├── ijkplayer │ │ │ │ ├── IVideoEvent.java │ │ │ │ ├── IMediaController.java │ │ │ │ ├── FileMediaDataSource.java │ │ │ │ ├── IRenderView.java │ │ │ │ ├── MediaPlayerCompat.java │ │ │ │ ├── SurfaceRenderView.java │ │ │ │ ├── MeasureHelper.java │ │ │ │ ├── TextureRenderView.java │ │ │ │ ├── IjkVideoView.java │ │ │ │ └── ijkvideo.java │ │ │ │ └── MainActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── codef │ │ │ └── ijkplay_demo │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── example │ │ └── codef │ │ └── ijkplay_demo │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── image ├── 1.png ├── 2.png └── 3.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── README.md ├── gradle.properties ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /image/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/image/1.png -------------------------------------------------------------------------------- /image/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/image/2.png -------------------------------------------------------------------------------- /image/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/image/3.png -------------------------------------------------------------------------------- /app/libs/x86/libijksdl.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/libs/x86/libijksdl.so -------------------------------------------------------------------------------- /app/libs/armeabi/libijksdl.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/libs/armeabi/libijksdl.so -------------------------------------------------------------------------------- /app/libs/x86/libijkffmpeg.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/libs/x86/libijkffmpeg.so -------------------------------------------------------------------------------- /app/libs/x86/libijkplayer.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/libs/x86/libijkplayer.so -------------------------------------------------------------------------------- /app/libs/x86_64/libijksdl.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/libs/x86_64/libijksdl.so -------------------------------------------------------------------------------- /app/libs/arm64-v8a/libijksdl.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/libs/arm64-v8a/libijksdl.so -------------------------------------------------------------------------------- /app/libs/armeabi/libijkffmpeg.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/libs/armeabi/libijkffmpeg.so -------------------------------------------------------------------------------- /app/libs/armeabi/libijkplayer.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/libs/armeabi/libijkplayer.so -------------------------------------------------------------------------------- /app/libs/x86_64/libijkffmpeg.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/libs/x86_64/libijkffmpeg.so -------------------------------------------------------------------------------- /app/libs/x86_64/libijkplayer.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/libs/x86_64/libijkplayer.so -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ijkplay_demo 3 | 4 | -------------------------------------------------------------------------------- /app/libs/arm64-v8a/libijkffmpeg.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/libs/arm64-v8a/libijkffmpeg.so -------------------------------------------------------------------------------- /app/libs/arm64-v8a/libijkplayer.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/libs/arm64-v8a/libijkplayer.so -------------------------------------------------------------------------------- /app/libs/armeabi-v7a/libijksdl.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/libs/armeabi-v7a/libijksdl.so -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/libs/armeabi-v7a/libijkffmpeg.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/libs/armeabi-v7a/libijkffmpeg.so -------------------------------------------------------------------------------- /app/libs/armeabi-v7a/libijkplayer.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/libs/armeabi-v7a/libijkplayer.so -------------------------------------------------------------------------------- /app/libs/ijkplayer-java-release.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/libs/ijkplayer-java-release.aar -------------------------------------------------------------------------------- /app/src/main/res/drawable/loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/src/main/res/drawable/loading.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/bar_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/src/main/res/drawable/bar_light.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/bar_sound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/src/main/res/drawable/bar_sound.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/btn_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/src/main/res/drawable/btn_back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/btn_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/src/main/res/drawable/btn_full.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/btn_mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/src/main/res/drawable/btn_mini.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/btn_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/src/main/res/drawable/btn_pause.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/btn_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/src/main/res/drawable/btn_play.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/seekbar_ratio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/src/main/res/drawable/seekbar_ratio.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/btn_back_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/src/main/res/drawable/btn_back_active.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/btn_full_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/src/main/res/drawable/btn_full_active.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/btn_pause_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/src/main/res/drawable/btn_pause_active.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/btn_play_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/src/main/res/drawable/btn_play_active.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodFrm/ijkplayer_demo/master/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | .idea 11 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat Oct 06 10:53:57 CST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | #1496db 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ijkplayer 播放器demo 2 | 3 | > 支持左右滑动快进,左右上下滑动调音量 4 | 5 | > 感觉还有不少BUG,慢慢完善 6 | 7 | ## ijkplayer 项目地址 8 | [https://github.com/Bilibili/ijkplayer](https://github.com/Bilibili/ijkplayer) 9 | 10 | ## Demo截图 11 | 12 | ![主页](image/1.png) 13 | ![全屏1](image/2.png) 14 | ![全屏2](image/3.png) 15 | 16 | > **我用的是b站开源的播放器写的,凭什么说我抄袭** 17 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/play_btn_back.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/play_btn_full.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/play_btn_play.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/play_btn_pause.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/codef/ijkplay_demo/ijkplayer/IVideoEvent.java: -------------------------------------------------------------------------------- 1 | package com.example.codef.ijkplay_demo.ijkplayer; 2 | 3 | /** 4 | * Created by codef on 2018/2/7. 5 | */ 6 | 7 | public interface IVideoEvent { 8 | void onFullScreen(); 9 | 10 | boolean onError(int i); 11 | 12 | void onReception(); 13 | 14 | void onBackstage(); 15 | 16 | boolean onSharSwitch(String Name, String Url); 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shar_list_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/shar_list_text_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/thumb_image.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shar_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/test/java/com/example/codef/ijkplay_demo/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.example.codef.ijkplay_demo; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Users\codef\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/po_seekbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | ## Project-wide Gradle settings. 2 | # 3 | # For more details on how to configure your build environment visit 4 | # http://www.gradle.org/docs/current/userguide/build_environment.html 5 | # 6 | # Specifies the JVM arguments used for the daemon process. 7 | # The setting is particularly useful for tweaking memory settings. 8 | # Default value: -Xmx1024m -XX:MaxPermSize=256m 9 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 10 | # 11 | # When configured, Gradle will run in incubating parallel mode. 12 | # This option should only be used with decoupled projects. More details, visit 13 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 14 | # org.gradle.parallel=true 15 | #Fri Aug 18 16:25:15 CST 2017 16 | systemProp.http.proxyHost=127.0.0.1 17 | org.gradle.jvmargs=-Xmx1536m 18 | systemProp.http.proxyPort=1081 19 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/example/codef/ijkplay_demo/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.example.codef.ijkplay_demo; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.example.codef.ijkplay_demo", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/progress_vertical.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 |