Summary: | Enable autoplay when <video>'s src is from media stream | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | wjia | ||||||
Component: | Media | Assignee: | wjia | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | abarth, eric.carlson, feature-media-reviews, laszlo.gombos, ojan.autocc, tommyw, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
wjia
2012-12-17 15:52:54 PST
Created attachment 179820 [details]
Patch
ping. Comment on attachment 179820 [details]
Patch
Can we test this change?
In my local build of Chrome on Android, this patch works. Not sure how to add an auto test for this. (In reply to comment #4) > In my local build of Chrome on Android, this patch works. Not sure how to add an auto test for this. Couldn't you use internals.settings.setMediaPlaybackRequiresUserGesture()? See LayoutTests/media/no-autoplay-with-user-gesture-requirement.html for an example. Created attachment 184029 [details]
Patch
The test has been added by utilizing platform/chromium/media/video-capture-preview.html in second patch. Please take another look. Comment on attachment 184029 [details]
Patch
Looks reasonable to me, but I'm not an expert on this code.
Comment on attachment 184029 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=184029&action=review > Source/WebCore/html/HTMLMediaElement.cpp:1027 > +#if ENABLE(MEDIA_STREAM) > + if (MediaStreamRegistry::registry().lookupMediaStreamDescriptor(url.string())) > + removeBehaviorRestriction(RequireUserGestureForRateChangeRestriction); > +#endif Does MediaStreamRegistry::registry().lookupMediaStreamDescriptor() returning true *always* mean that the user has been prompted? (In reply to comment #9) > (From update of attachment 184029 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=184029&action=review > > > Source/WebCore/html/HTMLMediaElement.cpp:1027 > > +#if ENABLE(MEDIA_STREAM) > > + if (MediaStreamRegistry::registry().lookupMediaStreamDescriptor(url.string())) > > + removeBehaviorRestriction(RequireUserGestureForRateChangeRestriction); > > +#endif > > Does MediaStreamRegistry::registry().lookupMediaStreamDescriptor() returning true *always* mean that the user has been prompted? Yes. That's described in http://www.w3.org/TR/mediacapture-streams/. More specifically, getUserMedia prompts the user for permission to use their Web cam or other video or audio input. Comment on attachment 184029 [details] Patch Rejecting attachment 184029 [details] from commit-queue. wjia@chromium.org does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py. - If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags. - If you have committer rights please correct the error in Tools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your committer rights. Comment on attachment 184029 [details] Patch Clearing flags on attachment: 184029 Committed r140645: <http://trac.webkit.org/changeset/140645> All reviewed patches have been landed. Closing bug. |