Skip to content

Commit

Permalink
frist
Browse files Browse the repository at this point in the history
  • Loading branch information
tohodog committed Mar 29, 2017
1 parent 14ae5eb commit 0aa8f39
Show file tree
Hide file tree
Showing 96 changed files with 4,591 additions and 232 deletions.
47 changes: 8 additions & 39 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,40 +1,9 @@
# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# Intellij
*.iml
.idea/workspace.xml

# Keystore files
*.jks
.gradle
/local.properties
/.idea/workspace.xml
/.idea
.DS_Store
/build
/captures
.externalNativeBuild
13 changes: 13 additions & 0 deletions ISSUE_TEMPLATE.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## 该问题是怎么引起的?



## 重现步骤



## 报错信息




372 changes: 181 additions & 191 deletions LICENSE

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions PULL_REQUEST_TEMPLATE.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## 该Pull Request关联的Issue


## 修改描述



## 测试用例



## 修复效果的截屏



70 changes: 68 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,68 @@
# QSVideoPlayer
安卓视频播放器AndroidVideoplayer,ui参考jc播放器,架构重新设计,支持多种解码
#QSVideoPlayer
* UI设计基于jc播放器,可快速自定义ui打造自己的播放器,不用写一行播放逻辑
* 可扩展设计,解码模块目前提供了 AndroidMedia(系统自带)、ijkMedia(基于ffmepg)+ijkExoMedia(基于exo)、ExoMedia(2.0.4)解码器
* 根据系统版本选择SurfaceView和TextureView,支持api9+
* 支持本地视频,在线视频,m3u8直播等...

根据需求自行选择需要的解码器,不需要的解码器在build.gradle注释掉/删掉jar,关联错误的类删掉即可,不会影响其他
1.一般简单播放视频AndroidMedia足够(体积最小,无依赖)
2.有点需求可选择AndroidMedia+ExoMedia(1MB)
3.需求高的可选AndroidMedia+(ijkMedia+ijkExoMedia)(打完包6MB+)
目前测试解码效果ijkMedia最快最好,AndroidMedia个别视频有半途中断BUG,exo无明显缺陷

#使用说明
下载项目 添加qsvideoplayre文件夹为自己的项目依赖即可
diy播放器:
可直接修改QSVideoView改造自己的播放器 或 继承BaseVideoView参考QSVideoView
只需子类提供layout布局以及设置各个状态的ui即可完成自己的播放器,播放逻辑一行不用写
```
QSVideoView qsVideoView = (QSVideoView) findViewById(R.id.xxx);
qsVideoView.setUp(url, "这是一一一一一一一一一个标题");
qsVideoView.play();//
```

#其他API

```
qsVideoView.stop();//暂停
qsVideoView.seekTo(100000);//跳进度
qsVideoView.release();//销毁
qsVideoView.getCoverImageView().setImageResource(R.mipmap.cover);//封面
//设置监听
qsVideoView.setPlayListener(new PlayListener() {
@Override
public void onStatus(int status) {//播放器的ui状态
if (status == IVideoPlayer.STATE_AUTO_COMPLETE)
qsVideoView.quitWindowFullscreen();//播放完成退出全屏
}
@Override//全屏/普通...
public void onMode(int mode) {
}
@Override//播放事件 初始化完成/缓冲/出错/...
public void onEvent(int what, Integer... extra) {
}
});
qsVideoView.enterFullMode=1;//进入全屏的模式 0默认是横屏 1是竖屏,随传感器自动切换横屏
```
#返回键退出全屏
```
@Override
public void onBackPressed() {
if (qsVideoView.onBackPressed())
return;
super.onBackPressed();
}
```

