当前位置: 首页>>代码示例>>Java>>正文


Java Video类代码示例

本文整理汇总了Java中com.android.tedcoder.wkvideoplayer.model.Video的典型用法代码示例。如果您正苦于以下问题:Java Video类的具体用法?Java Video怎么用?Java Video使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Video类属于com.android.tedcoder.wkvideoplayer.model包,在下文中一共展示了Video类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loadLocalVideo

import com.android.tedcoder.wkvideoplayer.model.Video; //导入依赖的package包/类
/***
 * 播放本地视频 只支持横屏播放
 *
 * @param fileUrl fileUrl
 */
@SuppressWarnings("unused")
public void loadLocalVideo(String fileUrl) {
    VideoUrl videoUrl = new VideoUrl();
    videoUrl.setIsOnlineVideo(false);
    videoUrl.setFormatUrl(fileUrl);
    videoUrl.setFormatName("本地视频");
    Video video = new Video();
    ArrayList<VideoUrl> videoUrls = new ArrayList<>();
    videoUrls.add(videoUrl);
    video.setVideoUrl(videoUrls);
    video.setPlayUrl(0);

    mNowPlayVideo = video;

    /***
     * 初始化控制条的精简模式
     */
    mMediaController.initTrimmedMode();
    loadAndPlay(mNowPlayVideo.getPlayUrl(), 0);
}
 
开发者ID:SavorGit,项目名称:Hotspot-master-devp,代码行数:26,代码来源:SuperVideoPlayer.java

示例2: initPlayVideo

import com.android.tedcoder.wkvideoplayer.model.Video; //导入依赖的package包/类
public void initPlayVideo(Video video) {
    ArrayList<String> format = new ArrayList<>();
    for (VideoUrl url : video.getVideoUrl()) {
        format.add(url.getFormatName());
    }
    mVideoFormatSwitcher.initData(format);
}
 
开发者ID:SavorGit,项目名称:Hotspot-master-devp,代码行数:8,代码来源:MediaController.java

示例3: loadMultipleVideo

import com.android.tedcoder.wkvideoplayer.model.Video; //导入依赖的package包/类
/***
 * @param playVideo    播放的视频
 * @param selectFormat 指定的格式
 * @param seekTime     开始进度
 */
public void loadMultipleVideo(Video playVideo, int selectFormat, int seekTime) {
    isLoadError = false;
    mNowPlayVideo = playVideo;
    mNowPlayVideo.setPlayUrl(selectFormat);
    mMediaController.initPlayVideo(mNowPlayVideo);
    loadAndPlay(mNowPlayVideo.getPlayUrl(), seekTime);
}
 
开发者ID:SavorGit,项目名称:Hotspot-master-devp,代码行数:13,代码来源:SuperVideoPlayer.java

示例4: onClick

import com.android.tedcoder.wkvideoplayer.model.Video; //导入依赖的package包/类
@Override
public void onClick(View view) {
    mPlayBtnView.setVisibility(View.GONE);
    mSuperVideoPlayer.setVisibility(View.VISIBLE);
    mSuperVideoPlayer.setAutoHideController(false);

    Video video = new Video();
    VideoUrl videoUrl1 = new VideoUrl();
    videoUrl1.setFormatName("720P");
    videoUrl1.setFormatUrl("http://7xkbzx.com1.z0.glb.clouddn.com/SampleVideo_1080x720_20mb.mp4");
    VideoUrl videoUrl2 = new VideoUrl();
    videoUrl2.setFormatName("480P");
    videoUrl2.setFormatUrl("http://7xkbzx.com1.z0.glb.clouddn.com/SampleVideo_720x480_20mb.mp4");
    ArrayList<VideoUrl> arrayList1 = new ArrayList<>();
    arrayList1.add(videoUrl1);
    arrayList1.add(videoUrl2);
    video.setVideoName("测试视频一");
    video.setVideoUrl(arrayList1);

    Video video2 = new Video();
    VideoUrl videoUrl3 = new VideoUrl();
    videoUrl3.setFormatName("720P");
    videoUrl3.setFormatUrl("http://7xkbzx.com1.z0.glb.clouddn.com/SampleVideo_1080x720_10mb.mp4");
    VideoUrl videoUrl4 = new VideoUrl();
    videoUrl4.setFormatName("480P");
    videoUrl4.setFormatUrl("http://7xkbzx.com1.z0.glb.clouddn.com/SampleVideo_720x480_10mb.mp4");
    ArrayList<VideoUrl> arrayList2 = new ArrayList<>();
    arrayList2.add(videoUrl3);
    arrayList2.add(videoUrl4);
    video2.setVideoName("测试视频二");
    video2.setVideoUrl(arrayList2);

    ArrayList<Video> videoArrayList = new ArrayList<>();
    videoArrayList.add(video);
    videoArrayList.add(video2);

    mSuperVideoPlayer.loadMultipleVideo(videoArrayList,0,0,0);
}
 
