Twilio-video.js: Local audio loss after phone call on iOS 14 Safari

Created on 29 Sep 2020  ยท  6Comments  ยท  Source: twilio/twilio-video.js

  • [x] I have verified that the issue occurs with the latest twilio-video.js release and is not marked as a known issue in the CHANGELOG.md.
  • [x] I reviewed the Common Issues and open GitHub issues and verified that this report represents a potentially new issue.
  • [x] I verified that the Quickstart application works in my environment.
  • [x] I am not sharing any Personally Identifiable Information (PII)
    or sensitive account information (API keys, credentials, etc.) when reporting this issue.

When on Mobile Safari on iOS 14, if user receives a phone call the microphone audio track will no longer transmit audio upon returning to the Twilio video call.

This issue occurred previously on iOS 13 and below but was fixed in a recent version of twilio-video.js. It has since reemerged on iOS 14.

Software versions:

  • [x] Browser(s): Mobile Safari
  • [x] Operating System: iOS 14+
  • [x] twilio-video.js: 2.7.2
  • [x] Third-party libraries (e.g., Angular, React, etc.): Vue (probably others too)
Safari iOS

Most helpful comment

@markbrouch ,

Since you let us know that your issue was fixed in twilio-video.[email protected], I'll close this issue.

Thanks,

Manjesh Malavalli
JSDK Team

All 6 comments

Thank you for reporting this issue @markbrouch - Yes we did implement some workarounds for iOS 13.x - we added mechanism to reacquire and replace the local audio track if it ends or gets silent after safari gets background/foregrounded - but perhaps those workarounds are not working as well for iOS 14. We have open an internal ticket ( JSDK-3031 ) and started investigating this as a high priority. Will keep you updated with our findings.

if you have consistent repro steps please share. Does this require a phone call or other apps like messenger call also has the same effect? Does declining incoming call also ends up with the same issue?

Any room-sid that repro'ed the issue, and if possible any client side (ios) console logs would be very helpful too.

Thanks,
Makarand

Thanks @makarandp0! We discovered this bug as a result of a user receiving a phone call while in a room with an active LocalAudioTrack. After returning to the mobile safari browser tab with the video call, the microphone stopped working (similar to the issue that was fixed for iOS 13 previously).

Here is an example video room and resulting Safari logs from the issue:

Room SID: RMe5044dabb28370466fadd285c77c9011

[Info] 2020-09-30 โ€“ "22:27:56.109Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[connect #1]:" โ€“ "Connecting to a Room" (application-d875219ee6720055104e.js, line 113133)
[Info] 2020-09-30 โ€“ "22:27:56.111Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[connect #1]:" โ€“ "Getting LocalTracks" (application-d875219ee6720055104e.js, line 113133)
[Info] 2020-09-30 โ€“ "22:27:56.111Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[createLocalTracks #1]:" โ€“ "Neither audio nor video requested, so returning empty LocalTracks" (application-d875219ee6720055104e.js, line 113133)
[Info] 2020-09-30 โ€“ "22:27:56.238Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[LocalParticipant #1]:" โ€“ "Created a new Participant" (application-d875219ee6720055104e.js, line 113133)
[Info] 2020-09-30 โ€“ "22:28:00.551Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[LocalParticipant #1: PAabadcdc7fa8cedf89547a84702269659]:" โ€“ "reconnected" (application-d875219ee6720055104e.js, line 113133)
[Info] 2020-09-30 โ€“ "22:28:00.561Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[RemoteParticipant #2: PA74edbce88d597d7bf71551d3a425dbe5]:" โ€“ "Created a new Participant: User/v1/14" (application-d875219ee6720055104e.js, line 113133)
[Info] 2020-09-30 โ€“ "22:28:00.563Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[RemoteParticipant #2: PA74edbce88d597d7bf71551d3a425dbe5]:" โ€“ "Added a new AudioTrackPublication:" โ€“ "MT2394ed252a63008aaad39846eb700cb5" (application-d875219ee6720055104e.js, line 113133)
[Info] 2020-09-30 โ€“ "22:28:00.564Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[RemoteParticipant #2: PA74edbce88d597d7bf71551d3a425dbe5]:" โ€“ "Added a new VideoTrackPublication:" โ€“ "MT28d5290b24d35db6a85a6bb93c9a670e" (application-d875219ee6720055104e.js, line 113133)
[Info] 2020-09-30 โ€“ "22:28:00.564Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[Room #1: RMe5044dabb28370466fadd285c77c9011]:" โ€“ "A new RemoteParticipant connected:" โ€“ RemoteParticipant {_events: Object, _eventsCount: 1, _maxListeners: undefined, โ€ฆ} (application-d875219ee6720055104e.js, line 113133)
RemoteParticipant {_events: Object, _eventsCount: 1, _maxListeners: undefined, _audioTracks: Map, _dataTracks: Map, โ€ฆ}RemoteParticipant
[Info] 2020-09-30 โ€“ "22:28:00.570Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[Room #1: RMe5044dabb28370466fadd285c77c9011]:" โ€“ "Created a new Room:" โ€“ "WebVideoCall/v1/gin-4xo-bbu" (application-d875219ee6720055104e.js, line 113133)
[Info] 2020-09-30 โ€“ "22:28:00.571Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[connect #1]:" โ€“ "Connected to Room:" โ€“ "[Room #1: RMe5044dabb28370466fadd285c77c9011]" (application-d875219ee6720055104e.js, line 113133)
[Info] 2020-09-30 โ€“ "22:28:00.571Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[connect #1]:" โ€“ "Room name:" โ€“ "WebVideoCall/v1/gin-4xo-bbu" (application-d875219ee6720055104e.js, line 113133)
[Info] 2020-09-30 โ€“ "22:28:00.841Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[RemoteParticipant #2: PA74edbce88d597d7bf71551d3a425dbe5]:" โ€“ "Added a new AudioTrack:" โ€“ "ccc387a8-be4a-4a03-9a10-677688153a82" (application-d875219ee6720055104e.js, line 113133)
[Info] 2020-09-30 โ€“ "22:28:01.391Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[RemoteParticipant #2: PA74edbce88d597d7bf71551d3a425dbe5]:" โ€“ "Added a new VideoTrack:" โ€“ "9100a1d3-b581-42b0-b5a3-5136a4ad13ca" (application-d875219ee6720055104e.js, line 113133)

