GSYVideoPlayer-android視頻播放器,支持基本的拖動,聲音、亮度調節,支持邊播邊緩存java
效果圖以下:android
視頻播放器(IJKplayer)的有點:git
狀態 | 功能 |
---|---|
支持 | 邊播邊緩存,使用了AndroidVideoCache。 |
支持 | 列表播放;列表連續播放;重力旋轉與手動旋轉;視頻自己rotation旋轉屬性。 |
支持 | 全屏切換動畫效果;小窗口播放,可拖動。 |
支持 | 快播和慢播;網絡視頻加載速度。 |
支持 | 調整顯示比例:默認、16:九、4:三、填充。 |
支持 | 播放時旋轉畫面角度(0,90,180,270);鏡像旋轉。 |
支持 | 暫停先後臺切換不黑屏;調整不一樣清晰度的支持。 |
支持 | Https;IJKPlayer和EXOPlayer切換。 |
支持 | 鎖定/解鎖全屏點擊功能;進度條小窗口預覽(測試)。 |
支持 | 全屏與非全屏兩套佈局切換;彈幕功能。 |
支持 | 其餘協議和編碼concat、rtsp、crypto、mpeg等。 |
支持 | 沒有任何操做控件的純播放支持。 |
待支持 | 自帶廣告功能(目前須要本身實現)。 |
你能夠選擇下面三種的其中一種,在module下的build.gradle添加。複製代碼
//完整版引入
compile 'com.shuyu:GSYVideoPlayer:2.0.5'複製代碼
//根據你的需求
compile 'com.shuyu:gsyVideoPlayer-armv5:2.0.5'
compile 'com.shuyu:gsyVideoPlayer-armv7a:2.0.5'
compile 'com.shuyu:gsyVideoPlayer-arm64:2.0.5'
compile 'com.shuyu:gsyVideoPlayer-x64:2.0.5'
compile 'com.shuyu:gsyVideoPlayer-x86:2.0.5'github
- C、支持其餘格式協議的(mpeg,rtsp, concat、crypto協議)
A、B普通版本支持263/264/265等,對於mpeg編碼會有聲音無畫面狀況。 C 引入的so支持mpeg編碼和其餘補充協議,可是so包相對變大。複製代碼
compile 'com.shuyu:gsyVideoPlayer-java:2.0.5'
compile 'com.shuyu:gsyVideoPlayer-ex_so:2.0.5' ```複製代碼
D、支持使用ijkPlayer的so緩存
compile 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.2'
compile 'tv.danmaku.ijk.media:ijkplayer-armv5:0.8.2'
compile 'tv.danmaku.ijk.media:ijkplayer-arm64:0.8.2'
compile 'tv.danmaku.ijk.media:ijkplayer-x86:0.8.2'
compile 'tv.danmaku.ijk.media:ijkplayer-x86_64:0.8.2'複製代碼
First、在project下的build.gradle添加bash
```
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```複製代碼
Sencond、在module下的build.gradle添加微信
你能夠選擇下面三種的其中一種,在module下的build.gradle添加。複製代碼
//完整版引入
compile 'com.github.CarGuo.GSYVideoPlayer:GSYVideoPlayer:v2.0.5'複製代碼
B、添加java和你想要的so支持:網絡
compile 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:v2.0.5'
//根據你的需求
compile 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-x64:v2.0.5'
compile 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-x86:v2.0.5'
compile 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-arm64:v2.0.5'
compile 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-armv5:v2.0.5'
compile 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-armv7a:v2.0.5'複製代碼
C、支持其餘格式協議的(mpeg,rtsp, concat、crypto協議)maven
A、B普通版本支持263/264/265等,對於mpeg編碼會有聲音無畫面狀況。 C 方法引入的so支持mpeg編碼和其餘補充協議,可是so包相對變大。ide
compile 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:v2.0.5'
compile 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-ex_so:v2.0.5'複製代碼
項目地址:
若是你以爲此文對您有所幫助,歡迎入羣 QQ交流羣 :644196190
微信公衆號:終端研發部