5
\$\begingroup\$

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?

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

The Mono Framework seems to implement a media player via the windows media player. https://github.com/mono/MonoGame/blob/develop3d/MonoGame.Framework/Media/MediaPlayer.cs

\$\endgroup\$
5
  • \$\begingroup\$ Thanks Evan, I'll give it a try tonight when I get home. \$\endgroup\$ Commented Jan 31, 2013 at 15:18
  • 1
    \$\begingroup\$ @JoshNaylor please don't mark this as accepted until you've verified that it really works. This will discourage other people from answering. \$\endgroup\$
    – ashes999
    Commented Jan 31, 2013 at 15:41
  • \$\begingroup\$ I've put all of that in a class but apparently Framework.Media.MediaQueue and .Song does not contain definitions of things like Clear,Add and Volume. I think I'm missing the directory SharpDX.Multimedia for some reason. Will have to try locate it. \$\endgroup\$ Commented Jan 31, 2013 at 22:46
  • \$\begingroup\$ I've commented out the lines which where giving me problems in the MediaPlayer.cs file, i dont think they will effect much. Now i dont know how to call both the Video and VideoPlayer like i would in XNA \$\endgroup\$ Commented Feb 1, 2013 at 0:22
  • \$\begingroup\$ Looking further into it, i think it was this that I needed. github.com/monospider/monogame/blob/master/MonoGame.Framework/… \$\endgroup\$ Commented Feb 1, 2013 at 9:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .