Ejemplo n.º 1
0
        /// <summary>
        /// 播放按钮点击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Btn_Download_MouseClick(object sender, DuiMouseEventArgs e)
        {
            //播放视频
            DuiButton dbn = sender as DuiButton;

            Entity.MovieListEntity.DataItem moveInfo = new Entity.MovieListEntity.DataItem();
            if (dbn.Tag != null)
            {
                moveInfo = dbn.Tag as Entity.MovieListEntity.DataItem;
            }
            string url = "";

            try
            {
                API.TvAPI             tva  = new API.TvAPI();
                Entity.MovePlayEntity plav = tva.getVideoUrl(userEntity.email, userEntity.psw, moveInfo.videoID.ToString(), "all", userEntity.imei);
                Console.WriteLine(plav.toJsonString());
                Console.WriteLine(plav.data);
                PlayerForm plF = new PlayerForm();
                url        = plav.data.ToString();
                plF.tvUrl  = plav.data.ToString();
                plF.tvName = moveInfo.videoName;
                plF.Show();
                plF.AxPlayer_PlayOrPause(url);
            }
            catch (Exception ex)
            {
                Logger.Singleton.Error("name:" + moveInfo.videoName + "---地址:" + url, ex);
                throw;
            }
        }