65 comments

[ 3.0 ms ] story [ 148 ms ] thread
Thank god.

This has made visiting news websites—say, your local fox channel—nearly unbearable, between the auto-playing ads and content.

I can't imagine how people with small bandwidth go to sites these days without an ad blocker.

It's the `blink` tag of the 21st century.
Ah! Good old days when we "blink"ed everything important. :)
Wait, so that's not cool anymore?
That's not completely true.

It was a 50/50 split between the blink and the scrolling marquee.

21st century? This has been an issue for about two decades--since browsers first gained the ability to play sound--going well back to the '90's.
Ah, auto-play MIDI files!
Does this include animated gif?

If yes: then it's annoying.

If no: annoying ads turn into animated gifs.

If the video does not have an audio track, it seems that it will be allowed. However, as you note, animated gifs are still pretty annoying and I think it would be nice if they were click-to-play as well.
You can now change this setting either globally, or on a per-website basis in Safari Technology Preview 32: https://webkit.org/blog/7627/safari-technology-preview-32/

The options are: "Allow all Auto Play", "Stop Media with Sound" (the default), and "Never Auto Play".

Site authors following the best practices section in the WebKit.org blog should provide a play button for video-backed-gifs when "Never Auto Play" causes automatic playback to block.

> However, as you note, animated gifs are still pretty annoying

I think that comment actually says disabling autoplay on animated gifs would be annoying.

I think the comment was saying 2 things: its bad because we loose GIF auto play facility and its bad because we will still have ads via GIFs.

So basically, its a no win move for the consumer.

However, my response would be to that would be: yes its bad if so, and if not, users can hopefully "throttle" its impact on our experience. IE. I would expect that the browser controls the parameters in which the GIF is "played" to maximize performance, or to suit user preference. E.g. Max number of frames, GIF size, looping etc

How will this effect video backgrounds like Airbnb used to have?
I hope it breaks them. What a spectacular waste of bandwidth and energy.
Agreed.

There's a concept that the cheaper and more plentiful a resource gets the more it gets wasted and thus, the resource will be scarce again.

The "richness" of media today is often too thick for me to stomach. I don't know why people are so impressed or think it impresses people.

Regarding bandwidth… what if the video is efficiently encoded to less than the file size of a high-quality PNG/JPEG (assuming the image was not optimized itself)?

Artifacts in heavily compressed video files are often more acceptable than artefacts in highly compressed still JPEGs, IMO.

Perhaps the correct answer is to have a solid color or similarly simple background. Aids in readability too.
From the "Best Practices for Web Developers" section:

It’s worth pointing out that the new auto-play policies apply both to video used as a tool for making something visual happen (like background video or video-as-animated-gif) and also to video that serves as consumable content. We recommend web developers test their site with these new behaviors, ensuring any custom media controls behave correctly when auto-play is disabled, either automatically by Safari or by users.

I.e. you now need to verify that your site still looks good and works well when background video auto-play has been denied.

Although one might argue that there's something seriously wrong with your website already if it doesn't work without video playing in the background.

According to the article, blacklisting (or lack of whitelisting) is also easy to detect by handling the Promise rejection, which means you can easily provide a static fallback for video that's used purely decoratively.

I'd guess that a specified poster image would still work as expected.
I think they'll be fine, there's already special exceptions for videos that don't have an audio track.
Hopefully negatively. Those are a great example of the "let's break the Internet for everyone that isn't on unmetered broadband using Chrome latest" phenomenon.
We're still talking about an environment that can execute practically any code. I'm sure the next thing advertisers will do is download 100 static images and animate them with scripts.
I mean, advertisers have been using GIFs since the early days of the web. The benefit here is that audio won't autoplay unexpectedly, which nobody ever wanted ever.
Alternately they've overlay a transparent play button over the entire pay so the moment you click it counts as a "user action" and the video plays. Seen it happen on a few sites. They combine it with something like forbes uses with a "quote of the day" interstitial.
Or an opaque overlay with ' click here to read article' that also triggers the video
The main point of the feature is to prevent sound. A muted video will pass the test.
"…users now have the ability to turn off all forms of auto-play, including silent videos." (Emphasis added.)
The article later clarifies: A video with a silent audio track will be blocked from autoplay. A video without an audio track or a muted video will not be blocked.
On one side, I can certainly understand why Apple went with this, even if it drives me nuts that Safari@iOS can't do inline play at all (because it prevents nice artistic stuff using a canvas overlaid over a video element, for example), even if the play action is user-initiated.

