@Yang wrote:
Because monogame video resolution only 720p,
I go to google search many solve method,
Finally, I finded other method play video in monogame,
but i hope monogame video can support 1080p rather than use other method achieve.
(Will use WPF+WinForm to Monogame)
Environment:
Visual Studio 2015
Monogame 3.6.0.1625
Windows7[part1]
Add reference:
1.PresentationCore
2.PresentationFramework
3.WindowsBase
4.WindowsFormsIntegration[part2]
System.Windows.Forms.Form form;
System.Windows.Forms.Integration.ElementHost eh;
System.Windows.Controls.MediaElement me;(or "using" keyword)
[part3]
form = (System.Windows.Forms.Form)System.Windows.Forms.Control.FromHandle(your game window handle);
form.Size = new System.Drawing.Size(0, 0); //Avoid flashing, Can change
form.BackColor = System.Drawing.Color.Black; //Avoid flashing, Can changeeh = new System.Windows.Forms.Integration.ElementHost();
eh.BackColor = System.Drawing.Color.Black; //Avoid flashing, Can change
eh.MinimumSize = new System.Drawing.Size(1920, 1080); //Avoid move, Can changeme = new System.Windows.Controls.MediaElement();
eh.Child = me;form.Controls.Add(eh);
form.Show();me.Source = new Uri(your video file);
me.LoadedBehavior = System.Windows.Controls.MediaState.Manual;
me.UnloadedBehavior = System.Windows.Controls.MediaState.Manual;
me.Play();Maybe has something bug,
But this video player provide basic function for me.
Posts: 1
Participants: 1