Git Product home page Git Product logo

jiaozivideoplayer's Introduction

JiaoZiVideoPlayer

高度自定义的安卓视频框架

置顶消息:

群主微信进饺子粉丝群,沟通重心从Q群转移到微信群。微信:lipanhelloworld备注JZVD,Q群:490442439, 2群:761899104, 验证信息:jzvd, 微信公众号:jzvdjzt,QQ:1066666651,TelegramWeibo公众号文章

为了增加项目质量,促进项目进度,调用社群力量,方便社群管理,推出基于以太坊ERC-20的数字通证JiaoZiToken(JZT)(饺子Token),必定大有可为。

找点事做挣饺子币

购买咨询服务送饺子币

文档

效果

QuickStart

1.添加类库

implementation 'cn.jzvd:jiaozivideoplayer:7.4.1'

2.添加布局

<cn.jzvd.demo.CustomJzvd.MyJzvdStd
    android:id="@+id/jz_video"
    android:layout_width="match_parent"
    android:layout_height="200dp" />

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

MyJzvdStd jzvdStd = (MyJzvdStd) findViewById(R.id.jz_video);
jzvdStd.setUp("http://jzvd.nathen.cn/c6e3dc12a1154626b3476d9bf3bd7266/6b56c5f0dc31428083757a45764763b0-5287d2089db37e62345123a1be272f8b.mp4"
                            , "饺子闭眼睛");
jzvdStd.posterImageView.setImage("http://p.qpic.cn/videoyun/0/2449_43b6f696980311e59ed467f22794e792_1/640");

4.在Activity

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

5.在AndroidManifest.xml

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

6.在proguard-rules.pro中按需添加

-keep public class cn.jzvd.JZMediaSystem {*; }
-keep public class cn.jzvd.demo.CustomMedia.CustomMedia {*; }
-keep public class cn.jzvd.demo.CustomMedia.JZMediaIjk {*; }
-keep public class cn.jzvd.demo.CustomMedia.JZMediaSystemAssertFolder {*; }

-keep class tv.danmaku.ijk.media.player.** {*; }
-dontwarn tv.danmaku.ijk.media.player.*
-keep interface tv.danmaku.ijk.media.player.** { *; }

即便是自定义UI,或者对Library有过修改,依然要通过上述步骤使用播放器。

注意:

  1. 7.0版本之后要在JzvdStd外面包一层Layout
  2. 如果引入配置失败,根据失败的log检查是否添加了Java8的配置,或者升级环境到最新的稳定版

JZVD DEMO说明

JiaoZiVideoPlayer

License MIT

Copyright (c) 2015-2020 李盼

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.

jiaozivideoplayer's People

Contributors

4happymeatball avatar anpez avatar bravekingzhang avatar bythewaydai avatar carmelo-ruota avatar derlio avatar duguodong258 avatar felipetorres avatar haoxiqiang avatar hawk28 avatar hex1y avatar imknown avatar kimnamcham avatar kslr avatar liberation-kkfire avatar liberations avatar lionet66 avatar lipangit avatar mickeybadbad avatar minamihoshi avatar sjandy88 avatar stevennick88 avatar toxicr avatar truelovesomegirl avatar uc10d avatar wxxsw avatar xuenhao avatar zdzcoding avatar zhangzzqq avatar zw73 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.