开发者ID:dingdingyr,项目名称:AndroidVideoPlayer-,代码行数:39,代码来源:MainActivity.java

示例5: initVideoList

import com.android.tedcoder.wkvideoplayer.model.Video; //导入依赖的package包/类
public void initVideoList(ArrayList<Video> videoList) {
    ArrayList<String> name = new ArrayList<>();
    for (Video video : videoList) {
        name.add(video.getVideoName());
    }
    mVideoSrcSwitcher.initData(name);
}
 
开发者ID:dingdingyr,项目名称:AndroidVideoPlayer-,代码行数:8,代码来源:MediaController.java

示例6: onSelectSrc

import com.android.tedcoder.wkvideoplayer.model.Video; //导入依赖的package包/类
@Override
public void onSelectSrc(int position) {
    Video selectVideo = mAllVideo.get(position);
    if (selectVideo.equal(mNowPlayVideo)) return;
    mNowPlayVideo = selectVideo;
    mNowPlayVideo.setPlayUrl(0);
    mMediaController.initPlayVideo(mNowPlayVideo);
    loadAndPlay(mNowPlayVideo.getPlayUrl(), 0);
}
 
开发者ID:dingdingyr,项目名称:AndroidVideoPlayer-,代码行数:10,代码来源:SuperVideoPlayer.java

示例7: loadMultipleVideo

import com.android.tedcoder.wkvideoplayer.model.Video; //导入依赖的package包/类
/***
 *
 * @param allVideo     所有的视频
 * @param selectVideo  指定的视频
 * @param selectFormat 指定的格式
 * @param seekTime 开始进度
 */
public void loadMultipleVideo(ArrayList<Video> allVideo, int selectVideo, int selectFormat, int seekTime) {
    if (null == allVideo || allVideo.size() == 0) {
        Toast.makeText(mContext, "视频列表为空", Toast.LENGTH_SHORT).show();
        return;
    }
    mAllVideo.clear();
    mAllVideo.addAll(allVideo);
    mNowPlayVideo = mAllVideo.get(selectVideo);
    mNowPlayVideo.setPlayUrl(selectFormat);
    mMediaController.initVideoList(mAllVideo);
    mMediaController.initPlayVideo(mNowPlayVideo);
    loadAndPlay(mNowPlayVideo.getPlayUrl(), seekTime);
}
 
开发者ID:dingdingyr,项目名称:AndroidVideoPlayer-,代码行数:21,代码来源:SuperVideoPlayer.java

示例8: onClick

import com.android.tedcoder.wkvideoplayer.model.Video; //导入依赖的package包/类
@Override
public void onClick(View view) {
    mPlayBtnView.setVisibility(View.GONE);
    mSuperVideoPlayer.setVisibility(View.VISIBLE);
    mSuperVideoPlayer.setAutoHideController(false);

    Video video = new Video();
    VideoUrl videoUrl1 = new VideoUrl();
    videoUrl1.setFormatName("720P");
    videoUrl1.setFormatUrl("http://2449.vod.myqcloud.com/2449_43b6f696980311e59ed467f22794e792.f20.mp4");
    VideoUrl videoUrl2 = new VideoUrl();
    videoUrl2.setFormatName("480P");
    videoUrl2.setFormatUrl("http://2449.vod.myqcloud.com/2449_43b6f696980311e59ed467f22794e792.f20.mp4");
    ArrayList<VideoUrl> arrayList1 = new ArrayList<>();
    arrayList1.add(videoUrl1);
    arrayList1.add(videoUrl2);
    video.setVideoName("测试视频一");
    video.setVideoUrl(arrayList1);

    Video video2 = new Video();
    VideoUrl videoUrl3 = new VideoUrl();
    videoUrl3.setFormatName("720P");
    videoUrl3.setFormatUrl("http://2449.vod.myqcloud.com/2449_ded7b566b37911e5942f0b208e48548d.f20.mp4");
    VideoUrl videoUrl4 = new VideoUrl();
    videoUrl4.setFormatName("480P");
    videoUrl4.setFormatUrl("http://2449.vod.myqcloud.com/2449_ded7b566b37911e5942f0b208e48548d.f20.mp4");
    ArrayList<VideoUrl> arrayList2 = new ArrayList<>();
    arrayList2.add(videoUrl3);
    arrayList2.add(videoUrl4);
    video2.setVideoName("测试视频二");
    video2.setVideoUrl(arrayList2);

    ArrayList<Video> videoArrayList = new ArrayList<>();
    videoArrayList.add(video);
    videoArrayList.add(video2);

    mSuperVideoPlayer.loadMultipleVideo(videoArrayList,0,0,0);
}
 