![输入图片说明](http://git.oschina.net/uploads/images/2017/0301/151443_9778d0d4_530535.jpeg "在这里输入图片标题")
![输入图片说明](http://git.oschina.net/uploads/images/2017/0224/180438_84c8332c_530535.jpeg "在这里输入图片标题")
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
44 changes: 44 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "org.song.demo"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
sourceSets {
main() {
manifest.srcFile 'src/main/AndroidManifest.xml'
java.srcDirs = ['src/main/java']
resources.srcDirs = ['src/main/resources']
res.srcDirs = ['src/main/res']
assets.srcDirs = ['src/main/assets']
jniLibs.srcDirs = ['libs']
jni.srcDirs = ['src/main/jni']

}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
testCompile 'junit:junit:4.12'

compile project(':qsvideoplayer')

}
17 changes: 17 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\Develop\Android SDK/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
36 changes: 36 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.song.demo">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.CAMERA" />

<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />

</manifest>
63 changes: 63 additions & 0 deletions app/src/main/assets/tv.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
CCTV1�ۺ�,http://58.135.196.138:8090/live/db3bd108e3364bf3888ccaf8377af077/index.m3u8
CCTV2�ƾ�,http://58.135.196.138:8090/live/e31fa63612644555a545781ea32e66d4/index.m3u8
CCTV3����,http://58.135.196.138:8090/live/A68CE6833D654a9e932A657689463088/index.m3u8
CCTV4������(����),http://58.135.196.138:8090/live/56383AB184D54ac8B20478B6A43906DC/index.m3u8
cctv5����,http://58.135.196.138:8090/live/6b9e3889ec6e2ab1a8c7bd0845e5368a/index.m3u8
CCTV6��Ӱ,http://58.135.196.138:8090/live/6132e9cb136050bd94822db31d1401af/index.m3u8
CCTV7����ũҵ,http://58.135.196.138:8090/live/a9a97bed07eca008a1c88c9d7c74965d/index.m3u8
CCTV8���Ӿ�,http://58.135.196.138:8090/live/6e38d69416f160bad4657788d6c06c01/index.m3u8
CCTV9��¼,http://58.135.196.138:8090/live/557a950d2cfcf2ee1aad5a260893c2b8/index.m3u8
CCTV10�ƽ�,http://58.135.196.138:8090/live/a0effe8f31af0011b750e817c1b6e8c7/index.m3u8
CCTV11Ϸ��,http://58.135.196.138:8090/live/2D5B4B7AB5A14d79A0D9A1D37540E2BF/index.m3u8
CCTV12����뷨,http://58.135.196.138:8090/live/3720126fbea745f74c1c89df9797caac/index.m3u8
CCTV13����,http://58.135.196.138:8090/live/5e02ac2a0829f7ab10d6543fdd211d8e/index.m3u8
CCTV14�ٶ�,http://58.135.196.138:8090/live/4A5DF0BA0C994081B02F8215491C4E48/index.m3u8
CCTV15����,http://58.135.196.138:8090/live/ADBD55B50F2D47bb970DCCBAF458E6C8/index.m3u8
����֮��,http://58.135.196.138:8090/live/1AB9A2A4F4CE48b397D72A067906D763/index.m3u8
��������,http://58.135.196.138:8090/live/D6C05AA9AFEF4ac58A6ED0FFF27EE85A/index.m3u8
��һ�糡,http://58.135.196.138:8090/live/13BCA1A2EFDB4db3B5DF6A8D343C3E39/index.m3u8
���ɾ糡,http://58.135.196.138:8090/live/65A216E9B6FC4905AF6756E2AEFC3ED3/index.m3u8
���ƾ糡,http://58.135.196.138:8090/live/8D574FF6D0B04a0eA8B51D55B7C8E6DD/index.m3u8
�������,http://58.135.196.138:8090/live/789E9CE292A040d2A459CF55D2FB362E/789E9CE292A040d2A459CF55D2FB362E.m3u8
�����Ѷ,http://58.135.196.138:8090/live/369024B4C9BF4b0f909187FC58B9951C/369024B4C9BF4b0f909187FC58B9951C.m3u8
��������,http://58.135.196.138:8090/live/F56C438F495049168C447030C175F7DB/F56C438F495049168C447030C175F7DB.m3u8
�����ƽ�,http://58.135.196.138:8090/live/1E8AF3D32194426dAC087FF20B098BCC/1E8AF3D32194426dAC087FF20B098BCC.m3u8
����Ӱ��,http://58.135.196.138:8090/live/8a6870a0febf6283b27210aab721beb4/8a6870a0febf6283b27210aab721beb4.m3u8
�����ƾ�,http://58.135.196.138:8090/live/8C213826A5E049849097FE77230B0616/8C213826A5E049849097FE77230B0616.m3u8
��������,http://58.135.196.138:8090/live/c6e9431fbe2634418def86d4b193d80d/c6e9431fbe2634418def86d4b193d80d.m3u8
��������,http://58.135.196.138:8090/live/dd728b0bef32c98060a0d4f757b6dbaf/dd728b0bef32c98060a0d4f757b6dbaf.m3u8
��������,http://58.135.196.138:8090/live/87446EA70C0C42119656A11938ACB2DD/87446EA70C0C42119656A11938ACB2DD.m3u8
��������,http://58.135.196.138:8090/live/C42481BFB2FD456480A098436834DFF0/C42481BFB2FD456480A098436834DFF0.m3u8
�����ٶ�,http://58.135.196.138:8090/live/543E9B8D048648e399E66EA338EF761C/543E9B8D048648e399E66EA338EF761C.m3u8
DOXTV,http://58.135.196.138:8090/live/7FDF7FBEC2B8474dA349102809CB8F97/7FDF7FBEC2B8474dA349102809CB8F97.m3u863
����Ƶ��,http://58.135.196.138:8090/live/022ED5AEC04546d99958328E2E6BB614/022ED5AEC04546d99958328E2E6BB614.m3u8
��������,http://58.135.196.138:8090/live/A3A45E102C5F41afBD78A5E27FF0578F/A3A45E102C5F41afBD78A5E27FF0578F.m3u8
�Ƹ�����,http://58.135.196.138:8090/live/2615D9C21AB248678ED9CF172E463539/2615D9C21AB248678ED9CF172E463539.m3u8
�����ƾ�,http://58.135.196.138:8090/live/295A4BAF84504aba8B1ED913A9790E08/295A4BAF84504aba8B1ED913A9790E08.m3u8
�����㳡,http://58.135.196.138:8090/live/E1F31105D6094bb6ADB5E698CB6EE4D8/E1F31105D6094bb6ADB5E698CB6EE4D8.m3u8
����Ƶ��,http://58.135.196.138:8090/live/6E6AAB7CE02545e0868A71B4A8DA2559/6E6AAB7CE02545e0868A71B4A8DA2559.m3u8
�������,http://58.135.196.138:8090/live/4818B652431344a8882ED935471711B5/4818B652431344a8882ED935471711B5.m3u8
�߶���,http://58.135.196.138:8090/live/ED54356140BD4282AA0C6FE656CC6583/ED54356140BD4282AA0C6FE656CC6583.m3u8
��Ц�糡,http://58.135.196.138:8090/live/B081DB925E434fa8A8A2812860B86785/B081DB925E434fa8A8A2812860B86785.m3u8
��������,http://58.135.196.138:8090/live/B3EDABA59F6240889F4C5162AF4655D3/B3EDABA59F6240889F4C5162AF4655D3.m3u8
�������,http://58.135.196.138:8090/live/333BAD8D3C2E4bfeA648053B7286A0BF/333BAD8D3C2E4bfeA648053B7286A0BF.m3u8
��������,http://58.135.196.138:8090/live/77C9E60036F64711B8C5F5111BF5A7F1/77C9E60036F64711B8C5F5111BF5A7F1.m3u8
��ͥ����,http://58.135.196.138:8090/live/D70719FBFE2242c6BA2B6235C834D896/D70719FBFE2242c6BA2B6235C834D896.m3u8
��ӥ��ͨ,http://58.135.196.138:8090/live/345A6019C2734ec7BE05BD4C6837EFD3/345A6019C2734ec7BE05BD4C6837EFD3.m3u8
��������,http://58.135.196.138:8090/live/5B33459CF0314e3e831351B3ED17F844/5B33459CF0314e3e831351B3ED17F844.m3u8
��������,http://58.135.196.138:8090/live/AA4E088E6AB54779A3A4ED856016317E/AA4E088E6AB54779A3A4ED856016317E.m3u8
���ֳ���,http://58.135.196.138:8090/live/95589A5033F948749F9ABD897E2C0032/95589A5033F948749F9ABD897E2C0032.m3u8
ŷ������,http://58.135.196.138:8090/live/980D3B2CF76042269F81A12B635ED9E9/980D3B2CF76042269F81A12B635ED9E9.m3u8
ȫ��ʵ,http://58.135.196.138:8090/live/94C1846FCB3E48278D2B6BA49164EC33/94C1846FCB3E48278D2B6BA49164EC33.m3u8
ʱ������,http://58.135.196.138:8090/live/379B386B5A214f8fA2B9F4DF1946BF6D/379B386B5A214f8fA2B9F4DF1946BF6D.m3u8
ʱ������,http://58.135.196.138:8090/live/373331B772D1418eAB2D7EEA0C7B3691/373331B772D1418eAB2D7EEA0C7B3691.m3u8
ʱ����ʳ,http://58.135.196.138:8090/live/07A1BF033E7940898A01053F79EF3595/07A1BF033E7940898A01053F79EF3595.m3u8
�ղ�����,http://58.135.196.138:8090/live/91ADF5DB36DE4c0f8E56FC3386836EA3/91ADF5DB36DE4c0f8E56FC3386836EA3.m3u8
�����,http://58.135.196.138:8090/live/6E1087643B3D445fBCECAF3B54544767/6E1087643B3D445fBCECAF3B54544767.m3u8
�ȷ��¼,http://58.135.196.138:8090/live/394BAD414F284fbf9EA8F08106741A63/394BAD414F284fbf9EA8F08106741A63.m3u8
�¶���,http://58.135.196.138:8090/live/3CDBE7F96BC1456cAAD86C571D5B1C43/3CDBE7F96BC1456cAAD86C571D5B1C43.m3u8
������,http://58.135.196.138:8090/live/883091E42C394ec3996932F152B95FD3/883091E42C394ec3996932F152B95FD3.m3u8
��̳����,http://58.135.196.138:8090/live/62E9275D131549b080F9ABBDB5E48F4E/62E9275D131549b080F9ABBDB5E48F4E.m3u8
���ű���,http://58.135.196.138:8090/live/FF453B3E5B4F446e978A7624254E3CD2/FF453B3E5B4F446e978A7624254E3CD2.m3u8
��Ϸ����,http://58.135.196.138:8090/live/82769FB7307D460193359CA465D1C159/82769FB7307D460193359CA465D1C159.m3u8
���Ӿ糡,http://58.135.196.138:8090/live/369B8B9031894010B5BA822A1637FEF1/369B8B9031894010B5BA822A1637FEF1.m3u8
Loading

0 comments on commit 0aa8f39

Please sign in to comment.