r93437 add a call to prepareToPlay to HTMLMediaElement::load. prepareToPlay tells the media engine to begin buffering data, so it should not be called if media loading requires a user gesture and load() was not called from one.
Created attachment 136912 [details] Proposed patch
<rdar://problem/11238726>
http://trac.webkit.org/changeset/114021
Hi, Eric, this change breaks all the youtube embeds on android. For example: http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html. And the actual submitted patch is not identical to the proposed patch. I am wondering whether we can either: 1. remove the exception throwing behavior? If an exception is thrown, no video control and no poster will be shown in chrome. And user will see a black square in the middle of a page. Or 2. Use the proposed patch, so that we have the RequireUserGestureForLoadRestriction flag.
(In reply to comment #4) > Hi, Eric, this change breaks all the youtube embeds on android. For example: http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html. > > And the actual submitted patch is not identical to the proposed patch. > > I am wondering whether we can either: > 1. remove the exception throwing behavior? If an exception is thrown, no video control and no poster will be shown in chrome. And user will see a black square in the middle of a page. Or > > 2. Use the proposed patch, so that we have the RequireUserGestureForLoadRestriction flag. We should remove the exception because load() is no longer spec'd to throw.
(In reply to comment #5) > (In reply to comment #4) > > Hi, Eric, this change breaks all the youtube embeds on android. For example: http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html. > > > > And the actual submitted patch is not identical to the proposed patch. > > > > I am wondering whether we can either: > > 1. remove the exception throwing behavior? If an exception is thrown, no video control and no poster will be shown in chrome. And user will see a black square in the middle of a page. Or > > > > 2. Use the proposed patch, so that we have the RequireUserGestureForLoadRestriction flag. > > We should remove the exception because load() is no longer spec'd to throw. Thanks, Eric. I created a patch for this: https://bugs.webkit.org/show_bug.cgi?id=103318