开发者ID:supengchao,项目名称:AndroidVideoPlay,代码行数:39,代码来源:MainActivity.java

示例9: onClick

import com.android.tedcoder.wkvideoplayer.model.Video; //导入依赖的package包/类
@Override
public void onClick(View view) {
    mPlayBtnView.setVisibility(View.GONE);
    mSuperVideoPlayer.setVisibility(View.VISIBLE);
    mSuperVideoPlayer.setAutoHideController(false);

    Video video = new Video();
    VideoUrl videoUrl1 = new VideoUrl();
    videoUrl1.setFormatName("720P");
    videoUrl1.setFormatUrl("http://o7b0tslyh.bkt.clouddn.com/SampleVideo_1280x720_2mb.mp4");
    VideoUrl videoUrl2 = new VideoUrl();
    videoUrl2.setFormatName("480P");
    videoUrl2.setFormatUrl("http://o7b0tslyh.bkt.clouddn.com/SampleVideo_1280x720_2mb.mp4");
    ArrayList<VideoUrl> arrayList1 = new ArrayList<>();
    arrayList1.add(videoUrl1);
    arrayList1.add(videoUrl2);
    video.setVideoName("动物一");
    video.setVideoUrl(arrayList1);

    Video video2 = new Video();
    VideoUrl videoUrl3 = new VideoUrl();
    videoUrl3.setFormatName("720P");
    videoUrl3.setFormatUrl("http://o7b0tslyh.bkt.clouddn.com/videoviewdemo.mp4");
    VideoUrl videoUrl4 = new VideoUrl();
    videoUrl4.setFormatName("480P");
    videoUrl4.setFormatUrl("http://o7b0tslyh.bkt.clouddn.com/videoviewdemo.mp4");
    ArrayList<VideoUrl> arrayList2 = new ArrayList<>();
    arrayList2.add(videoUrl3);
    arrayList2.add(videoUrl4);
    video2.setVideoName("动物二");
    video2.setVideoUrl(arrayList2);

    ArrayList<Video> videoArrayList = new ArrayList<>();
    videoArrayList.add(video);
    videoArrayList.add(video2);

    mSuperVideoPlayer.loadMultipleVideo(videoArrayList,0,0,0);
}
 
开发者ID:freedomofme,项目名称:Netease,代码行数:39,代码来源:VideoFragment.java

示例10: onClick

import com.android.tedcoder.wkvideoplayer.model.Video; //导入依赖的package包/类
@Override
public void onClick(View view) {
    mPlayBtnView.setVisibility(View.GONE);
    mSuperVideoPlayer.setVisibility(View.VISIBLE);
    Video video = new Video();
    VideoUrl videoUrl1 = new VideoUrl();
    videoUrl1.setFormatName("720P");
    videoUrl1.setFormatUrl("http://7xkbzx.com1.z0.glb.clouddn.com/SampleVideo_1080x720_20mb.mp4");
    VideoUrl videoUrl2 = new VideoUrl();
    videoUrl2.setFormatName("480P");
    videoUrl2.setFormatUrl("http://7xkbzx.com1.z0.glb.clouddn.com/SampleVideo_720x480_20mb.mp4");
    ArrayList<VideoUrl> arrayList1 = new ArrayList<>();
    arrayList1.add(videoUrl1);
    arrayList1.add(videoUrl2);
    video.setVideoName("房源视频");
    video.setVideoUrl(arrayList1);

    Video video2 = new Video();
    VideoUrl videoUrl3 = new VideoUrl();
    videoUrl3.setFormatName("720P");
    videoUrl3.setFormatUrl("http://7xkbzx.com1.z0.glb.clouddn.com/SampleVideo_1080x720_10mb.mp4");
    VideoUrl videoUrl4 = new VideoUrl();
    videoUrl4.setFormatName("480P");
    videoUrl4.setFormatUrl("http://7xkbzx.com1.z0.glb.clouddn.com/SampleVideo_720x480_10mb.mp4");
    ArrayList<VideoUrl> arrayList2 = new ArrayList<>();
    arrayList2.add(videoUrl3);
    arrayList2.add(videoUrl4);
    video2.setVideoName("小区视频");
    video2.setVideoUrl(arrayList2);

    ArrayList<Video> videoArrayList = new ArrayList<>();
    videoArrayList.add(video);
    videoArrayList.add(video2);

    mSuperVideoPlayer.loadMultipleVideo(videoArrayList);
}
 
开发者ID:pczhu,项目名称:AndroidVideoPlayer-master,代码行数:37,代码来源:MainActivity.java

示例11: initVideoList

