locked
MediaElement.GetSource() --Saving http:// based video file to local disk after Media element has downloaded it RRS feed

  • Question

  • I am trying to simply save a media file that the Media control has as it's source, once the streaming is complete.  There is no get source property so I don't know how to get at the underlying storage file.  Is this possible?

            private void MediaPreview_DownloadProgressChanged(object sender, RoutedEventArgs e)
            {
                if (this.MediaPreviewer.DownloadProgress == 1) // done dowloading
                {
                    // var x = this.MediaPreviewer.GetSource()???;
                }
            }

    Thanks in advance


    Dexter

    Wednesday, November 13, 2013 8:02 PM

Answers

  • Hi,Dexter

    There is no direct API can get the MediaElemt remote file source in windows store
    app!

    When you use video tag to play some videos from Internet, you would find a
    lot of cache files will be created at <ms-appdata:///temp> folder.

    If you want to save the MediaElement file source into your computer you can get
    the cache file in temporaryFolder and save it into your computer library.

    Refer to some links below:

    http://msdn.microsoft.com/en-us/library/windows/apps/hh700363.aspx

    http://msdn.microsoft.com/en-us/library/windows/apps/hh758319.aspx

    Also,you can use httpclient to download the file in the remote server and then save it into your computer:

    http://msdn.microsoft.com/en-us/library/windows/apps/jj152726.aspx

    Best Wishes!



    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. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    • Edited by Anne Jing Thursday, November 14, 2013 3:51 AM edit
    • Marked as answer by Dexter Dengler Thursday, November 14, 2013 1:08 PM
    Thursday, November 14, 2013 3:50 AM

All replies

  • Hi,Dexter

    There is no direct API can get the MediaElemt remote file source in windows store
    app!

    When you use video tag to play some videos from Internet, you would find a
    lot of cache files will be created at <ms-appdata:///temp> folder.

    If you want to save the MediaElement file source into your computer you can get
    the cache file in temporaryFolder and save it into your computer library.

    Refer to some links below:

    http://msdn.microsoft.com/en-us/library/windows/apps/hh700363.aspx

    http://msdn.microsoft.com/en-us/library/windows/apps/hh758319.aspx

    Also,you can use httpclient to download the file in the remote server and then save it into your computer:

    http://msdn.microsoft.com/en-us/library/windows/apps/jj152726.aspx

    Best Wishes!



    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. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    • Edited by Anne Jing Thursday, November 14, 2013 3:51 AM edit
    • Marked as answer by Dexter Dengler Thursday, November 14, 2013 1:08 PM
    Thursday, November 14, 2013 3:50 AM
  • Perfect and super helpful.  Exactly what I wanted in the cache folder!

    Dexter

    Thursday, November 14, 2013 1:08 PM