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/v1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathen committed Jan 25, 2016
2 parents 35c9a66 + fef9ff7 commit 6c5be67
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 102 deletions.
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 1
versionName "1.0"
versionCode 2
versionName "1.1"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ protected void onCreate(Bundle savedInstanceState) {
videoController1 = (JCVideoPlayer) findViewById(R.id.videocontroller1);
videoController1.setUp("http://2449.vod.myqcloud.com/2449_43b6f696980311e59ed467f22794e792.f20.mp4",
"http://p.qpic.cn/videoyun/0/2449_43b6f696980311e59ed467f22794e792_1/640",
"嫂子别摸我", false);
"嫂子别摸我");

videoController2 = (JCVideoPlayer) findViewById(R.id.videocontroller2);
videoController2.setUp("http://2449.vod.myqcloud.com/2449_a80a72289b1211e5a28d6dc08193c3c9.f20.mp4",
"http://cos.myqcloud.com/1000264/qcloud_video_attachment/842646334/vod_cover/cover1449294460.jpg",
"嫂子还摸我", false, false);
videoController2.setUp("http://2449.vod.myqcloud.com/2449_ded7b566b37911e5942f0b208e48548d.f20.mp4",//
"http://p.qpic.cn/videoyun/0/2449_ded7b566b37911e5942f0b208e48548d_2/640",
"嫂子还摸我", false);
EventBus.getDefault().register(this);
}

Expand Down Expand Up @@ -65,6 +65,5 @@ public void onEventMainThread(VideoEvents event) {
} else if (event.type == VideoEvents.POINT_QUIT_FULLSCREEN) {
Log.i("Video Event", "POINT_QUIT_FULLSCREEN");
}
// Log.i("Video Event", "type : " + event.type);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Log;

import java.io.IOException;
Expand Down Expand Up @@ -37,6 +38,7 @@ public JCMediaPlayer() {
}

public void prepareToPlay(Context context, String url) {
if (TextUtils.isEmpty(url)) return;
try {
mediaPlayer.release();
mediaPlayer = new MediaPlayer();
Expand Down Expand Up @@ -66,7 +68,7 @@ public void onCompletion(MediaPlayer mp) {

@Override
public void onBufferingUpdate(MediaPlayer mp, int percent) {
VideoEvents videoEvents = new VideoEvents().setType(VideoEvents.VE_MEDIAPLAYER_BUFFERUPDATE);
VideoEvents videoEvents = new VideoEvents().setType(VideoEvents.VE_MEDIAPLAYER_UPDATE_BUFFER);
videoEvents.obj = percent;
EventBus.getDefault().post(videoEvents);
}
Expand Down
Loading

0 comments on commit 6c5be67

Please sign in to comment.