On the other hand it takes away a LOT of flexibility - seriously, I don't want to do 50MB GIFs for animated background or weird JS trickery when I can use a 2MB video for the same effect.

The default is to still auto-play silent movies (movies with no audio track or with the muted flag). If you're just using this for a background effect, the best solution is to just get used to the fact that for a minority of users, the video won't work and you'll have to fill in something else (don't use a 50MB GIF, just go with something non-animated!), but a majority of users will still get the silent video.
Correct. A static image might be a good fallback for users who completely turn off all forms of auto-play. It's easy to detect auto-play is off and provide a graceful fallback.
When I am on my phone, having a monthly download limit of 2,5 GB after which my internet is cut off, I don't really want do download a 2 MB video at all.
I was not aware that "artistic" is now a synonym for "user-hostile". I promise you nobody wants to spend 2%-3% of their monthly AT&T data allotment on your partially obscured background video.
How about you just not have animated backgrounds? How does that possibly help usability in any way? All it does it waste bandwidth and CPU/battery
I'm glad they're taking away flexibility. I hope they entirely remove the ability to create animated backgrounds.
This is a very user-friendly feature, kudos to Apple for making the change. I hope other browsers follow in their steps.

I think every time I've encountered a website that autoplays video, it's been an annoyance. But maybe I haven't considered the topic with enough depth, what are examples of legitimate use-cases for autoplay video?

YouTube. Netflix.
Websites I'd certainly whitelist.
Not to mention it still seems much more user friendly to make this opt-in rather than opt-out.
Oh, absolutely. I'd even expect them to be whitelisted by default (although that would pose the interesting problem of deciding which sites deserve the privilege of being whitelisted out of the box).
Unfortunately if there is a "default" whitelist, it will become a "whoever pays $x money gets on the defaulted list." (I'm not referring to only Apple but if Chrome, Firefox, etc come out with the feature).
Youtube autoplay is the devil. If you want to open some videos in several tabs, you have to individually pause every tab. It's a real pain. I'd much prefer it if Youtube autoplayed only when you switch over to the tab.
It does for me, using safari.
It already does behave like that for me. Definitely in Safari but I think in Chrome too.
One place I did a project for had a web based front end for a CCTV system that would autoplay video when navigating to a dvr, camera, etc. IOS was a PITA because it wouldn't autoplay and there were some significant UI tweaks around that difference.

Of course since this only effects video that includes an audio track it wont impact them. I can't recall anything that auto plays video with audio that wasn't user hostile.

Ubiquiti's [0] security cameras also transmit audio, so this may affect their live interface or that of similar products. I'm far more in favor of this new option than annoyed by needing an additional action to play the video though.

[0]: https://www.ubnt.com/products/#unifiVideo

There is a per site permissions system so you can allow the things you want.
It's not that there's no reasons to have them, it's that companies like CNN abuse the privilege cause their advertisers don't mind embellished numbers.
We use keyboard controls in our app (vidhub.co) to control media, looks like a Safari 11 user will no longer be able to just hit a key to start a video if Safari's "automatic inference engine" chooses to block us.
I believe you can disable the restriction for particular sites if required.
If it were up to me, they'd remove that ability altogether. Websites that screw with the keyboard are a huge pet peeve of mine.
A "keypress" event counts as a user gesture, so as long as your code looks like:

document.addEventListener('keypress', event => { if (event.key === 'space') video.play(); });

...then everything should just work fine.

(comment deleted)
How does this affect YouTube, Twitch, Netflix?
They still have a "Play" button, no? It's possible there may be some whitelist as well.
FTA:

> Safari 11 also gives users control over which websites are allowed to auto-play video and audio by opening Safari’s new “Websites” preferences pane, or through the “Settings for This Website…” option in the Safari menu

Right you have a way to manually whitelist sites on your own as well. But it wouldn't surprise me if that whitelist came preloaded with a number of legit video sites (netflix, youtube, etc...)
Firefox has had it for a while at media.autoplay.enabled. Unfortunately, like this article notes, this arguably breaks web standards and some websites behave poorly as a result. YouTube requires you to stop the not-yet-started video and then start it again to get it to play. And Google Play Music just straight up doesn't work. Hopefully Apple publicizing this will cause website devs to support it better, and it can be presented to the user as a legitimate option instead of a hack.
Any word on when this will get rolled out?
A shame they don't block silent view too. Motion is a distraction (which is why advertisers use it, as if being distracted was what I wanted).

This is why I mourned the death of Flash. Not installing flash made the web a much better place.