package com.tencent.liteav.demo.player.util;

import com.tencent.liteav.demo.superplayer.SuperPlayerModel;

import java.util.ArrayList;
import java.util.List;

public class PlayerModelProvider {
    private static final String VIDEO_URL = "https://www.douyin.com/aweme/v1/play/?video_id=v0200fg10000c9kggtjc77ubekkovilg&line=0&file_id=4465db5b9e48487197f8c0359e94ec46&sign=538e27bb98107b3dbabc0e24af67b0a8&is_play_url=1&source=PackSourceEnum_AWEME_DETAIL&aid=6383";

    private static final String COVER_URL = "";

    private PlayerModelProvider() {
    }

    public static List<SuperPlayerModel> getList() {
        List<SuperPlayerModel> list = new ArrayList<>();

        for (int i = 0; i < 90; i++) {
            SuperPlayerModel model = new SuperPlayerModel();
            model.title = "测试视频" + i;
            model.duration = 1222;
            model.isEnableCache = true;
            model.url = VIDEO_URL;

            if (i % 2 == 0) {
                model.cover = "https://p9-pc-sign.douyinpic.com/tos-cn-p-0015/57aaf7f5975247e09c3df35e152055e4_1654159193~tplv-dy-360p.jpeg?biz_tag=pcweb_cover&from=4257465056&se=false&x-expires=1662015600&x-signature=0uL3qAHjGGcvaNmDuopeSCKdfm8%3D";
            }
            list.add(model);
        }

        list.get(list.size() - 1).isLast = true;
        return list;
    }
}