[Warning] 2020-09-30 โ€“ "22:28:17.485Z" โ€“ "|" โ€“ "WARN" โ€“ "in" โ€“ "[RemoteVideoTrack #4: MT28d5290b24d35db6a85a6bb93c9a670e]:" โ€“ "Unintentionally paused:" โ€“  (application-d875219ee6720055104e.js, line 113133)
<video autoplay playsinline></video>

<video autoplay playsinline></video>
[Warning] 2020-09-30 โ€“ "22:28:17.515Z" โ€“ "|" โ€“ "WARN" โ€“ "in" โ€“ "[RemoteAudioTrack #3: MT2394ed252a63008aaad39846eb700cb5]:" โ€“ "Unintentionally paused:" โ€“  (application-d875219ee6720055104e.js, line 113133)
<audio autoplay data-sid="MT2394ed252a63008aaad39846eb700cb5"></audio>

<audio autoplay data-sid="MT2394ed252a63008aaad39846eb700cb5"></audio>
[Warning] 2020-09-30 โ€“ "22:28:17.522Z" โ€“ "|" โ€“ "WARN" โ€“ "in" โ€“ "[LocalVideoTrack #2: a4d75508-ea4a-4dc8-a5aa-4b3146a0a9ed]:" โ€“ "Unintentionally paused:" โ€“  (application-d875219ee6720055104e.js, line 113133)
<video autoplay playsinline></video>

<video autoplay playsinline></video>
[Info] 2020-09-30 โ€“ "22:28:18.528Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[RemoteVideoTrack #4: MT28d5290b24d35db6a85a6bb93c9a670e]:" โ€“ "Playing unintentionally paused <video> element" (application-d875219ee6720055104e.js, line 113133)
[Info] 2020-09-30 โ€“ "22:28:18.573Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[RemoteVideoTrack #4: MT28d5290b24d35db6a85a6bb93c9a670e]:" โ€“ "Successfully played unintentionally paused <video> element" (application-d875219ee6720055104e.js, line 113133)
[Info] 2020-09-30 โ€“ "22:28:21.261Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[RemoteParticipant #3: PA862165f1f9924f6bd52a6185632f8db3]:" โ€“ "Created a new Participant: Voip/Unauthenticated/AdHoc/1d060be1-bd69-4929-9777-be1600d6c6ab" (application-d875219ee6720055104e.js, line 113133)
[Info] 2020-09-30 โ€“ "22:28:21.265Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[RemoteParticipant #3: PA862165f1f9924f6bd52a6185632f8db3]:" โ€“ "Added a new AudioTrackPublication:" โ€“ "MT0718b8800dc26f9099f391fb44874a27" (application-d875219ee6720055104e.js, line 113133)
[Info] 2020-09-30 โ€“ "22:28:21.266Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[Room #1: RMe5044dabb28370466fadd285c77c9011]:" โ€“ "A new RemoteParticipant connected:" โ€“ RemoteParticipant {_events: Object, _eventsCount: 1, _maxListeners: undefined, โ€ฆ} (application-d875219ee6720055104e.js, line 113133)
RemoteParticipant {_events: Object, _eventsCount: 1, _maxListeners: undefined, _audioTracks: Map, _dataTracks: Map, โ€ฆ}RemoteParticipant
[Error] Unhandled Promise Rejection: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
(anonymous function) (application-d875219ee6720055104e.js:83973)
promiseReactionJob
[Info] 2020-09-30 โ€“ "22:28:21.455Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[RemoteParticipant #3: PA862165f1f9924f6bd52a6185632f8db3]:" โ€“ "Added a new AudioTrack:" โ€“ "f437b142-05a4-4001-872d-5182433fadd1" (application-d875219ee6720055104e.js, line 113133)
[Info] 2020-09-30 โ€“ "22:28:30.594Z" โ€“ "|" โ€“ "INFO" โ€“ "in" โ€“ "[Room #1: RMe5044dabb28370466fadd285c77c9011]:" โ€“ "RemoteParticipant disconnected:" โ€“ RemoteParticipant {_events: Object, _eventsCount: 15, _maxListeners: undefined, โ€ฆ} (application-d875219ee6720055104e.js, line 113133)
RemoteParticipant {_events: Object, _eventsCount: 15, _maxListeners: undefined, _audioTracks: Map, _dataTracks: Map, โ€ฆ}RemoteParticipant

@markbrouch ,

Since you let us know that your issue was fixed in twilio-video.[email protected], I'll close this issue.

Thanks,

Manjesh Malavalli
JSDK Team

I'm still experiencing this sporadically on iOS 14.4, on SDK version 2.10.0. Getting errors like this:
image

Hello @ascpeter,

Thank you for reporting this, Can you add some details on what leads to this condition - Does it involve a video room being interrupted by a phone call or another application switch - Any details that you can provide to narrow down the repro would help a lot,

Thanks,
Makarand

@makarandp0 , I included details here: https://github.com/twilio/twilio-video.js/issues/1387

Was this page helpful?
0 / 5 - 0 ratings