Videos are autoplaying because the MediaFoundation implementation always call play() after load() has been called. When load() has been called, we should only start buffering data, not automatically start the playback.
Created attachment 275766 [details] Patch
Comment on attachment 275766 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=275766&action=review > Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:850 > + if (progress >= 100) { What is 100? Does this automatically buffer 100% of the data of the video? Is this good for HUGE videos?
(In reply to comment #2) > Comment on attachment 275766 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=275766&action=review > > > Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:850 > > + if (progress >= 100) { > > What is 100? Does this automatically buffer 100% of the data of the video? > Is this good for HUGE videos? As I have understood it, this is the percentage of the amount of data you need to start playing. 100 then means you have enough data to start or continue playback. Thanks for looking into this :)
So 100 means 100% of whatever MediaFoundation thinks is enough to start playing, not the percentage of the entire video, right? Could you give the constant 100 a name?
Created attachment 275810 [details] Patch
(In reply to comment #4) > So 100 means 100% of whatever MediaFoundation thinks is enough to start > playing, not the percentage of the entire video, right? Could you give the > constant 100 a name? Yes, according to the documentation it is the fill percentage of the playback buffer. I renamed the progress variable to 'percentageOfPlaybackBufferFilled', would that be ok?
Thanks for reviewing!
Comment on attachment 275810 [details] Patch Clearing flags on attachment: 275810 Committed r199114: <http://trac.webkit.org/changeset/199114>
All reviewed patches have been landed. Closing bug.
Local files are still affected by this bug, because they don't get MEBufferingStarted/MEBufferingStopped events. Any idea what would be the right approach to fix this issue?