README.md 5.5 KB
Newer Older
S
readme  
shuyu 已提交
1

S
readme  
shuyu 已提交
2
![](https://github.com/CarGuo/GSYVideoPlayer/blob/master/home_logo.png)
S
readme  
shuyu 已提交
3

S
readme  
shuyu 已提交
4
## 基于[IJKPlayer](https://github.com/Bilibili/ijkplayer),实现了多功能的视频播放器。
S
readme  
shuyu 已提交
5

S
readme  
shuyu 已提交
6 7 8 9 10 11
* **支持基本的拖动,声音、亮度调节。**
* **支持边播边缓存,使用了[AndroidVideoCache](https://github.com/danikula/AndroidVideoCache)。**
* **支持视频本身自带rotation的旋转。**
* **增加了重力旋转与手动旋转的同步支持。**
* **支持列表播放。**
* **直接添加控件为封面。**
S
shuyu 已提交
12
* **全屏和播放等的动画效果。**
S
readme  
shuyu 已提交
13 14 15
* **列表的全屏效果优化,多种配置模式。**
* **列表的小窗口播放,可拖动。**
* **网络视频加载速度。**
S
shuyu 已提交
16
* **锁定/解锁全屏点击功能。**
S
shuyu 已提交
17
* **支持快播和慢播。**
S
readme  
shuyu 已提交
18
* **调整显示比例:默认、16:9、4:3。**
S
1.4.4  
shuyu 已提交
19
* **调整不同清晰度的支持。**
S
readme  
shuyu 已提交
20
* **支持IJKPlayer和EXOPlayer切换。**
S
shuyu 已提交
21
* **进度条小窗口预览(测试)。**
S
readme  
shuyu 已提交
22 23
* **Https支持。**
* **连续播放一个列表的视频。**
S
shuyu 已提交
24
* **支持全屏与非全屏两套布局切换**
S
shuyu 已提交
25
* **弹幕支持**
S
readme  
shuyu 已提交
26

S
shuyu 已提交
27
[![](https://jitpack.io/v/CarGuo/GSYVideoPlayer.svg)](https://jitpack.io/#CarGuo/GSYVideoPlayer)
S
shuyu 已提交
28
[ ![Download](https://api.bintray.com/packages/carguo/GSYVideoPlayer/gsyVideoPlayer/images/download.svg) ](https://bintray.com/carguo/GSYVideoPlayer/gsyVideoPlayer/_latestVersion)
S
readme  
shuyu 已提交
29
[![Build Status](https://travis-ci.org/CarGuo/GSYVideoPlayer.svg?branch=master)](https://travis-ci.org/CarGuo/GSYVideoPlayer)
S
shuyu 已提交
30

S
readme  
shuyu 已提交
31
## 使用依赖(支持jcenter和jitpack)
S
readme  
shuyu 已提交
32

S
readme  
shuyu 已提交
33
### Jcenter 引入方法
S
shuyu 已提交
34 35 36 37 38 39 40 41
```
<dependency>
  <groupId>com.shuyu</groupId>
  <artifactId>GSYVideoPlayer</artifactId>
  <version>1.6.0</version>
  <type>pom</type>
</dependency>
```
S
readme  
shuyu 已提交
42
#### 直接在module下的build.gradle添加
S
shuyu 已提交
43
```
44
compile 'com.shuyu:GSYVideoPlayer:1.6.1'
S
readme  
shuyu 已提交
45

S
shuyu 已提交
46 47
```

S
readme  
shuyu 已提交
48 49 50 51
--------------------------------------------------------------------------------

### JitPack引入方法
#### 在project下的build.gradle添加
S
readme  
shuyu 已提交
52
```
S
shuyu 已提交
53 54 55 56 57 58
allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}
S
readme  
shuyu 已提交
59
```
S
readme  
shuyu 已提交
60

S
readme  
shuyu 已提交
61
#### 在module下的build.gradle添加
S
readme  
shuyu 已提交
62

S
readme  
shuyu 已提交
63
```
S
readme  
shuyu 已提交
64
dependencies {
65
        compile 'com.github.CarGuo:GSYVideoPlayer:v1.6.1'
S
readme  
shuyu 已提交
66
}
S
readme  
shuyu 已提交
67
```
S
readme  
shuyu 已提交
68

S
readme  
shuyu 已提交
69
--------------------------------------------------------------------------------
S
v1.5.8  
shuyu 已提交
70

S
readme  
shuyu 已提交
71
* ### 下方文档以及问题集锦,你想要知道的大部分都在里面。
S
shuyu 已提交
72

S
readme  
shuyu 已提交
73
* ### !!有问题请先下面问题集锦中查阅(如依赖不成功,播放不成功等等)!!
S
v1.5.7  
shuyu 已提交
74

S
readme  
shuyu 已提交
75
* ### QQ群,有兴趣的可以进来,无底线欢迎:174815284 。
S
readme  
shuyu 已提交
76

S
readme  
shuyu 已提交
77 78 79 80
--------------------------------------------------------------------------------

## 文档Wiki

S
shuyu 已提交
81
### [--- 使用说明、接口文档 - 入口](https://github.com/CarGuo/GSYVideoPlayer/wiki)
S
readme  
shuyu 已提交
82

S
readme  
shuyu 已提交
83 84
## 其他

S
shuyu 已提交
85 86 87 88 89
### [--- 版本更新说明 - 入口](https://github.com/CarGuo/GSYVideoPlayer/blob/master/UPDATE_VERSION.md)
### [--- 问题集锦 - 入口 ](https://github.com/CarGuo/GSYVideoPlayer/blob/master/QUESTION.md)
### [--- IJKPlayer问题 - 入口](http://www.jianshu.com/p/220b00d00deb) 
### [--- IJKPlayer编译自定义SO - 入口](http://www.jianshu.com/p/bd289e25d272) 
### [--- 简书详解 - 入口](http://www.jianshu.com/p/9fe377dd9750)
S
readme  
shuyu 已提交
90

S
shuyu 已提交
91
 
S
readme  
shuyu 已提交
92
## 运行效果
S
readme  
shuyu 已提交
93

S
fix img  
shuyu 已提交
94 95 96
<img src="https://github.com/CarGuo/GSYVideoPlayer/blob/master/01.jpg" width="218px" height="120px"/>
<img src="https://github.com/CarGuo/GSYVideoPlayer/blob/master/02.jpg" width="120px" height="218px"/>
<img src="https://github.com/CarGuo/GSYVideoPlayer/blob/master/03.jpg" width="120px" height="218px"/>
S
1.1.5  
shuyu 已提交
97
<img src="https://github.com/CarGuo/GSYVideoPlayer/blob/master/04.jpg" width="120px" height="218px"/>
S
readme  
shuyu 已提交
98
 
S
1.1.5  
shuyu 已提交
99

S
readme  
shuyu 已提交
100
* ### 1、打开一个播放
S
shuyu 已提交
101
<img src="https://github.com/CarGuo/GSYVideoPlayer/blob/master/01.gif" width="240px" height="426px"/>
S
1.1.5  
shuyu 已提交
102

S
readme  
shuyu 已提交
103
* ### 2、列表/详情模式
S
readme  
shuyu 已提交
104
<img src="https://github.com/CarGuo/GSYVideoPlayer/blob/master/02.gif" width="240px" height="426px"/>
S
readme  
shuyu 已提交
105
<img src="https://github.com/CarGuo/GSYVideoPlayer/blob/master/05.gif" width="240px" height="426px"/>
S
shuyu 已提交
106 107
<img src="https://github.com/CarGuo/GSYVideoPlayer/blob/master/04.gif" width="240px" height="426px"/>

S
shuyu 已提交
108
* ### 3、弹幕
S
readme  
shuyu 已提交
109
<img src="https://github.com/CarGuo/GSYVideoPlayer/blob/master/09.gif" width="360px" height="240px"/>
S
shuyu 已提交
110 111 112


* ### 4、进度条小窗口预览
S
shuyu 已提交
113 114
<img src="https://github.com/CarGuo/GSYVideoPlayer/blob/master/07.gif" width="426px" height="240px"/>

S
shuyu 已提交
115 116
## 近期版本

S
shuyu 已提交
117 118 119 120 121
### 1.6.1(2017-03-23)
* setSpeed接口修改为支持播放中设置
* 内存优化
* update ijk to 0.7.8.1
* 增加超时接口 GSYVideoManager
S
shuyu 已提交
122 123
```
/**
S
shuyu 已提交
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
 * 是否需要在buffer缓冲时,增加外部超时判断,目前对于刚开始超时还没效果
 *
 * 超时后会走onError接口,播放器通过onPlayError回调出
 *
 * 错误码为 : BUFFER_TIME_OUT_ERROR = -192
 *
 * 由于onError之后执行GSYVideoPlayer的OnError,如果不想触发错误,
 * 可以重载onError,在super之前拦截处理。
 *
 * public void onError(int what, int extra){
 *     do you want before super and return;
 *     super.onError(what, extra)
 * }
 *
 * @param timeOut          超时时间,毫秒 默认8000
 * @param needTimeOutOther 是否需要延时设置,默认关闭
S
shuyu 已提交
140
 */
S
shuyu 已提交
141 142 143 144
public void setTimeOut(int timeOut, boolean needTimeOutOther) {
    this.timeOut = timeOut;
    this.needTimeOutOther = needTimeOutOther;
}
S
shuyu 已提交
145 146 147

```

S
shuyu 已提交
148

S
shuyu 已提交
149
### 更多版本请查阅:[版本更新说明](https://github.com/CarGuo/GSYVideoPlayer/blob/master/UPDATE_VERSION.md)
S
readme  
shuyu 已提交
150

S
readme  
shuyu 已提交
151
## 混淆
S
shuyu 已提交
152

S
shuyu 已提交
153 154 155
```
-keep class tv.danmaku.ijk.** { *; }
-dontwarn tv.danmaku.ijk.**
156 157
-keep class com.shuyu.gsyvideoplayer.** { *; }
-dontwarn com.shuyu.gsyvideoplayer.**
S
todo  
shuyu 已提交
158
```
159 160 161 162 163 164

## License

```
请参看IJKPlayer和AndroidVideoCache相关协议。
```