locked
MediaElement buffer RRS feed

  • Question

  • I am seeing inconsistent buffering behavior when setting my MediaElement to an http URI source. My application is being developed for Win 8.1 under VS 2013. When debugging or running in the simulator on Visual Studio the MediaElement continues to download and fill up the buffer until the entire file is downloaded. When deploying the application to a Surface RT, I am seeing only a small portion of the file being buffered, and the buffer tries to stay a small portion ahead of playback. Is there a way that I can get consistent buffering behavior? I would prefer that the MediaElement continues to download the file to completion.

    Monday, January 20, 2014 4:16 PM

Answers

  • I don't see any settings which directly affects the buffering in the API set.  However, you should consider that buffering a small amount is more performant than buffering the entire file - you might as well just do a download of the file to localstorage then launch playback. 

    If you don't want to go that route, you can listen for BufferingProgressChanged events and only start playing when download reaches 100%.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, January 21, 2014 1:28 PM
    Moderator