private void KTVPlayer_OnStateChanged(object sender, AxAPlayer3Lib._IPlayerEvents_OnStateChangedEvent e) { if (e.nNewState == 0 && KTVPlayer.GetConfig(7) == "0") { NextMTV(); } }
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); } }
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); } } }
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()); } }
private void KTVPlayer_OnOpenSucceeded(object sender, EventArgs e) { KTVPlayer.SetConfig(403, RunTimeStatus.AudioTrack.ToString()); }
private void BtnAcc_Click(object sender, EventArgs e) { KTVPlayer.SetConfig(403, "1"); RunTimeStatus.AudioTrack = 1; }