RESOLVED INVALID164590
Add a preference to disable media autoplay
https://bugs.webkit.org/show_bug.cgi?id=164590
Summary Add a preference to disable media autoplay
Eric Carlson
Reported 2016-11-10 06:45:42 PST
Add a preference to disable media autoplay
Attachments
Proposed patch. (19.87 KB, patch)
2016-11-10 06:54 PST, Eric Carlson
no flags
Archive of layout-test-results from ews114 for mac-yosemite (1.99 MB, application/zip)
2016-11-10 08:19 PST, Build Bot
no flags
Eric Carlson
Comment 1 2016-11-10 06:46:28 PST
Eric Carlson
Comment 2 2016-11-10 06:54:24 PST
Created attachment 294369 [details] Proposed patch.
Build Bot
Comment 3 2016-11-10 08:19:30 PST
Comment on attachment 294369 [details] Proposed patch. Attachment 294369 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2490262 New failing tests: media/video-autoplay-blocked.html
Build Bot
Comment 4 2016-11-10 08:19:33 PST
Created attachment 294373 [details] Archive of layout-test-results from ews114 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-yosemite Platform: Mac OS X 10.10.5
Eric Carlson
Comment 5 2016-11-10 09:19:59 PST
(In reply to comment #3) > Comment on attachment 294369 [details] > Proposed patch. > > Attachment 294369 [details] did not pass mac-debug-ews (mac): > Output: http://webkit-queues.webkit.org/results/2490262 > > New failing tests: > media/video-autoplay-blocked.html This is failing because Internals didn't rebuild: TypeError: internals.settings.setBlockMediaAutoplay is not a function. (In 'internals.settings.setBlockMediaAutoplay(true)', 'internals.settings.setBlockMediaAutoplay' is undefined)
Eric Carlson
Comment 6 2016-11-10 12:15:34 PST
This is unnecessary.
Darin Adler
Comment 7 2016-11-12 21:33:58 PST
Comment on attachment 294369 [details] Proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=294369&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:54 > +@property (nonatomic, setter=_setBlockMediaAutoplay:) BOOL _blockMediaAutoplay WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); Cocoa APIs try to stay away from property names that sound like action verb phrases. The method name, _blockMediaAutoplay, can sound like a method that actively blocks something, rather than a property name of a boolean determining what the policy is. That thinking is where Cocoa property names like shouldBlockMediaAutoplay come from. > Source/WebKit/mac/WebView/WebPreferencesPrivate.h:273 > +- (void)setBlockMediaAutoplay:(BOOL)flag; > +- (BOOL)blockMediaAutoplay; Ditto.
Note You need to log in before you can comment on or make changes to this bug.