Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/v3.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathen committed Jun 18, 2016
2 parents f0d984a + 38c809a commit 825095b
Show file tree
Hide file tree
Showing 19 changed files with 90 additions and 78 deletions.
14 changes: 7 additions & 7 deletions README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
--
<p align="center">
<a href="http://developer.android.com/index.html"><img src="https://img.shields.io/badge/platform-android-green.svg"></a>
<a href="http://search.maven.org/#artifactdetails%7Cfm.jiecao%7Cjiecaovideoplayer%7C3.5%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-3.5-green.svg"></a>
<a href="http://search.maven.org/#artifactdetails%7Cfm.jiecao%7Cjiecaovideoplayer%7C3.6%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-3.6-green.svg"></a>
<a href="http://choosealicense.com/licenses/mit/"><img src="https://img.shields.io/badge/license-MIT-green.svg"></a>
<a href="https://android-arsenal.com/details/1/3269"><img src="https://img.shields.io/badge/Android%20Arsenal-jiecaovideoplayer-green.svg?style=true"></a>
</p>
Expand All @@ -22,28 +22,28 @@

##效果

**[jiecaovideoplayer-3.5-demo.apk](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-3.5-demo.apk)**
**[jiecaovideoplayer-3.6-demo.apk](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-3.6-demo.apk)**

![Demo Screenshot][1]

##使用
1.添加类库
```gradle
compile 'fm.jiecao:jiecaovideoplayer:3.5'
compile 'fm.jiecao:jiecaovideoplayer:3.6'
```

或直接下载

* [jiecaovideoplayer-3.5.aar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-3.5.aar)
* [jiecaovideoplayer-3.5-javadoc.jar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-3.5-javadoc.jar)
* [jiecaovideoplayer-3.5-sources.jar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-3.5-sources.jar)
* [jiecaovideoplayer-3.6.aar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-3.6.aar)
* [jiecaovideoplayer-3.6-javadoc.jar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-3.6-javadoc.jar)
* [jiecaovideoplayer-3.6-sources.jar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-3.6-sources.jar)

2.添加布局
```xml
<fm.jiecao.jcvideoplayer_lib.JCVideoPlayerStandard
android:id="@+id/custom_videoplayer_standard"
android:layout_width="match_parent"
android:layout_height="200dp"/>
android:lay3.6out_height="200dp"/>
```

3.设置视频地址、缩略图地址、标题
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
--
<p align="center">
<a href="http://developer.android.com/index.html"><img src="https://img.shields.io/badge/platform-android-green.svg"></a>
<a href="http://search.maven.org/#artifactdetails%7Cfm.jiecao%7Cjiecaovideoplayer%7C3.5%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-3.5-green.svg"></a>
<a href="http://search.maven.org/#artifactdetails%7Cfm.jiecao%7Cjiecaovideoplayer%7C3.6%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-3.6-green.svg"></a>
<a href="http://choosealicense.com/licenses/mit/"><img src="https://img.shields.io/badge/license-MIT-green.svg"></a>
<a href="https://android-arsenal.com/details/1/3269"><img src="https://img.shields.io/badge/Android%20Arsenal-jiecaovideoplayer-green.svg?style=true"></a>
</p>
Expand All @@ -26,21 +26,21 @@ Android truly full-screen capabilities, the Android platform to become the most

## Effect

**[jiecaovideoplayer-3.5-demo.apk](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-3.5-demo.apk)**
**[jiecaovideoplayer-3.6-demo.apk](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-3.6-demo.apk)**

![Demo Screenshot][1]

## Usage
1.Import library
```gradle
compile 'fm.jiecao:jiecaovideoplayer:3.5'
compile 'fm.jiecao:jiecaovideoplayer:3.6'
```

Or download lib

* [jiecaovideoplayer-3.5.aar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-3.5.aar)
* [jiecaovideoplayer-3.5-javadoc.jar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-3.5-javadoc.jar)
* [jiecaovideoplayer-3.5-sources.jar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-3.5-sources.jar)
* [jiecaovideoplayer-3.6.aar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-3.6.aar)
* [jiecaovideoplayer-3.6-javadoc.jar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-3.6-javadoc.jar)
* [jiecaovideoplayer-3.6-sources.jar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-3.6-sources.jar)

