locked
how to use the windows phone default media player from my app

    Question

  • hello every one,


    I build a windows phone 8 app , and i used this code, to play a video in the phone media player (didn't want to use MediaElement)

    using Microsoft.Phone.Tasks;

    MediaPlayerLauncher mediaPlayerLauncher = new MediaPlayerLauncher();

    i just see that in windows phone 8.1 i can't use this namespace and a lot of others, (I didn't understand why...)

    and i want to lunch a video in the phone media player instead using a MediaElment

    how can i do it?

    thanks,

    Or

    Sunday, February 01, 2015 4:49 PM

Answers

  • Hi Or,

    Using Launcher class is fine (not sure if you are playing with 8.1 Silverlight or runtime), you can launcher default system app by following code:

     var success = await Windows.System.Launcher.LaunchFileAsync(file);
    

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, February 02, 2015 1:42 AM
    Moderator