JiaoZiVideoPlayer播放器不播放任何内容

时间:2018-06-09 14:24:03

标签: android jiaozivideoplayer

我导入了这个库:

compile 'cn.jzvd:jiaozivideoplayer:6.2.10'

https://github.com/lipangit/JiaoZiVideoPlayer

我的观点:

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

onCreate()功能:

JZVideoPlayerStandard jzVideoPlayerStandard = (JZVideoPlayerStandard) findViewById(R.id.videoplayer);
jzVideoPlayerStandard.setUp("https://hw20.cdn.asset.aparat.com/aparat-video/7fd1cf80cc0f254e98f8785d783bf10810811179-144p__81878.mp4", 
                            JZVideoPlayerStandard.SCREEN_WINDOW_NORMAL, 
                            "-");

但它不播放我的视频,只是显示动画加载。

我哪里错了?

1 个答案:

答案 0 :(得分:0)

设法使用它来使其工作:

在gradle中:

global count

在xml中,

implementation 'cn.jzvd:jiaozivideoplayer:6.3.1'

在Java中:

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

版本可能与您的(6.2.10)版本不同