Improve Safari's media autoplay heuristics

Originator:SaagarJha28
Number:rdar://32746747 Date Originated:13-Jun-2017 01:12 PM
Status:Open Resolved:
Product:Safari Technology Preview Product Version:Release 32 (Safari 11.0, WebKit 13604.1.23.0.4)
Classification:Enhancement Reproducible:
 
Summary:
By default, Safari has a whitelist of sites for which it will allow autoplay, and other websites will require manual interaction before the video starts. I'd like to suggest a slightly better solution that uses a bit more context to make this decision. In particular, most people would probably like the video to autoplay if it:

1. Starts immediately when navigating to the page (i.e. the function of the page is to be a video player; this includes sites that aren't specifically video playing sites such as developer.apple.com)
2. Covers most of the (visible) screen. If this is the case, we can be reasonably confident that it is part of the main content and isn't just an ad or some auxiliary annoyance video.

Using an algorithm like this weeds out most of the annoying video sites, which tend to spring the video on you once you scroll down in a tiny little window that follows you around. Even if it doesn't work *all* of the time, the fact that the video covers most of the screen should make it easy to find and turn off autoplaying video. See the screenshots for examples of acceptable and unacceptable videos.

Steps to Reproduce:
1. Navigate to a page that is not traditionally a video playing site (i.e. something not on Safari's built in whitelist), such as Apple's WWDC session videos

Expected Results:
The video autoplays, since it's obvious that the user would want this to occur

Observed Results:
The video is paused since it's not on the whitelist

Version:
Release 32 (Safari 11.0, WebKit 13604.1.23.0.4)

Notes:


Configuration:
Early 2015 MacBook Pro with Retina Display running macOS High Sierra 10.13 Beta (17A264c)

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!