2.Add JCVideoPlayer in your layout
```xml
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "fm.jiecao.jiecaovideoplayer"
minSdkVersion 16
targetSdkVersion 23
versionCode 27
versionName "3.5"
versionCode 28
versionName "3.6"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ protected void onPause() {
JCVideoPlayer.releaseAllVideos();
}

JCBuriedPointStandard jcBuriedPointStandard = new JCBuriedPointStandard() {
public static JCBuriedPointStandard jcBuriedPointStandard = new JCBuriedPointStandard() {
@Override
public void onClickStartThumb(String url, Object... objects) {
Log.i("Buried_Point", "onClickStartThumb" + " title is : " + (objects.length == 0 ? "" : objects[0]) + " mUrl is : " + url);
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/layout/jc_layout_standard_fresco.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
android:layout_height="match_parent"
android:background="@android:color/black">

<SurfaceView
android:layout_width="0dp"
android:layout_height="0dp" />

<RelativeLayout
android:id="@+id/surface_container"
android:layout_width="match_parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
android:layout_height="match_parent"
android:background="@android:color/black">

<SurfaceView
android:layout_width="0dp"
android:layout_height="0dp" />

<RelativeLayout
android:id="@+id/surface_container"
android:layout_width="match_parent"
Expand Down
Binary file removed downloads/jiecaovideoplayer-3.5-javadoc.jar
Binary file not shown.
Binary file removed downloads/jiecaovideoplayer-3.5-sources.jar
Binary file not shown.
Binary file removed downloads/jiecaovideoplayer-3.5.aar
Binary file not shown.
Binary file not shown.
Binary file added downloads/jiecaovideoplayer-3.6-javadoc.jar
Binary file not shown.
Binary file added downloads/jiecaovideoplayer-3.6-sources.jar
Binary file not shown.
Binary file added downloads/jiecaovideoplayer-3.6.aar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/maven_push.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ signing {

group = "fm.jiecao"
archivesBaseName = "jiecaovideoplayer"
version = "3.5"
version = "3.6"

uploadArchives {
repositories {
Expand Down
4 changes: 2 additions & 2 deletions jcvideoplayer-lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 27
versionName "3.5"
versionCode 28
versionName "3.6"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ public abstract class JCVideoPlayer extends FrameLayout implements View.OnClickL
protected static final int CURRENT_STATE_NORMAL = 0;
protected static final int CURRENT_STATE_PREPAREING = 1;
protected static final int CURRENT_STATE_PLAYING = 2;
protected static final int CURRENT_STATE_PAUSE = 3;
protected static final int CURRENT_STATE_AUTO_COMPLETE = 4;
protected static final int CURRENT_STATE_ERROR = 5;
protected static final int CURRENT_STATE_PLAYING_BUFFERING_START = 3;
protected static final int CURRENT_STATE_PAUSE = 5;
protected static final int CURRENT_STATE_AUTO_COMPLETE = 6;
protected static final int CURRENT_STATE_ERROR = 7;
protected static int BACKUP_PLAYING_BUFFERING_STATE = 0;

protected boolean mTouchingProgressBar = false;
protected boolean mIfCurrentIsFullscreen = false;
Expand Down Expand Up @@ -327,6 +329,7 @@ protected void addSurfaceView() {
if (textureViewContainer.getChildCount() > 0) {
textureViewContainer.removeAllViews();
}
textureView = null;
textureView = new JCResizeTextureView(getContext());
textureView.setSurfaceTextureListener(this);

Expand All @@ -348,7 +351,8 @@ public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int h

@Override
public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
return false;
surface.release();
return true;
}

@Override
Expand Down Expand Up @@ -477,6 +481,7 @@ protected void showProgressDialog(float deltaX) {
}
int totalTime = getDuration();
mResultTimePosition = (int) (mDownPosition + deltaX * totalTime / mScreenWidth);
if (mResultTimePosition > totalTime) mResultTimePosition = totalTime;
mDialogCurrentTime.setText(JCUtils.stringForTime(mResultTimePosition));
mDialogTotalTime.setText(" / " + JCUtils.stringForTime(totalTime) + "");
mDialogProgressBar.setProgress(mResultTimePosition * 100 / totalTime);
Expand Down Expand Up @@ -582,6 +587,8 @@ public void onCompletion() {
}
JCMediaManager.instance().listener = null;
JCMediaManager.instance().lastListener = null;
JCMediaManager.instance().currentVideoWidth = 0;
JCMediaManager.instance().currentVideoHeight = 0;

AudioManager mAudioManager = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE);
mAudioManager.abandonAudioFocus(onAudioFocusChangeListener);
Expand Down Expand Up @@ -612,18 +619,15 @@ public void onError(int what, int extra) {
public void onInfo(int what, int extra) {
Log.i(TAG, "onInfo what - " + what + " extra - " + extra);
if (what == MediaPlayer.MEDIA_INFO_BUFFERING_START) {
onMediaInfoBuffering(true);
BACKUP_PLAYING_BUFFERING_STATE = mCurrentState;
setStateAndUi(CURRENT_STATE_PLAYING_BUFFERING_START);
Log.i(TAG, "MEDIA_INFO_BUFFERING_START");
} else if (what == MediaPlayer.MEDIA_INFO_BUFFERING_END) {
onMediaInfoBuffering(false);
setStateAndUi(BACKUP_PLAYING_BUFFERING_STATE);
Log.i(TAG, "MEDIA_INFO_BUFFERING_END");
}
}

protected void onMediaInfoBuffering(boolean statues) {
}


@Override
public void onVideoSizeChanged() {
int mVideoWidth = JCMediaManager.instance().currentVideoWidth;
Expand Down
Loading

0 comments on commit 825095b

Please sign in to comment.