import com.android.tedcoder.wkvideoplayer.model.Video; //导入依赖的package包/类
public void initVideoList(ArrayList<Video> videoList){
    ArrayList<String> name = new ArrayList<>();
    for (Video video:videoList){
        name.add(video.getVideoName());
    }
    mVideoSrcSwitcher.initData(name);
}
 
开发者ID:pczhu,项目名称:AndroidVideoPlayer-master,代码行数:8,代码来源:MediaController.java

示例12: initPlayVideo

import com.android.tedcoder.wkvideoplayer.model.Video; //导入依赖的package包/类
public void initPlayVideo(Video video){
    ArrayList<String> format = new ArrayList<>();
    for (VideoUrl url:video.getVideoUrl()){
        format.add(url.getFormatName());
    }
    mVideoFormatSwitcher.initData(format);
}
 
开发者ID:pczhu,项目名称:AndroidVideoPlayer-master,代码行数:8,代码来源:MediaController.java

示例13: onSelectSrc

import com.android.tedcoder.wkvideoplayer.model.Video; //导入依赖的package包/类
@Override
public void onSelectSrc(int position) {
    Video selectVideo = mAllVideo.get(position);
    if (selectVideo.equal(mNowPlayVideo)) return;
    mNowPlayVideo = selectVideo;
    mNowPlayVideo.setPlayUrl(0);
    mMediaController.initPlayVideo(mNowPlayVideo);
    playVideoFromStart();
}
 
开发者ID:pczhu,项目名称:AndroidVideoPlayer-master,代码行数:10,代码来源:SuperVideoPlayer.java

示例14: loadMultipleVideo

import com.android.tedcoder.wkvideoplayer.model.Video; //导入依赖的package包/类
/***
 * 播放多个视频
 *
 * @param allVideo
 */
public void loadMultipleVideo(ArrayList<Video> allVideo) {
    if (null == allVideo || allVideo.size() == 0) {
        Toast.makeText(mContext, "视频列表为空", Toast.LENGTH_SHORT).show();
        return;
    }
    mAllVideo.clear();
    mAllVideo.addAll(allVideo);
    mNowPlayVideo = mAllVideo.get(0);
    mNowPlayVideo.setPlayUrl(0);
    mMediaController.initVideoList(mAllVideo);
    mMediaController.initPlayVideo(mNowPlayVideo);
    playVideoFromStart();
}
 
开发者ID:pczhu,项目名称:AndroidVideoPlayer-master,代码行数:19,代码来源:SuperVideoPlayer.java

示例15: initVideo

import com.android.tedcoder.wkvideoplayer.model.Video; //导入依赖的package包/类
private void initVideo() {
    if(mSuperVideoPlayer==null) {
        return;
    }
    mSuperVideoPlayer.setCovorVisible();
    mSuperVideoPlayer.requestFocus();
    mSuperVideoPlayer.setVisibility(View.VISIBLE);
    mSuperVideoPlayer.setAutoVisibleView(headLayout);
    mSuperVideoPlayer.setCollectView(toleft_iv_right);
    mSuperVideoPlayer.setShareView(iv_right);
    mSuperVideoPlayer.setAutoHideController(true);
    mSuperVideoPlayer.getSuperVideoView().setOnErrorListener(new MediaPlayer.OnErrorListener() {
        @Override
        public boolean onError(MediaPlayer mp, int what, int extra) {
            mSuperVideoPlayer.setPlayError(true);
            currentMsec = mSuperVideoPlayer.getCurrentMsec();
            mSuperVideoPlayer.stopUpdateTimer();
            mSuperVideoPlayer.dismissProgress();
            mPlayErrorLayout.setVisibility(View.VISIBLE);
            return true;
        }
    });
    String videoURL = videoItem.getVideoURL();
    video = new Video();
    video.setVideoName(videoItem.getTitle());
    VideoUrl videoUrl1 = new VideoUrl();
    videoUrl1.setFormatName("超清");
    videoUrl1.setFormatUrl(videoURL + ".f30.mp4");
    VideoUrl videoUrl2 = new VideoUrl();
    videoUrl2.setFormatName("高清");
    videoUrl2.setFormatUrl(videoURL + ".f20.mp4");
    VideoUrl videoUrl3 = new VideoUrl();
    videoUrl3.setFormatName("标清");
    videoUrl3.setFormatUrl(videoURL + ".f10.mp4");

    ArrayList<VideoUrl> list = new ArrayList<>();
    list.add(videoUrl1);
    list.add(videoUrl2);
    list.add(videoUrl3);

    video.setVideoUrl(list);
}
 
开发者ID:SavorGit,项目名称:Hotspot-master-devp,代码行数:43,代码来源:VideoPlayVODNotHotelActivity.java


注:本文中的com.android.tedcoder.wkvideoplayer.model.Video类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。