Bug 264851 - Video Source elements not playing on first load when when muted and set to autoplay
Summary: Video Source elements not playing on first load when when muted and set to au...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 17
Hardware: iPhone / iPad iOS 17
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-14 17:40 PST by Nathaniel Chang
Modified: 2023-11-21 17:41 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nathaniel Chang 2023-11-14 17:40:38 PST
PROBLEM:
On iPad and IOS devices not audo playing the following video elements on the first load of the page. On refresh of the page the the video elements will play.

```
<video class="split-content--picture mod-slide-1" autoplay loop muted playsinline>
	<source media="(min-height:450px)" src="img/bg-1-lg.mp4" type="video/mp4" />
	<source media="(min-height:0px)" src="img/bg-1.mp4" type="video/mp4" />
</video>
```

If the following code is then added to the page then this problem doesn't exsits.

```
<video style="display: none;" controls="true">
</video>
```

EXPECTED RESULT:
Second snippet of code is not needed to allow the inital snippet to play.
Comment 1 Radar WebKit Bug Importer 2023-11-21 17:41:15 PST
<rdar://problem/118700772>