Bug 254580 - Transitent navigation doesn't trigger video autoplay with sound
Summary: Transitent navigation doesn't trigger video autoplay with sound
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 16
Hardware: iPhone / iPad iOS 16
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-03-28 04:00 PDT by Mads Erik Forberg
Modified: 2023-05-05 16:58 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mads Erik Forberg 2023-03-28 04:00:30 PDT
Autoplay videos with sound were supported with transient navigation on iOS 16.4 beta. However, with the official release of iOS 16.4 today, this feature no longer works.

Is this intentional?

Steps to reproduce:
1. Goto https://static.vg.no/mads_test/nav-video.html in latest public release (not beta)
2. Click "Navigate to video with autoplay + sound"
3. Video does not autoplay.
Comment 1 Ahmad Saleem 2023-03-28 06:03:09 PDT
Safari 16.4 is matching Firefox Nightly 113 while Chrome Canary 114 auto-plays the video.

Safari Technology Preview 166 also does not autoplay video.

Although WebKit ToT auto plays this in Minibrowser.
Comment 2 Radar WebKit Bug Importer 2023-04-04 04:01:14 PDT
<rdar://problem/107604939>
Comment 3 Jer Noble 2023-05-05 16:57:57 PDT
Navigation should not result in transient activation. Websites should not get free rein to perform actions that require a user gesture just because a user clicked on a link to navigate to that website.

Tested against the link above:

- Firefox 112.0.2 does not allow the media to play on navigation (though it doesn't display the `navigator.userActivation.isActive:` line.

- Chrome 113.0.5672.63 allows the media to play with audio on navigation, but it displays: `navigator.userActivation.isActive: false`

- Chrome with the setting "Don't allow sites to play sound" enabled plays the media back muted, and also displays: `navigator.userActivation.isActive: false`.

- ToT Safari refuses to play the unmuted video, and displays: `navigator.userActivation.isActive: false`

The difference in behavior between Chrome, Firefox, and Safari is that Chrome allows video to play with audio by default, and Firefox & Safari do not.