Android中节操播放器JieCaoVideoPlayer使用

58 篇文章 1 订阅
18 篇文章 0 订阅

转载地址:https://github.com/lipangit/JiaoZiVideoPlayer

参考视频:http://ke.atguigu.com/course/149/learn#lesson/1978

立志成为Android平台使用最广泛的视频播放控件 Q群:490442439 验证信息:jzvd

目前认为安卓中视频点播的终极状态是系统的MediaPlayer,其他的播放引擎并不是未来的趋势,虽然系统的MediaPlayer也有缺点我认为我们应该做出一些让步,如果系统的MediaPlayer没有重大缺陷将不会考虑替换它。

英文文档 工作计划

主要特点

  1. 视频全屏播放和浮层小窗播放
  2. 可以完全自定义UI
  3. 能在ListViewViewPagerListViewViewPagerFragment等多重嵌套模式下全屏工作
  4. 手势修改进度和音量
  5. 视频大小的屏幕适配,宽或长至少有两个对边是充满屏幕的,另外两个方向居中
  6. 可以在加载、暂停、播放等各种状态中正常进入全屏和退出全屏
  7. 重力感应自动全屏
  8. WebView嵌套本地视频控件
  9. 支持https和rtsp
  10. 小于 110kb
  11. Home键暂停,返回继续播放

效果

jiaozivideoplayer-6.0.0.apk

Demo Screenshot

使用

即便是自定义UI,或者对Library有过修改,也是这五步骤来使用播放器。

1.添加类库

compile 'cn.jzvd:jiaozivideoplayer:6.0.0'

或直接下载jar包 不建议

2.添加布局

<cn.jzvd.JZVideoPlayerStandard
    android:id="@+id/videoplayer"
    android:layout_width="match_parent"
    android:layout_height="200dp"/>

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

JZVideoPlayerStandard jzVideoPlayerStandard = (JZVideoPlayerStandard) findViewById(R.id.videoplayer);
jzVideoPlayerStandard.setUp("http://jzvd.nathen.cn/c6e3dc12a1154626b3476d9bf3bd7266/6b56c5f0dc31428083757a45764763b0-5287d2089db37e62345123a1be272f8b.mp4"
                            , JZVideoPlayerStandard.SCREEN_LAYOUT_NORMAL, "嫂子闭眼睛");
jzVideoPlayerStandard.thumbImageView.setImage("http://p.qpic.cn/videoyun/0/2449_43b6f696980311e59ed467f22794e792_1/640");

4.在Activity

@Override
public void onBackPressed() {
    if (JZVideoPlayer.backPress()) {
        return;
    }
    super.onBackPressed();
}
@Override
protected void onPause() {
    super.onPause();
    JZVideoPlayer.releaseAllVideos();
}

5.在AndroidManifest.xml

<activity
    android:name=".MainActivity"
    android:configChanges="orientation|screenSize|keyboardHidden"
    android:screenOrientation="portrait" /> <!-- or android:screenOrientation="landscape"-->

Wiki

  • 常规使用
  1. QuickStart
  2. 列表播放
  3. 小窗播放
  4. 直接全屏播放
  5. API
  • 自定义
  1. 自定义代码
  2. 自定义代码示例
  3. 自定义UI
  4. 自定义UI示例

常见问题

工作分流

老臣精力能力有限,希望和志同道合的朋友一起把项目做好,感兴趣的同学随时和我报名

熊晓清 QQ:137048616

Lionet QQ:2950527715

montauk QQ:958489121

张展硕 QQ:229431468

熊晓清 QQ:137048616

任务发布

打赏

这项目是专门给中小app集成视频播放的,极大降低开发成本,如果给您节省了成吨的时间,建议零售价:打赏500元。(不贵吧兄弟们,弄了两年的项目不比女主播唱首歌值钱吧)

打赏

License MIT

Copyright (c) 2015-2016 李盼 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.






评论 13
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值