12

I'm working on a video call web application.

Every time the user is on a mobile device (iPhone or Android) and gets a phone call, the video call sound gets damage.

I've tried the tabfocus event but not every smartphone "unfocus" during a phone call. Some of them just show a pop up, for example.

document.visibilityState didn't work either.

I'm searching for a way to know about or fully block the phone call.

Thanks for the help!

MauriceNino
  • 6,214
  • 1
  • 23
  • 60

1 Answers1

1

Have you tried to listen for BaseAudioContext.onstatechange? I believe, during the call BaseAudioContext.state will be changed from running to suspended or closed.

MaxV
  • 2,601
  • 3
  • 18
  • 25