public void CreatePlayer() { ReleasePlayer(); VpcPlayer = new VlcPlayerControl(); VpcPlayer.Dock = DockStyle.Fill; VpcPlayer.EnabledDisplayPlayerControlPanel = false; VpcPlayer.StopEvent += vpcPlayer_StopEvent; Controls.Add(VpcPlayer); //Init VpcPlayer.InitPlayer(); }
public void ReleasePlayer() { if (VpcPlayer != null) { VpcPlayer.StopPlayer(); try { VpcPlayer.VlcPlayerCore.Stop(); } catch (Exception ex) { } this.Controls.Remove(VpcPlayer); VpcPlayer = null; } }