Kiwimoisi
Kiwimoisi

Reputation: 4182

MediaPlayerLauncher doesn't work

I am wondering why my MediaPLayerLauncher always throw an error 404 from the server.

I can load all the files I want, ZIP files or jpeg etc with my WebBrowserTask so it means that my url are good and working. When it comes to mp4 files it doesn't work.

This is the code I am actually using :

            if (newPath.Contains(".mp4"))
            {
                MediaPlayerLauncher mediaPlayerLauncher = new MediaPlayerLauncher();
                mediaPlayerLauncher.Media = new Uri(newPath, UriKind.RelativeOrAbsolute);
                mediaPlayerLauncher.Location = MediaLocationType.Data;
                mediaPlayerLauncher.Controls = MediaPlaybackControls.Pause | MediaPlaybackControls.Stop;
                mediaPlayerLauncher.Show();
            }

The newPath value will be : http://website.com//files//myfile.mp4

Can someone help me ?

Upvotes: 2

Views: 391

Answers (1)

Alexis Mathieu
Alexis Mathieu

Reputation: 692

MediaLocationType.Data is used to specify that the file is stored in the Isolated Storage, try to remove this line.

Upvotes: 3

Related Questions