/jiecaovideoplayer

android videoplayer videoview fullscreen 安卓视频播放器 全屏 播放器列表全屏 仿今日头条UI

Primary LanguageJavaMIT LicenseMIT

#节操视频播放器 Platform Maven Central Licenses GitHub stars

真正实现Android的全屏功能,励志成为Android平台使用最广泛的视频播放控件,GitFlow流程开发develop分支是最新版本

##主要特点

  1. 全屏时启动新Activity实现播放器真正的全屏功能
  2. 可以在加载、暂停、播放等各种状态中正常进入全屏和退出全屏
  3. 播放MP3时现实缩略图片
  4. 能在ListViewViewPagerListViewViewPagerFragment的多重嵌套模式下全屏工作
  5. ListView的拖拽和ViewPager的滑动时如果划出屏幕会自动重置视频
  6. 根据自己应用的颜色风格换肤
  7. 视频大小的屏幕适配,宽或长至少有两个对边是充满屏幕的,另外两个方向居中

##效果

Demo Screenshot

视频演示 : http://v.youku.com/v_show/id_XMTQ2NzUwOTcyNA==.html?firsttime=0&from=y1.4-2

##使用 引入类库

compile 'fm.jiecao:jiecaovideoplayer:1.6'

添加布局

<fm.jiecao.jcvideoplayer_lib.JCVideoPlayer
    android:id="@+id/videocontroller1"
    android:layout_width="match_parent"
    android:layout_height="200dp" />

设置视频地址、缩略图地址、标题

JCVideoPlayer videoController = (JCVideoPlayer) findViewById(R.id.videocontroller);
videoController.setUp("http://2449.vod.myqcloud.com/2449_43b6f696980311e59ed467f22794e792.f20.mp4",
    "http://p.qpic.cn/videoyun/0/2449_43b6f696980311e59ed467f22794e792_1/640",
    "嫂子别摸我");

设置皮肤,可以指定某个播放器的皮肤,也可以设置全局皮肤,优先级:某个播放器皮肤>全局皮肤>默认皮肤

JCVideoPlayer.setGlobleSkin();//设置全局皮肤
videoController.setSkin();//设置这一个播放器的皮肤

停止所有视频

JCVideoPlayer.releaseAllVideo();

在包含播放器的FragmentActivityonPause()方法中调用JCVideoPlayer.releaseAllVideos();

在ListView和ViewPager中将视频移除屏幕外,会在onDetachedFromWindow时重置视频。
目标是在库外只需要添加布局,添加配置,其他的问题都在库内判断和操作。

混淆

##Eventbus混淆
-keepclassmembers class ** {
    public void onEvent*(***);
}
# Only required if you use AsyncExecutor
-keepclassmembers class * extends de.greenrobot.event.util.ThrowableFailureEvent {
    public <init>(java.lang.Throwable);
}
# Don't warn for missing support classes
-dontwarn de.greenrobot.event.util.*$Support
-dontwarn de.greenrobot.event.util.*$SupportManagerFragment

##下载

License

The MIT License (MIT)

Copyright (c) 2015-2016 jiecao.fm:Nathen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.