zoukankan      html  css  js  c++  java
  • 视频播放,,今日头条样式


    原创博客:http://p.codekk.com/detail/Android/lipangit/jiecaovideoplayer
    按照上面的博客自己试验是否成功.
    http://blog.csdn.net/androidstarjack/article/details/69526279

    compile 'cn.jzvd:jiaozivideoplayer:6.2.7'
    
    
    <LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
        android:layout_height="match_parent" tools:context="com.example.player_video.MainActivity">
    <cn.jzvd.JZVideoPlayerStandard
        android:id="@+id/videoplayer"
        android:layout_width="match_parent"
        android:layout_height="200dp"/>
    </LinearLayout>
    public class MainActivity extends AppCompatActivity {
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
           

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


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

    }
















  • 相关阅读:
    LeetCode 第46题 全排列
    docker安装单节点minio
    git的免密设置
    mysql不同字符集的转换过程
    二进制安装MySQL 8.0
    二进制方式安装mysql5.7.24
    mysql替换字段中指定的部分字符串
    Minio设置永久下载链接
    pt-online-schema-change使用详解
    Oracle pctfree和pctused详解
  • 原文地址:https://www.cnblogs.com/leshen/p/7890178.html
Copyright © 2011-2022 走看看