Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Doikki committed Jul 20, 2018
2 parents 8fc17ac + 84e06fd commit 7d7aa29
Show file tree
Hide file tree
Showing 144 changed files with 162 additions and 106 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ allprojects {
dependencies {
# 必选,可兼容市面上绝大部分设备
implementation 'com.github.dueeeke.dkplayer:dkplayer-java:2.5.1'
implementation 'com.github.dueeeke.dkplayer:dkplayer-armv7a:2.5.1'
implementation 'com.github.dueeeke.dkplayer:dkplayer-java:2.5.2'
implementation 'com.github.dueeeke.dkplayer:dkplayer-armv7a:2.5.2'
# 可选,用于兼容一些其他的CPU架构
implementation 'com.github.dueeeke.dkplayer:dkplayer-armv5:2.5.1'
implementation 'com.github.dueeeke.dkplayer:dkplayer-arm64:2.5.1'
implementation 'com.github.dueeeke.dkplayer:dkplayer-x86:2.5.1'
implementation 'com.github.dueeeke.dkplayer:dkplayer-x86_64:2.5.1'
implementation 'com.github.dueeeke.dkplayer:dkplayer-armv5:2.5.2'
implementation 'com.github.dueeeke.dkplayer:dkplayer-arm64:2.5.2'
implementation 'com.github.dueeeke.dkplayer:dkplayer-x86:2.5.2'
implementation 'com.github.dueeeke.dkplayer:dkplayer-x86_64:2.5.2'
# 可选,里面包含StandardVideoController的实现
implementation 'com.github.dueeeke.dkplayer:dkplayer-ui:2.5.1'
implementation 'com.github.dueeeke.dkplayer:dkplayer-ui:2.5.2'
}
```
或者将library下载并导入项目中使用
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
applicationId "com.dueeeke.dkplayer"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 25
versionName "2.5.1"
versionCode 26
versionName "2.5.2"

ndk {
//打包时只保留armeabi-v7a so
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.view.View;

import com.dueeeke.dkplayer.R;
Expand Down Expand Up @@ -36,6 +37,14 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
}
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
finish();
}
return super.onOptionsItemSelected(item);
}

public void skipToVodPlayer(View view) {
// String path = Environment.getExternalStorageDirectory().getAbsolutePath();
// String url = "file://" + path + File.separator + "test.mp4";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.view.View;

import com.dueeeke.dkplayer.R;
Expand All @@ -27,6 +28,14 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
}
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
finish();
}
return super.onOptionsItemSelected(item);
}

public void startFullScreen(View view) {
startActivity(new Intent(this, FullScreenActivity.class));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.view.View;

import com.dueeeke.dkplayer.R;
Expand All @@ -27,6 +28,14 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
}
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
finish();
}
return super.onOptionsItemSelected(item);
}

public void list(View view) {
startActivity(new Intent(this, ListViewActivity.class));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,21 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
public void onVideoPaused() {
super.onVideoPaused();
updatePictureInPictureActions(
R.drawable.ic_action_play_arrow, "播放", CONTROL_TYPE_PLAY, REQUEST_PLAY);
R.drawable.dkplayer_ic_action_play_arrow, "播放", CONTROL_TYPE_PLAY, REQUEST_PLAY);
}

@Override
public void onVideoStarted() {
super.onVideoStarted();
updatePictureInPictureActions(
R.drawable.ic_action_pause, "暂停", CONTROL_TYPE_PAUSE, REQUEST_PAUSE);
R.drawable.dkplayer_ic_action_pause, "暂停", CONTROL_TYPE_PAUSE, REQUEST_PAUSE);
}

@Override
public void onComplete() {
super.onComplete();
updatePictureInPictureActions(
R.drawable.ic_action_replay, "重新播放", CONTROL_TYPE_PLAY, REQUEST_PLAY);
R.drawable.dkplayer_ic_action_replay, "重新播放", CONTROL_TYPE_PLAY, REQUEST_PLAY);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
Glide.with(this)
.load("http://sh.people.com.cn/NMediaFile/2016/0112/LOCAL201601121344000138197365721.jpg")
.asBitmap()
.animate(R.anim.anim_player_alpha_in)
.animate(R.anim.dkplayer_anim_alpha_in)
.placeholder(android.R.color.darker_gray)
.into(controller.getThumb());
ijkVideoView.setUrl(URL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;

Expand All @@ -24,6 +25,14 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
}
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
finish();
}
return super.onOptionsItemSelected(item);
}


public void pip(View view) {
startActivity(new Intent(this, PIPActivity.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void onBindViewHolder(final VideoHolder holder, int position) {
Glide.with(context)
.load(videoBean.getThumb())
.crossFade()
.placeholder(android.R.color.darker_gray)
.placeholder(android.R.color.white)
.into(holder.controller.getThumb());
holder.ijkVideoView.setPlayerConfig(holder.mPlayerConfig);
holder.ijkVideoView.setUrl(videoBean.getUrl());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public class FullScreenController extends GestureVideoController implements View
private ImageView playButton;
private ProgressBar loadingProgress;
private LinearLayout completeContainer;
private Animation showAnim = AnimationUtils.loadAnimation(getContext(), R.anim.anim_player_alpha_in);
private Animation hideAnim = AnimationUtils.loadAnimation(getContext(), R.anim.anim_player_alpha_out);
private Animation showAnim = AnimationUtils.loadAnimation(getContext(), R.anim.dkplayer_anim_alpha_in);
private Animation hideAnim = AnimationUtils.loadAnimation(getContext(), R.anim.dkplayer_anim_alpha_out);


public FullScreenController(@NonNull Context context) {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions app/src/main/res/layout/item_float_video.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
android:layout_width="@dimen/player_play_btn_size"
android:layout_height="@dimen/player_play_btn_size"
android:layout_gravity="center"
android:background="@drawable/shape_play_bg"
android:background="@drawable/dkplayer_shape_play_bg"
android:padding="@dimen/player_default_spacing"
android:src="@drawable/selector_play_button" />
android:src="@drawable/dkplayer_selector_play_button" />
</FrameLayout>

</FrameLayout>
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/layout_ad_controller.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<ImageView
android:id="@+id/back"
style="@style/adIcon"
android:src="@drawable/ic_action_arrow_back" />
android:src="@drawable/dkplayer_ic_action_arrow_back" />

<TextView
android:id="@+id/ad_time"
Expand All @@ -31,7 +31,7 @@
<ImageView
android:id="@+id/iv_play"
style="@style/adIcon"
android:src="@drawable/selector_play_button" />
android:src="@drawable/dkplayer_selector_play_button" />

<View
android:layout_width="0dp"
Expand All @@ -51,6 +51,6 @@
<ImageView
android:id="@+id/fullscreen"
style="@style/adIcon"
android:src="@drawable/selector_full_screen_button" />
android:src="@drawable/dkplayer_selector_full_screen_button" />
</LinearLayout>
</FrameLayout>
10 changes: 5 additions & 5 deletions app/src/main/res/layout/layout_float_controller.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
android:layout_width="@dimen/player_play_btn_size"
android:layout_height="@dimen/player_play_btn_size"
android:layout_gravity="center"
android:background="@drawable/shape_play_bg"
android:background="@drawable/dkplayer_shape_play_bg"
android:padding="@dimen/player_default_spacing"
android:src="@drawable/selector_play_button" />
android:src="@drawable/dkplayer_selector_play_button" />

<ProgressBar
android:id="@+id/loading"
android:layout_width="@dimen/player_play_btn_size"
android:layout_height="@dimen/player_play_btn_size"
android:layout_gravity="center"
android:indeterminateDrawable="@drawable/progress_loading"
android:indeterminateDrawable="@drawable/dkplayer_progress_loading"
android:visibility="gone"
tools:visibility="visible" />
<ImageView
Expand All @@ -26,12 +26,12 @@
android:layout_height="20dp"
android:layout_gravity="end"
android:layout_margin="4dp"
android:src="@drawable/ic_action_close" />
android:src="@drawable/dkplayer_ic_action_close" />
<ImageView
android:id="@+id/btn_skip"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_margin="4dp"
android:src="@drawable/ic_action_fullscreen" />
android:src="@drawable/dkplayer_ic_action_fullscreen" />

</FrameLayout>
24 changes: 12 additions & 12 deletions app/src/main/res/layout/layout_fullscreen_controller.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
android:id="@+id/top_container"
android:layout_width="match_parent"
android:layout_height="@dimen/controller_height"
android:background="@drawable/shape_standard_controller_top_bg"
android:background="@drawable/dkplayer_shape_standard_controller_top_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:visibility="gone"
Expand All @@ -21,7 +21,7 @@
android:layout_height="@dimen/controller_height"
android:layout_gravity="center"
android:padding="@dimen/controller_icon_padding"
android:src="@drawable/ic_action_arrow_back" />
android:src="@drawable/dkplayer_ic_action_arrow_back" />

<TextView
android:id="@+id/title"
Expand All @@ -41,7 +41,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/controller_height"
android:layout_gravity="bottom"
android:background="@drawable/shape_stardard_controller_bottom_bg"
android:background="@drawable/dkplayer_shape_stardard_controller_bottom_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:visibility="gone"
Expand All @@ -52,7 +52,7 @@
android:layout_width="@dimen/controller_height"
android:layout_height="@dimen/controller_height"
android:padding="@dimen/player_default_spacing"
android:src="@drawable/selector_play_button" />
android:src="@drawable/dkplayer_selector_play_button" />

<TextView
android:id="@+id/curr_time"
Expand All @@ -73,8 +73,8 @@
android:background="@null"
android:max="1000"
android:maxHeight="2dp"
android:progressDrawable="@drawable/layer_dkplayer_progress_bar"
android:thumb="@drawable/seekbar_thumb" />
android:progressDrawable="@drawable/dkplayer_layer_progress_bar"
android:thumb="@drawable/dkplayer_seekbar_thumb" />

<TextView
android:id="@+id/total_time"
Expand All @@ -93,9 +93,9 @@
android:layout_height="40dp"
android:layout_gravity="center|start"
android:layout_margin="24dp"
android:background="@drawable/shape_back_bg"
android:background="@drawable/dkplayer_shape_back_bg"
android:padding="@dimen/player_default_spacing"
android:src="@drawable/selector_lock_button"
android:src="@drawable/dkplayer_selector_lock_button"
android:visibility="gone"
tools:visibility="visible" />

Expand All @@ -106,7 +106,7 @@
android:layout_height="1dp"
android:layout_gravity="bottom"
android:max="1000"
android:progressDrawable="@drawable/layer_dkplayer_progress_bar"
android:progressDrawable="@drawable/dkplayer_layer_progress_bar"
android:visibility="gone" />

<LinearLayout
Expand All @@ -122,9 +122,9 @@
android:layout_width="@dimen/player_play_btn_size"
android:layout_height="@dimen/player_play_btn_size"
android:layout_gravity="center"
android:background="@drawable/shape_play_bg"
android:background="@drawable/dkplayer_shape_play_bg"
android:padding="@dimen/controller_icon_padding"
android:src="@drawable/ic_action_replay" />
android:src="@drawable/dkplayer_ic_action_replay" />

<TextView
android:layout_width="wrap_content"
Expand All @@ -140,7 +140,7 @@
android:layout_width="@dimen/player_play_btn_size"
android:layout_height="@dimen/player_play_btn_size"
android:layout_gravity="center"
android:indeterminateDrawable="@drawable/progress_loading"
android:indeterminateDrawable="@drawable/dkplayer_progress_loading"
android:visibility="gone"
tools:visibility="visible" />

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<item name="android:padding">6dp</item>
<item name="android:layout_width">30dp</item>
<item name="android:layout_height">30dp</item>
<item name="android:background">@drawable/shape_back_bg</item>
<item name="android:background">@drawable/dkplayer_shape_back_bg</item>
<item name="android:layout_margin">5dp</item>
</style>
<style name="adText">
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -34,6 +34,6 @@ ext {
buildToolsVersion = '27.0.3'

// App dependencies
supportLibraryVersion = '27.1.1'
supportLibraryVersion = '27.0.2'
ijkPlayerVersion = '0.8.8'
}
Loading

0 comments on commit 7d7aa29

Please sign in to comment.