美文网首页
2018-07-25

2018-07-25

作者: 李四的花儿 | 来源:发表于2018-07-25 08:35 被阅读0次

一个视频播放JZVideoPlayer小demo

1.导入依赖:implementation'cn.jzvd:jiaozivideoplayer:6.2.10'

2.activity_main布局:

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout         xmlns:android="http://schemas.android.com/apk/res/android"

        android:layout_width="match_parent"

        android:orientation="vertical"

        android:layout_height="match_parent">

<cn.jzvd.JZVideoPlayerStandard

        android:id="@+id/videoplayer"

        android:layout_width="match_parent"

        android:layout_height="match_parent"/>

</LinearLayout >

3.MainActivity主要代码:
videoplayer = (JZVideoPlayerStandard)findViewById(R.id.videoplayer);

videoplayer.setUp(视频网址,JZJZVideoPlayer.SCREEN_WINDOW_NORMAL,视频名字);

相关文章

网友评论

      本文标题:2018-07-25

      本文链接:https://www.haomeiwen.com/subject/xybumftx.html