Can't Play mp4 File Coming from a https Storage site in MediaPlayerElement RRS feed

  • Question

  • I'm developing a UWP app that has a collection of properties of type MediaSource and each element in the collection is assigned to a source from a URI class:

    Video = MediaSource.CreateFromUri(new Uri("https://storage.cloud.google.com/video_bucket/video.mp4"))

    The video is supposed to play inside a MediaPlayerElement control. The control's source is bound to the MediaSource property through a view model. The video in each element of the collection changes when the user clicks a Next  AppBarButton controlled by a Command Object. The control played each video correctly when I tested the above code using a localhost site on an IIS server I set up:

    Video = MediaSource.CreateFromUri(new Uri("http://locahost/images/video.mp4"))

    But when I switched to the above  https URI, I get the following error from the MediaPlayerElement control-Unidentified file type or invalid path.

    Any suggestions on how I can fix this?

    • Moved by CoolDadTx Wednesday, May 13, 2020 1:33 PM UWA related
    Wednesday, May 13, 2020 3:50 AM

All replies

  • Hi Generation Continuum,
    I viewed your description, it is mostly related to UWP. So I suggest you ask the questions in Microsoft Q&A forum and you can get more professional answer.
    Thank you for your understanding.
    Best Regards,
    Daniel Zhang

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 13, 2020 7:50 AM