dependencies.md 2.6 KB
Newer Older
S
shuyu 已提交
1 2 3 4 5 6 7 8 9
## 依赖方法

### 1、JCenter 引入方法(推荐)

**你可以选择下面三种的其中一种,在module下的build.gradle添加。**

#### A、直接引入
```
//完整版引入
S
shuyu 已提交
10
compile 'com.shuyu:GSYVideoPlayer:2.1.2'
S
shuyu 已提交
11 12 13 14 15 16

```

#### B、添加java和你想要的so支持:

```
S
shuyu 已提交
17
compile 'com.shuyu:gsyVideoPlayer-java:2.1.2'
S
shuyu 已提交
18 19

//根据你的需求
S
shuyu 已提交
20 21 22 23 24
compile 'com.shuyu:gsyVideoPlayer-armv5:2.1.2'
compile 'com.shuyu:gsyVideoPlayer-armv7a:2.1.2'
compile 'com.shuyu:gsyVideoPlayer-arm64:2.1.2'
compile 'com.shuyu:gsyVideoPlayer-x64:2.1.2'
compile 'com.shuyu:gsyVideoPlayer-x86:2.1.2'
S
shuyu 已提交
25 26 27 28 29 30 31 32 33

```

#### C、支持其他格式协议的(mpeg,rtsp, concat、crypto协议)

A、B普通版本支持263/264/265等,对于mpeg编码会有声音无画面情况。
C 引入的so支持mpeg编码和其他补充协议,但是so包相对变大。
 
```
S
shuyu 已提交
34
compile 'com.shuyu:gsyVideoPlayer-java:2.1.2'
S
shuyu 已提交
35

S
shuyu 已提交
36
compile 'com.shuyu:gsyVideoPlayer-ex_so:2.1.2'
S
shuyu 已提交
37 38 39 40 41 42

```

#### D、支持使用ijkPlayer的so

```
G
guoshuyu 已提交
43 44
compile 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.4'
compile 'tv.danmaku.ijk.media:ijkplayer-armv5:0.8.4'
S
shuyu 已提交
45
compile 'tv.danmaku.ijk.media:ijkplayer-arm64:0.8.3'
G
guoshuyu 已提交
46 47
compile 'tv.danmaku.ijk.media:ijkplayer-x86:0.8.4'
compile 'tv.danmaku.ijk.media:ijkplayer-x86_64:0.8.4'
S
shuyu 已提交
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
```

--------------------------------------------------------------------------------

### 2、JitPack引入方法

#### First、在project下的build.gradle添加
```
allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}
```

#### Sencond、在module下的build.gradle添加

**你可以选择下面三种的其中一种,在module下的build.gradle添加。**

#### A、直接引入
```
//完整版引入
S
shuyu 已提交
71
compile 'com.github.CarGuo.GSYVideoPlayer:GSYVideoPlayer:v2.1.2'
S
shuyu 已提交
72 73 74 75 76 77 78

```

#### B、添加java和你想要的so支持:

```

S
shuyu 已提交
79
compile 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:v2.1.2'
S
shuyu 已提交
80 81

//根据你的需求
S
shuyu 已提交
82 83 84 85 86
compile 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-x64:v2.1.2'
compile 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-x86:v2.1.2'
compile 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-arm64:v2.1.2'
compile 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-armv5:v2.1.2'
compile 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-armv7a:v2.1.2'
S
shuyu 已提交
87 88 89 90 91 92 93 94 95

```

#### C、支持其他格式协议的(mpeg,rtsp, concat、crypto协议)

A、B普通版本支持263/264/265等,对于mpeg编码会有声音无画面情况。
C 方法引入的so支持mpeg编码和其他补充协议,但是so包相对变大。
 
```
S
shuyu 已提交
96
compile 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:v2.1.2'
S
shuyu 已提交
97

S
shuyu 已提交
98
compile 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-ex_so:v2.1.2'
S
shuyu 已提交
99 100

```