[Webkit-unassigned] [Bug 221413] Safari does not execute JavaScript code to play another audio item when playing backgrounded FairPlay content

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Oct 1 14:16:57 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=221413

Peter Fernandes <supersonicandtails at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |supersonicandtails at gmail.co
                   |                            |m

--- Comment #5 from Peter Fernandes <supersonicandtails at gmail.com> ---
(In reply to Brad Isbell from comment #4)
> Created attachment 458973 [details]
> Demonstrates the bug in iOS Safari
> 
> This bug is still an issue, and is also a problem for regular audio files
> without DRM.
> 
> Attached is a page with some script demonstrating the issue.
> 
> Observations:
> 
>  - The `ended` event does fire and its handlers do run, even when the screen
> is off.
>  - Upon replacing the `src` of the `<audio>` element, it cannot be played
> via script when the screen is off.
>  - The `paused` property value is `false`, `currentTime` is `0` zero.  Audio
> playback does not occur.
>  - The only way to resume playback is to unlock phone, and use a UI element
> to call `.play()` on the audio element.
> 
> This prevents web apps from playing from a playlist of media.  It also seems
> to be a regression, as this method used to work.  This method is also
> documented here: 
> https://developer.apple.com/library/archive/documentation/AudioVideo/
> Conceptual/Using_HTML5_Audio_Video/ControllingMediaWithJavaScript/
> ControllingMediaWithJavaScript.html#//apple_ref/doc/uid/TP40009523-CH3-SW5

Brad, are you doing any potentially long-running async operations (fetch, etc.) before the next track starts playing? I have this use case working in my own app. Playback of a user playlist works continuously with the Safari browser tab backgrounded on desktop, or PWA backgrounded on iOS.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221001/cc01a124/attachment-0001.htm>


More information about the webkit-unassigned mailing list