Bug 238388 - No audio (ringtone) if User receives incoming webRTC call while the browser is in the background
Summary: No audio (ringtone) if User receives incoming webRTC call while the browser i...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 15
Hardware: iPhone / iPad iOS 15
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-03-25 10:44 PDT by Madara Freimane
Modified: 2022-05-19 08:54 PDT (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 Madara Freimane 2022-03-25 10:44:23 PDT
Created attachment 455780 [details]
sysdiagnose_2022.03.25_19-19-57+0200_iPhone-OS_iPhone_19E241.tar.gz

Summary:
No audio (ringtone) if User receives incoming webRTC call while the browser is in the background

Tested devices:
Bug is reproducible on:
*iPhone 12 Pro Max | iOS 15.2
*iPhone 11 | iOS 15.3.1
*iPhone 11 Pro Max | iOS 15.4


Scenario:
Precondition:
Safari is in the background

Steps:
1. User receives an incoming WebRTC call

Actual result:
No audio (ringtone) if User receives incoming webRTC call while the browser is in the background

Expected result:
There is an audio (ringtone) if User receives incoming webRTC call while the browser is in the background

Reproducibility:
100%
Comment 1 Radar WebKit Bug Importer 2022-03-28 06:42:39 PDT
<rdar://problem/90919456>
Comment 2 youenn fablet 2022-03-28 06:55:54 PDT
Hi Madara, can you tell how you play the ringtone?
There are some restrictions to play audio when a page is backgrounded.
Would you be able to provide a test case?
Comment 3 Madara Freimane 2022-03-29 04:41:19 PDT
One of the use cases:
1. Create a call using https://web.skype.com/
2. Make outgoing call from another device to iOS device

Notes:
-If we compare behaviour with an Android: there is an ringtone and User knows that there is an incoming call on browser side.
-Also observed, that sometimes it's not possible to receive a call while browser is in a background.
Comment 4 youenn fablet 2022-04-07 05:49:26 PDT
(In reply to Madara Freimane from comment #3)
> One of the use cases:
> 1. Create a call using https://web.skype.com/
> 2. Make outgoing call from another device to iOS device
> 
> Notes:
> -If we compare behaviour with an Android: there is an ringtone and User
> knows that there is an incoming call on browser side.
> -Also observed, that sometimes it's not possible to receive a call while
> browser is in a background.

Do you know which API is used to trigger the ringtone in iOS and Android?
When a tab is backgrounded, it might be suspended, meaning that JavaScript might not even be running. That might explain why the call cannot be made.
I guess the future solution might be a mix of push API and notification API.