I tried the bellow script in my XBOX for the playback of the video file. Recommend you to try with the script it might be also work in the Windows 7 phone.
Code:
Initialize()
{
VideoPlayer = new VideoPlayer();
}
LoadContent()
{
Video = Content.Load<Video>(@"Video/MyVideo.wmv");
}
Update(GameTime gameTime)
{
if (VideoPlayer.State == MediaState.Stopped) { VideoPlayer.Play(Video);
}
}
Draw(GameTime gameTime)
{
Texture2D VideoTexture = VideoPlayer.GetTexture();
if (VideoPlayer.State == MediaState.Playing)
{
SpriteBatch.Begin(SpriteBlendMode.None, SpriteSortMode.Immediate, SpriteSaveMode.None);
SpriteBatch.Draw(VideoTexture, new Rectangle( 0, 0, 1280, 720 );
SpriteBatch.End();
}
base.Draw(gameTime);
}
Bookmarks