├── .gitignore ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── afap │ │ └── lib_player │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── afap │ │ │ └── lib_player │ │ │ └── MainActivity.java │ └── res │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── afap │ └── lib_player │ └── ExampleUnitTest.java ├── bdplayer ├── .gitignore ├── build.gradle ├── libs │ ├── arm64-v8a │ │ ├── libcyberplayer-core.so │ │ └── libcyberplayer.so │ ├── armeabi-v7a │ │ ├── libcyberplayer-core.so │ │ └── libcyberplayer.so │ └── cyberplayer-sdk.jar ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── baidu │ │ └── player │ │ └── VideoPlayActivity.java │ └── res │ ├── drawable-hdpi │ ├── ic_brightness_6_white_36dp.png │ ├── ic_chevron_left_white_36dp.png │ ├── ic_fullscreen_exit_white_24dp.png │ ├── ic_fullscreen_exit_white_36dp.png │ ├── ic_fullscreen_white_24dp.png │ ├── ic_play_arrow_white_24dp.png │ ├── ic_play_circle_outline_white_36dp.png │ ├── ic_stop_white_24dp.png │ ├── ic_volume_off_white_36dp.png │ └── ic_volume_up_white_36dp.png │ ├── drawable-xhdpi │ ├── ic_brightness_6_white_36dp.png │ ├── ic_chevron_left_white_36dp.png │ ├── ic_fullscreen_exit_white_24dp.png │ ├── ic_fullscreen_exit_white_36dp.png │ ├── ic_fullscreen_white_24dp.png │ ├── ic_play_arrow_white_24dp.png │ ├── ic_play_circle_outline_white_36dp.png │ ├── ic_stop_white_24dp.png │ ├── ic_volume_off_white_36dp.png │ └── ic_volume_up_white_36dp.png │ ├── drawable-xxhdpi │ ├── ic_brightness_6_white_36dp.png │ ├── ic_chevron_left_white_36dp.png │ ├── ic_fullscreen_exit_white_24dp.png │ ├── ic_fullscreen_exit_white_36dp.png │ ├── ic_fullscreen_white_24dp.png │ ├── ic_play_arrow_white_24dp.png │ ├── ic_play_circle_outline_white_36dp.png │ ├── ic_stop_white_24dp.png │ ├── ic_volume_off_white_36dp.png │ ├── ic_volume_up_white_36dp.png │ └── play_ctrl_sound_ball.png │ ├── drawable-xxxhdpi │ ├── ic_brightness_6_white_36dp.png │ ├── ic_chevron_left_white_36dp.png │ ├── ic_fullscreen_exit_white_24dp.png │ ├── ic_fullscreen_exit_white_36dp.png │ ├── ic_fullscreen_white_24dp.png │ ├── ic_play_arrow_white_24dp.png │ ├── ic_play_circle_outline_white_36dp.png │ ├── ic_stop_white_24dp.png │ ├── ic_volume_off_white_36dp.png │ └── ic_volume_up_white_36dp.png │ ├── drawable │ ├── app_video_center_bg.xml │ └── play_seekbar_color_bg.xml │ ├── layout │ └── activity_play_video.xml │ └── values │ └── colors.xml ├── build.gradle ├── gradle.properties ├── gradlew ├── gradlew.bat ├── ijkplayer ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── player │ │ ├── IJKVideoPlayActivity.java │ │ ├── services │ │ └── MediaPlayerService.java │ │ ├── settings │ │ └── Settings.java │ │ └── widget │ │ └── media │ │ ├── FileMediaDataSource.java │ │ ├── IMediaController.java │ │ ├── IRenderView.java │ │ ├── IjkVideoView.java │ │ ├── InfoHudViewHolder.java │ │ ├── MeasureHelper.java │ │ ├── MediaPlayerCompat.java │ │ ├── SurfaceRenderView.java │ │ ├── TableLayoutBinder.java │ │ └── TextureRenderView.java │ ├── jniLibs │ ├── arm64-v8a │ │ ├── libijkffmpeg.so │ │ ├── libijkplayer.so │ │ └── libijksdl.so │ ├── armeabi-v7a │ │ ├── libijkffmpeg.so │ │ ├── libijkplayer.so │ │ └── libijksdl.so │ ├── x86 │ │ ├── libijkffmpeg.so │ │ ├── libijkplayer.so │ │ └── libijksdl.so │ └── x86_64 │ │ ├── libijkffmpeg.so │ │ ├── libijkplayer.so │ │ └── libijksdl.so │ └── res │ ├── drawable-hdpi │ ├── ic_brightness_6_white_36dp.png │ ├── ic_chevron_left_white_36dp.png │ ├── ic_fullscreen_exit_white_24dp.png │ ├── ic_fullscreen_exit_white_36dp.png │ ├── ic_fullscreen_white_24dp.png │ ├── ic_play_arrow_white_24dp.png │ ├── ic_play_circle_outline_white_36dp.png │ ├── ic_stop_white_24dp.png │ ├── ic_volume_off_white_36dp.png │ └── ic_volume_up_white_36dp.png │ ├── drawable-xhdpi │ ├── ic_brightness_6_white_36dp.png │ ├── ic_chevron_left_white_36dp.png │ ├── ic_fullscreen_exit_white_24dp.png │ ├── ic_fullscreen_exit_white_36dp.png │ ├── ic_fullscreen_white_24dp.png │ ├── ic_play_arrow_white_24dp.png │ ├── ic_play_circle_outline_white_36dp.png │ ├── ic_stop_white_24dp.png │ ├── ic_volume_off_white_36dp.png │ └── ic_volume_up_white_36dp.png │ ├── drawable-xxhdpi │ ├── ic_brightness_6_white_36dp.png │ ├── ic_chevron_left_white_36dp.png │ ├── ic_fullscreen_exit_white_24dp.png │ ├── ic_fullscreen_exit_white_36dp.png │ ├── ic_fullscreen_white_24dp.png │ ├── ic_play_arrow_white_24dp.png │ ├── ic_play_circle_outline_white_36dp.png │ ├── ic_stop_white_24dp.png │ ├── ic_volume_off_white_36dp.png │ ├── ic_volume_up_white_36dp.png │ └── play_ctrl_sound_ball.png │ ├── drawable-xxxhdpi │ ├── ic_brightness_6_white_36dp.png │ ├── ic_chevron_left_white_36dp.png │ ├── ic_fullscreen_exit_white_24dp.png │ ├── ic_fullscreen_exit_white_36dp.png │ ├── ic_fullscreen_white_24dp.png │ ├── ic_play_arrow_white_24dp.png │ ├── ic_play_circle_outline_white_36dp.png │ ├── ic_stop_white_24dp.png │ ├── ic_volume_off_white_36dp.png │ └── ic_volume_up_white_36dp.png │ ├── drawable │ ├── app_video_center_bg.xml │ └── play_seekbar_color_bg.xml │ ├── layout │ ├── activity_play_video.xml │ ├── fragment_track_list.xml │ ├── table_media_info.xml │ ├── table_media_info_row1.xml │ ├── table_media_info_row2.xml │ └── table_media_info_section.xml │ └── values │ ├── colors.xml │ ├── strings.xml │ └── strings_pref.xml └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | .idea 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/libraries 7 | .DS_Store 8 | /build 9 | /gradle 10 | /captures 11 | .externalNativeBuild 12 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | *.iml 3 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion '26.0.2' 6 | defaultConfig { 7 | applicationId "com.afap.lib_player" 8 | minSdkVersion 19 9 | targetSdkVersion 25 10 | versionCode 1 11 | versionName "1.0" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | repositories { 21 | flatDir { 22 | dirs 'libs' 23 | } 24 | } 25 | dependencies { 26 | compile fileTree(dir: 'libs', include: ['*.jar']) 27 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 28 | exclude group: 'com.android.support', module: 'support-annotations' 29 | }) 30 | compile 'com.android.support:appcompat-v7:25.4.0' 31 | compile 'com.android.support.constraint:constraint-layout:1.0.2' 32 | testCompile 'junit:junit:4.12' 33 | 34 | // 这里只要放开一个测试,因为这俩播放器的界面都是用的同一个名称的布局,有冲突 35 | // compile project(':bdplayer') 36 | compile project(':ijkplayer') 37 | } 38 | -------------------------------------------------------------------------------- /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 /Users/atom/Library/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 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/afap/lib_player/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.afap.lib_player; 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.afap.lib_player", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /app/src/main/java/com/afap/lib_player/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.afap.lib_player; 2 | 3 | import android.content.Intent; 4 | import android.net.Uri; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.os.Bundle; 7 | import android.view.View; 8 | 9 | 10 | import player.IJKVideoPlayActivity; 11 | 12 | public class MainActivity extends AppCompatActivity { 13 | 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | super.onCreate(savedInstanceState); 17 | setContentView(R.layout.activity_main); 18 | 19 | 20 | findViewById(R.id.play).setOnClickListener(new View.OnClickListener() { 21 | @Override 22 | public void onClick(View v) { 23 | 24 | String testurl = "http://jzvd.nathen.cn/c6e3dc12a1154626b3476d9bf3bd7266/6b56c5f0dc31428083757a45764763b0-5287d2089db37e62345123a1be272f8b.mp4"; 25 | 26 | // Intent intent = new Intent(MainActivity.this, VideoPlayActivity.class); 27 | // intent.putExtra("url", testurl); 28 | // startActivity(intent); 29 | 30 | 31 | // Uri uri = Uri.parse(testurl); 32 | // // 让系统选择播放器来播放流媒体视频 33 | // Intent intent = new Intent(Intent.ACTION_VIEW); 34 | // intent.setDataAndType(uri, "video/*"); 35 | // startActivity(intent); 36 | 37 | IJKVideoPlayActivity.intentTo(MainActivity.this, testurl, "测试视频"); 38 | } 39 | }); 40 | 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 |