示例#1
0
 private void KTVPlayer_OnStateChanged(object sender, AxAPlayer3Lib._IPlayerEvents_OnStateChangedEvent e)
 {
     if (e.nNewState == 0 && KTVPlayer.GetConfig(7) == "0")
     {
         NextMTV();
     }
 }
示例#2
0
 private void NextMTV()
 {
     lock (RunTimeData.VideoQueue)
     {
         RunTimeData.VideoQueue.RemoveAll(m => m.Sort == 0);
         RunTimeData.VideoQueue.ForEach(m => m.Sort--);
         RefreshQueueList();
         var mtv      = RunTimeData.VideoQueue.FirstOrDefault(m => m.Sort == 0)?.MTV;
         var playPath = mtv?.SavePath.Replace("~", PathHelper.GetDownloadDir(mtv.Id));
         KTVPlayer.Open(playPath);
     }
 }
示例#3
0
 private void OpenMTV()
 {
     if (KTVPlayer.GetState() == 0)
     {
         lock (RunTimeData.VideoQueue)
         {
             var mtv      = RunTimeData.VideoQueue.FirstOrDefault(m => m.Sort == 0)?.MTV;
             var playPath = mtv?.SavePath.Replace("~", PathHelper.GetDownloadDir(mtv.Id));
             KTVPlayer.Open(playPath);
         }
     }
 }
示例#4
0
 private void BtnPause_Click(object sender, EventArgs e)
 {
     if (KTVPlayer.GetState() == 3)
     {
         KTVPlayer.Play();
         BtnPause.Appearance.Image        = Resources.player_pause;
         BtnPause.AppearanceHovered.Image = Resources.player_pause_hover;
         BtnPause.AppearancePressed.Image = Resources.player_pause_press;
         Sprite2DShow.CreateVideoSprite(KTVPlayer, Sprite2DCommonModel.Play());
     }
     else if (KTVPlayer.GetState() == 5)
     {
         KTVPlayer.Pause();
         BtnPause.Appearance.Image        = Resources.player_play;
         BtnPause.AppearanceHovered.Image = Resources.player_play_hover;
         BtnPause.AppearancePressed.Image = Resources.player_play_press;
         Sprite2DShow.CreateVideoSprite(KTVPlayer, Sprite2DCommonModel.Pause());
     }
 }
示例#5
0
 private void KTVPlayer_OnOpenSucceeded(object sender, EventArgs e)
 {
     KTVPlayer.SetConfig(403, RunTimeStatus.AudioTrack.ToString());
 }
示例#6
0
 private void BtnAcc_Click(object sender, EventArgs e)
 {
     KTVPlayer.SetConfig(403, "1");
     RunTimeStatus.AudioTrack = 1;
 }