Esempio n. 1
0
        private void webVideoList1_DownClick(TPlayerList.WebVideoListItem Item)
        {
            Video video = Item.Tag as Video;

            if (video.playInformation != null)
            {
                int selplayType = -1;
                if (video.playInformation.Count > 1)
                {
                    List <string> seldata = new List <string>();
                    foreach (PlayAddress item in video.playInformation)
                    {
                        seldata.Add(item.playType);
                    }
                    UIListSel frm = new UIListSel(seldata);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        selplayType = frm.SelIndex;
                    }
                }
                else
                {
                    selplayType = 0;
                }
                if (selplayType > -1)
                {
                    string            _colltag      = "webvideo[okzy]_" + selplayType + "_" + video.id;
                    List <PlayerItem> PlayList_Temp = new List <PlayerItem>();
                    if (video.playInformation[selplayType].videoUrl.Find(ab => ab.playURL.EndsWith(".mp4")) != null || video.playInformation[selplayType].videoUrl.Find(ab => ab.playURL.EndsWith(".m3u8")) != null)
                    {
                        foreach (VideoUrl item in video.playInformation[selplayType].videoUrl)
                        {
                            PlayList_Temp.Add(new PlayerItem("web", item.playURL, video.videoName + " - " + item.playName, _colltag));
                        }
                    }
                    else
                    {
                        foreach (VideoUrl item in video.playInformation[selplayType].videoUrl)
                        {
                            PlayList_Temp.Add(new PlayerItem("web_net1", item.playURL, video.videoName + " - " + item.playName, _colltag));
                        }
                    }
                    player.isTvModel = false;
                    int coll = 0;
                    if (SystemSettings.RememberLocation && File.Exists(Program.CachePath + "coll\\" + PlayList_Temp[0].colltag))
                    {
                        int.TryParse(File.ReadAllText(Program.CachePath + "coll\\" + PlayList_Temp[0].colltag), out coll);
                    }
                    player.OpenFileWeb(PlayList_Temp, coll);
                }
            }
            else if (video.isRun)
            {
                Api.OpenMessage(this, MessageType.Info, "请稍后,正在获取地址");
            }
        }
Esempio n. 2
0
 private void playList_DownClick(TPlayerList.VideoListItem Item)
 {
     if (playList.IsCheck)
     {
         Item.Check = !Item.Check;
         if (Item.Check)
         {
             DelTemp.Add(Item);
         }
         else
         {
             DelTemp.Remove(Item);
         }
         playList.Tom(Item);
     }
     else
     {
         //PlayerItem playerItem = Item.Tag as PlayerItem;
         player.OpenFileWeb(Item.Index);
     }
 }