NiceVieoPlayer 初次尝试

用IjkPlayer/MediaPlayer + TextureView封装,可切换IjkPlayer、MediaPlayer  

封装的相当顺手了 ,经过测试 不支持m3u8的加密的链接 腾讯x5播放器可正常播放,还有编译的出来的文件有点大 是封装了多个播放器的原因吧.....

播放器布局 引入就可用  关键看作者例子 和博客 https://www.jianshu.com/p/1850c9e276c9    https://blog.csdn.net/kisty_yao/article/details/79422313

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.stdu.x5.Player"
    android:orientation="vertical">
    <com.xiao.nicevideoplayer.NiceVideoPlayer
        android:id="@+id/nice_video_player"
        android:layout_width="match_parent"
        android:layout_height="230dp"
        android:layout_marginBottom="8dp"
        android:layout_marginTop="0dp"/>
  

</LinearLayout>

猜你喜欢

转载自www.cnblogs.com/xuexidememeda/p/10353807.html