Reputation: 273
I'm trying to play a video in a monogame project. I've done this in XNA in the past by including the Framework.Video directory and it's very simple. This cannot be done in monogame as Visual Studio 2012 wont accept the XNA directories.
I've not been able to find any other way explained anywhere if you can actually put video in monogame yer and if you can how it's done.
Any ideas?
Upvotes: 1
Views: 7102
Reputation: 55
There is no VideoPlayer at the moment in Monogame for Windows 8 or Winrt.
You need to have a "Monogame Windows Store XAML" project or make some changes to your Monogame Store project" to switch it to a XAML project.
http://codedealer.wordpress.com/2013/05/02/how-to-play-a-video-with-monogame-for-windows-8-winrt/
Upvotes: 0
Reputation: 21745
I'm going to assume that by "directory" in your question you actually mean "namespace".
And what you are trying is is
using Microsoft.Xna.Framework.Media;
or
Microsoft.Xna.Framework.Media.VideoPlayer videoPlayer;
...
videoPlayer = new Microsoft.Xna.Framework.Media.VideoPlayer();
The reason you are unable to access these namespaces is probably because you are using the wrong branch of MonoGame. 3D and Video support is provided by the develop3d branch (now the default branch in the official git repository on github: https://github.com/mono/MonoGame)
You will have to get the source for that branch and compile it yourself (just load the project in VS2012)
As a starting point, take a look at the VideoPlayer sample in MonoGame-Samples: https://github.com/CartBlanche/MonoGame-Samples/tree/master/VideoPlayer
Upvotes: 2