Bug 193418 - Media elements can pause iOS audio without user interaction
Summary: Media elements can pause iOS audio without user interaction
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 12
Hardware: iPhone / iPad iOS 12
: P2 Minor
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-14 16:52 PST by Sepand Parhami
Modified: 2019-01-15 16:46 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 Sepand Parhami 2019-01-14 16:52:12 PST
I have not been able to create an isolated reproduction for this yet, but the following webpage causes my music playback (e.g. from an app) to pause in iOS without any user interaction. That is, simply loading the page causes music playback to stop.

https://www.cbsnews.com/amp/news/americans-disapprove-of-handling-of-government-shutdown-cbs-news/

This appears to be related to an iframe on the page, which contains a video element. If I prevent that iframe from loading, the issue does not appear.

I am not sure if this is related, but when trying to reproduce the issue, I found that loading a page with a muted video, then reloading without the muted attribute, I could get Safari to stop iOS's audio (though the video does not play). That is:

(initial):
<body>
  <video playsinline="" muted=""></video>
</body>

<script>
  const video = document.querySelector('video');
  video.src = '...';
  video.play();
</script>

(updated):
<body>
  <video playsinline=""></video>
</body>

<script>
  const video = document.querySelector('video');
  video.src = '...';
  video.play();
</script>

I also noticed this when loading the page as an iframe.
Comment 1 Radar WebKit Bug Importer 2019-01-15 15:52:37 PST
<rdar://problem/47300066>
Comment 2 Jer Noble 2019-01-15 16:01:21 PST
Sepand, on what version of iOS are you seeing this behavior?
Comment 3 Sepand Parhami 2019-01-15 16:46:51 PST
Jer,

I see the issue on 12.1.2 (16C101)