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/v5.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathen committed Jul 15, 2017
2 parents cbb6265 + 68e8072 commit acaa2c1
Show file tree
Hide file tree
Showing 29 changed files with 192 additions and 68 deletions.
8 changes: 4 additions & 4 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%7C4.6.3%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-5.6-green.svg"></a>
<a href="http://search.maven.org/#artifactdetails%7Cfm.jiecao%7Cjiecaovideoplayer%7C4.6.3%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-5.7-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 @@ -28,7 +28,7 @@

## 效果

**[jiecaovideoplayer-5.6.apk](https://github.com/lipangit/JieCaoVideoPlayer/releases/download/v5.6/jiecaovideoplayer-5.6.apk)**
**[jiecaovideoplayer-5.7.apk](https://github.com/lipangit/JieCaoVideoPlayer/releases/download/v5.7/jiecaovideoplayer-5.7.apk)**

![Demo Screenshot][1]

Expand All @@ -38,10 +38,10 @@

1.添加类库
```gradle
compile 'fm.jiecao:jiecaovideoplayer:5.6'
compile 'fm.jiecao:jiecaovideoplayer:5.7'
```

[或直接下载jar包](https://github.com/lipangit/JieCaoVideoPlayer/releases/tag/v5.6)
[或直接下载jar包](https://github.com/lipangit/JieCaoVideoPlayer/releases/tag/v5.7)

2.添加布局
```xml
Expand Down
8 changes: 4 additions & 4 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%7C4.6.3%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-5.6-green.svg"></a>
<a href="http://search.maven.org/#artifactdetails%7Cfm.jiecao%7Cjiecaovideoplayer%7C4.6.3%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-5.7-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 Down Expand Up @@ -30,7 +30,7 @@ I think the final solution for play video in android is android.media.MediaPlaye

## Effect

**[jiecaovideoplayer-5.6.apk](https://github.com/lipangit/JieCaoVideoPlayer/releases/download/v5.6/jiecaovideoplayer-5.6.apk)**
**[jiecaovideoplayer-5.7.apk](https://github.com/lipangit/JieCaoVideoPlayer/releases/download/v5.7/jiecaovideoplayer-5.7.apk)**

![Demo Screenshot][1]

Expand All @@ -40,10 +40,10 @@ Even the custom UI, or has changed to the Library, is also the five steps to use

1.Import library
```gradle
compile 'fm.jiecao:jiecaovideoplayer:5.6'
compile 'fm.jiecao:jiecaovideoplayer:5.7'
```

[Or download lib](https://github.com/lipangit/JieCaoVideoPlayer/releases/tag/v5.6)
[Or download lib](https://github.com/lipangit/JieCaoVideoPlayer/releases/tag/v5.7)

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 25
versionCode 60
versionName "5.6"
versionCode 61
versionName "5.7"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,12 @@
package fm.jiecao.jiecaovideoplayer.CustomView;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.SeekBar;
import android.widget.TextView;
import android.widget.Toast;

import java.util.Timer;
import java.util.TimerTask;

import fm.jiecao.jcvideoplayer_lib.JCUserAction;
import fm.jiecao.jcvideoplayer_lib.JCUserActionStandard;
import fm.jiecao.jcvideoplayer_lib.JCUtils;
import fm.jiecao.jcvideoplayer_lib.JCVideoPlayer;
import fm.jiecao.jcvideoplayer_lib.JCVideoPlayerStandard;
import fm.jiecao.jiecaovideoplayer.R;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@
import fm.jiecao.jcvideoplayer_lib.JCVideoPlayerStandard;

/**
* 这里可以监听到视频播放的生命周期和播放状态
* 所有关于视频的逻辑都应该写在这里
* Created by Nathen on 2017/7/2.
*/
public class JCVideoPlayerStandardShowState extends JCVideoPlayerStandard {
public JCVideoPlayerStandardShowState(Context context) {
public class MyJCVideoPlayerStandard extends JCVideoPlayerStandard {
public MyJCVideoPlayerStandard(Context context) {
super(context);
}

public JCVideoPlayerStandardShowState(Context context, AttributeSet attrs) {
public MyJCVideoPlayerStandard(Context context, AttributeSet attrs) {
super(context, attrs);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.view.View;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;
Expand Down
11 changes: 6 additions & 5 deletions app/src/main/java/fm/jiecao/jiecaovideoplayer/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@
import fm.jiecao.jcvideoplayer_lib.JCUserActionStandard;
import fm.jiecao.jcvideoplayer_lib.JCVideoPlayer;
import fm.jiecao.jcvideoplayer_lib.JCVideoPlayerStandard;
import fm.jiecao.jiecaovideoplayer.CustomView.MyJCVideoPlayerStandard;

/**
* Created by Nathen on 16/7/22.
*/
public class MainActivity extends AppCompatActivity implements View.OnClickListener {


JCVideoPlayerStandard mJcVideoPlayerStandard;
MyJCVideoPlayerStandard myJCVideoPlayerStandard;

Button mTinyWindow, mAutoTinyWindow, mAboutListView, mPlayDirectly, mAboutApi, mAboutWebView;

Expand All @@ -44,12 +45,12 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
mAboutApi.setOnClickListener(this);
mAboutWebView.setOnClickListener(this);

mJcVideoPlayerStandard = (JCVideoPlayerStandard) findViewById(R.id.jc_video);
mJcVideoPlayerStandard.setUp("http://video.jiecao.fm/11/23/xin/%E5%81%87%E4%BA%BA.mp4"
myJCVideoPlayerStandard = (MyJCVideoPlayerStandard) findViewById(R.id.jc_video);
myJCVideoPlayerStandard.setUp("http://video.jiecao.fm/11/23/xin/%E5%81%87%E4%BA%BA.mp4"
, JCVideoPlayerStandard.SCREEN_LAYOUT_NORMAL, "嫂子不信");
Picasso.with(this)
.load("http://img4.jiecaojingxuan.com/2016/11/23/00b026e7-b830-4994-bc87-38f4033806a6.jpg@!640_360")
.into(mJcVideoPlayerStandard.thumbImageView);
.into(myJCVideoPlayerStandard.thumbImageView);

JCVideoPlayer.setJcUserAction(new MyUserActionStandard());
}
Expand All @@ -72,7 +73,7 @@ public void onBackPressed() {
public void onClick(View v) {
switch (v.getId()) {
case R.id.tiny_window:
mJcVideoPlayerStandard.startWindowTiny();
myJCVideoPlayerStandard.startWindowTiny();
break;
case R.id.auto_tiny_window:
startActivity(new Intent(MainActivity.this, AutoTinyActivity.class));
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
android:layout_height="wrap_content"
android:orientation="vertical">

<fm.jiecao.jcvideoplayer_lib.JCVideoPlayerStandard
<fm.jiecao.jiecaovideoplayer.CustomView.MyJCVideoPlayerStandard
android:id="@+id/jc_video"
android:layout_width="match_parent"
android:layout_height="200dp" />
Expand Down
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 = "5.6"
version = "5.7"

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 16
targetSdkVersion 25
versionCode 60
versionName "5.6"
versionCode 61
versionName "5.7"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ public void onClick(View v) {
return;
}
if (currentState == CURRENT_STATE_NORMAL || currentState == CURRENT_STATE_ERROR) {
if (!url.startsWith("file") && !JCUtils.isWifiConnected(getContext()) && !WIFI_TIP_DIALOG_SHOWED) {
if (!url.startsWith("file") && !url.startsWith("/") &&
!JCUtils.isWifiConnected(getContext()) && !WIFI_TIP_DIALOG_SHOWED) {
showWifiDialog(JCUserActionStandard.ON_CLICK_START_ICON);
return;
}
Expand Down
Loading

0 comments on commit acaa2c1

Please sign in to comment.