Failing to play video after removing autoplay attribute RRS feed

  • Question

  • Hi,

    I'm developing a media foundation plugin for a Windows Store Application and I have a problem right at the start before the video plays.

    If I have the JavaScript tag: <video autoplay></video> everything works fine as expected.

    If I remove the autoplay: <video></video> and run without a debugger attached, the player will say "The video failed to play." If I run with the debugger attached it will play the video.

    My guess is that this has something to do with code executing more slowly with the debugger attached and some data is downloaded in the meanwhile when the player requests it while in the other case it doesn't have time to download data and displays an error.

    Documentation is scarce so it's getting hard to understand what is going on under the cover.

    Would really appreciate if someone could point me in the right direction on how to fix this issue.

    Thank you,

    PS: I'm not really sure if this is the right place to ask this question as this is a Media Foundation plugin for a Windows Store app but couldn't find a better section under the windows store apps forums.

    Ricardo Sabino --- http://www.ricardosabino.com

    Friday, September 13, 2013 1:38 PM

All replies

  • If things work okay with autoplay enabled, it is probably because something went wrong during a frame step.  Without autoplay, the video tag tries to grab a single frame to display until playback starts.  To the source, this should look roughly like this:


    These calls will happen in rapid succession, pretty much as fast as the operations can complete.  The first thing to check is that your source is getting these calls and sending the right events in response.

    Friday, October 11, 2013 12:39 AM