Skip to content

Commit

Permalink
删除APlayer
Browse files Browse the repository at this point in the history
  • Loading branch information
Doikki committed Mar 10, 2020
1 parent 3516a9c commit 7eedb6c
Show file tree
Hide file tree
Showing 12 changed files with 3 additions and 296 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import com.google.android.exoplayer2.RenderersFactory;
import com.google.android.exoplayer2.SimpleExoPlayer;
import com.google.android.exoplayer2.analytics.AnalyticsCollector;
import com.google.android.exoplayer2.source.DefaultMediaSourceEventListener;
import com.google.android.exoplayer2.source.MediaSource;
import com.google.android.exoplayer2.source.MediaSourceEventListener;
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
Expand Down Expand Up @@ -135,10 +134,9 @@ public void prepareAsync() {
mInternalPlayer.prepare(mMediaSource);
}

private MediaSourceEventListener mMediaSourceEventListener = new DefaultMediaSourceEventListener() {
private MediaSourceEventListener mMediaSourceEventListener = new MediaSourceEventListener() {
@Override
public void onReadingStarted(int windowIndex, MediaSource.MediaPeriodId mediaPeriodId) {
super.onReadingStarted(windowIndex, mediaPeriodId);
if (mPlayerEventListener != null && mIsPreparing) {
mPlayerEventListener.onPrepared();
}
Expand Down
1 change: 0 additions & 1 deletion dkplayer-players/thunder/.gitignore

This file was deleted.

32 changes: 0 additions & 32 deletions dkplayer-players/thunder/build.gradle

This file was deleted.

Binary file removed dkplayer-players/thunder/libs/APlayerAndroid.aar
Binary file not shown.
2 changes: 0 additions & 2 deletions dkplayer-players/thunder/src/main/AndroidManifest.xml

This file was deleted.

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions dkplayer-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@ android {
}
}

repositories {
flatDir {
dirs project(':dkplayer-players:thunder').file('libs')
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
// debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0'
Expand All @@ -93,7 +87,6 @@ dependencies {
implementation project(':dkplayer-ui')
implementation project(path: ':dkplayer-players:ijk')
implementation project(path: ':dkplayer-players:exo')
implementation project(path: ':dkplayer-players:thunder')
//缓存
implementation project(':dkplayer-videocache')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.dueeeke.videoplayer.player.PlayerFactory;
import com.dueeeke.videoplayer.player.VideoViewConfig;
import com.dueeeke.videoplayer.player.VideoViewManager;
import com.dueeeke.videoplayer.thunder.ThunderMediaPlayerFactory;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.yanzhenjie.permission.AndPermission;
import com.yanzhenjie.permission.runtime.Permission;
Expand Down Expand Up @@ -66,8 +65,6 @@ protected void initView() {
setTitle(getResources().getString(R.string.app_name) + " (IjkPlayer)");
} else if (factory instanceof AndroidMediaPlayerFactory) {
setTitle(getResources().getString(R.string.app_name) + " (MediaPlayer)");
} else if (factory instanceof ThunderMediaPlayerFactory) {
setTitle(getResources().getString(R.string.app_name) + " (APlayer)");
} else {
setTitle(getResources().getString(R.string.app_name) + " (unknown)");
}
Expand Down Expand Up @@ -105,7 +102,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
break;
}

if (itemId == R.id.ijk || itemId == R.id.exo || itemId == R.id.media || itemId == R.id.thunder) {
if (itemId == R.id.ijk || itemId == R.id.exo || itemId == R.id.media) {
//切换播放核心,不推荐这么做,我这么写只是为了方便测试
VideoViewConfig config = VideoViewManager.getConfig();
try {
Expand All @@ -125,10 +122,6 @@ public boolean onOptionsItemSelected(MenuItem item) {
playerFactory = AndroidMediaPlayerFactory.create();
setTitle(getResources().getString(R.string.app_name) + " (MediaPlayer)");
break;
case R.id.thunder:
playerFactory = ThunderMediaPlayerFactory.create();
setTitle(getResources().getString(R.string.app_name) + " (APlayer)");
break;
}
mPlayerFactoryField.set(config, playerFactory);
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import com.dueeeke.videoplayer.exo.ExoMediaPlayerFactory;
import com.dueeeke.videoplayer.ijk.IjkPlayerFactory;
import com.dueeeke.videoplayer.player.AndroidMediaPlayerFactory;
import com.dueeeke.videoplayer.thunder.ThunderMediaPlayerFactory;

/**
* 调试信息
Expand Down Expand Up @@ -88,8 +87,6 @@ protected String getCurrentPlayer() {
player = "IjkPlayer";
} else if (playerFactory instanceof AndroidMediaPlayerFactory) {
player = "MediaPlayer";
} else if (playerFactory instanceof ThunderMediaPlayerFactory) {
player = "APlayer";
} else {
player = "unknown";
}
Expand Down
2 changes: 0 additions & 2 deletions dkplayer-sample/src/main/res/menu/main_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
android:title="ExoPlayer"/>
<item android:id="@+id/media"
android:title="MediaPlayer"/>
<item android:id="@+id/thunder"
android:title="APlayer"/>
</menu>
</item>
</menu>
3 changes: 1 addition & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ include ':dkplayer-sample', ':dkplayer-videocache'
include ':dkplayer-java'
include ':dkplayer-ui'
include 'dkplayer-players:ijk'
include 'dkplayer-players:exo'
include 'dkplayer-players:thunder'
include 'dkplayer-players:exo'

0 comments on commit 7eedb6c

Please sign in to comment.