static void Main() { System.Windows.Forms.Form frm = new System.Windows.Forms.Form(); frm.Height = 600; frm.Width = 800; LibMPlayerWinform.WinFormMPlayerControl playerControl = new LibMPlayerWinform.WinFormMPlayerControl(); playerControl.Dock = DockStyle.Fill; playerControl.MPlayerPath = @"C:\Users\Peter\Desktop\mplayer.exe"; playerControl.VideoPath = @"C:\Users\Peter\Downloads\sintel_trailer-720p.mp4"; frm.Controls.Add(playerControl); Application.Run(frm); }
static void Main() { System.Windows.Forms.Form frm = new System.Windows.Forms.Form(); frm.Height = 600; frm.Width = 800; LibMPlayerWinform.WinFormMPlayerControl playerControl = new LibMPlayerWinform.WinFormMPlayerControl(); playerControl.Dock = DockStyle.Fill; playerControl.MPlayerPath = @"C:\path\to\mplayer.exe"; playerControl.VideoPath = @"C:\path\to\video\sintel_trailer-720p.mp4"; frm.Controls.Add(playerControl); Application.Run(frm); }
static void Main() { var player = LibMPlayerCommon.PlayerFactory.Get(-1, "/usr/lib/x86_64-linux-gnu/libmpv.so.1"); System.Windows.Forms.Form frm = new System.Windows.Forms.Form(); frm.Height = 600; frm.Width = 800; var playerControl = new LibMPlayerWinform.WinFormMPlayerControl(player); player.SetHandle(playerControl.Handle); playerControl.Dock = DockStyle.Fill; //playerControl.MPlayerPath = @"C:\path\to\mplayer.exe"; playerControl.VideoPath = @"/home/peter/Downloads/Die Hard 2 (1990) [1080p] {5.1}/Die.Hard.2.BluRay.1080p.x264.5.1.Judas.mp4"; frm.Controls.Add(playerControl); Application.Run(frm); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //Application.Run(new Form1()); System.Windows.Forms.Form frm = new System.Windows.Forms.Form(); frm.Height = 600; frm.Width = 800; LibMPlayerWinform.WinFormMPlayerControl playerControl = new LibMPlayerWinform.WinFormMPlayerControl(); var player = LibMPlayerCommon.PlayerFactory.Get(playerControl.Handle, GetMediaPlayerPath()); playerControl.SetPlayer(player); playerControl.Dock = DockStyle.Fill; playerControl.MPlayerPath = GetMediaPlayerPath(); playerControl.VideoPath = GetMediaPath(); frm.Controls.Add(playerControl); Application.Run(frm); }