I am able to play a video in windows in my project, but the same code fails on the XBOX at the _player.Play(_logo)
line. The error message is:
"An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.Xna.Framework.dll"
Relevant code:
public LogoScreen()
{
TransitionOnTime = TimeSpan.Zero;
TransitionOffTime = TimeSpan.Zero;
_content = new ContentManager(Game3.Instance.Services, "Content");
_player = new VideoPlayer();
_player.IsLooped = false;
_sb = new SpriteBatch(Game3.GDM.GraphicsDevice);
}
public override void LoadContent()
{
_logo = _content.Load<Video>("Video/intro_logo");
}
private bool _started = false;
public override void Update(bool otherScreenHasFocus,
bool coveredByOtherScreen, bool coveredByPopup)
{
if(_started == false)
{
_player.Play(_logo);
_started = true;
}
if (_player.State == MediaState.Stopped)
{
Exit();
}
}
Here is the random test video that I'm using: http://olhovsky.com/xna/intro_logo.wmv
Any ideas why this might be failing?