Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Low volume in video streaming in parallel with Twilio video on iOS 15 #1785

Closed
8 tasks done
q-kit opened this issue May 27, 2022 · 3 comments
Closed
8 tasks done

Low volume in video streaming in parallel with Twilio video on iOS 15 #1785

q-kit opened this issue May 27, 2022 · 3 comments
Assignees

Comments

@q-kit
Copy link

q-kit commented May 27, 2022

Please note that this is not the same with another iOS 15 volume issue.

In my use case, the users are presenters. They publish their video and audio, but don't receive any video/audio from the subscribers. The presenter's UI has two videos side by side, one of which is their selfie video and the other of which is an instructional video streaming from some *.mp4 hosted in cloud.

It's been a while since the first time we saw the low volume issue on iOS 15, and it still repros on the latest iOS 15.5. Recently, we noticed that the low volume issue is related to the createLocalAudioTrack function. The instructional video sounds very soft (even in full volume bar) if createLocalAudioTrack is called beforehand, while it sounds much louder if no local audio track is enabled. Could you help with investigating? Thanks!

  • 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.
  • I reviewed the Common Issues and open GitHub issues and verified that this report represents a potentially new issue.
  • I verified that the Quickstart application works in my environment.
  • I am not sharing any Personally Identifiable Information (PII)
    or sensitive account information (API keys, credentials, etc.) when reporting this issue.

Software versions:

  • Browser(s): Mobile Safari
  • Operating System: from iOS 15.0 to iOS 15.5
  • twilio-video.js: 2.21.1
  • Third-party libraries (e.g., Angular, React, etc.): vue.js, video.js (for playing the instructional video. It doesn't seem to be the cause of this issue as we can repro this issue with HTML video tag only)
@PikaJoyce
Copy link
Contributor

Hi @q-kit,

Thanks for opening this issue. Do you have any logs/room sids for us to take a look to see if anything is wrong there? Or perhaps a repro link if possible in order for us to begin our investigations?

Best,
Joyce

@q-kit
Copy link
Author

q-kit commented Jun 1, 2022

Hello @PikaJoyce ,

Thanks for your reply!

I actually don't see any error/log in the dev tool, and I don't have any specific SID. Could you give my app a try with an iOS 15 device? You would notice that the audio in the volume check step and the instructional videos that follow would have very low volume. If you try quitting and reentering the app, the volume is much louder. You can also make the volume louder by restarting the localAudioTrack in the dev tool.

Please let me know how it goes and/or more info is needed from my end. Thanks!

Q

@PikaJoyce
Copy link
Contributor

Thank you for the link @q-kit!

That was very helpful. What I noticed for iPhones was that the sound wasn't actually coming through the speaker. But it seemed to be coming out of the ear piece. However, it seems that once I leave the app and come back to it, or I lock my phone, it goes to the speaker mode and the audio is louder.

It seems that the default behavior for apple/iOS devices is to not use the speaker for video calling. I've tried to check this out on the quickstart example to select output devices but it doesn't seem like any appear. If you have headphones or anything of that sort, it will default to that but as of now, it doesn't seem like Apple devices allow for you to choose audio output devices and for it to default into the speaker.

The way we set default outputs is by using setSinkId, this is unfortunately not supported on iOS Safari so selecting your desired output would not be possible.

It however seems to be working perfectly fine with headphones or Airpods.

I did notice two things happening.

  1. Your issue only occurs when a user is being "recorded". On the top left right where the time is, there is a red light that blinks as if you are in a voice/video call. When this light is on, your audio routes to the ear piece.
  2. When backgrounding the app, the "recording" status is no longer there. This is when your audio is routed to the actual speaker.

I have some suggestions to try, since we don't have control over audio output on iOS/Safari. Perhaps the route to go is to call getUserMedia (obtaining permissions etc) AFTER testing the audio on users devices. Seeing as this happens only on the first time upon granting camera and microphone permissions.

I've also tested your app with these steps.

  1. Open app for the first time
  2. Cancel the permissions for the app to use microphone AND video.
  3. Continue
  4. Play audio

Going the above steps allows for the audio to be routed through the speaker. It seems like your issue is getting fixed by the "backgrounding" of your app (which breaks the video/audio recording) and in turn, fixes your speaker issue.

I hope this was helpful! Please let me know if there are more issues. But since there are not any actionable items from our end, I will close this issue. Do feel free to continue our conversation here and I'd be more than happy to answer :)

Thank you!
Joyce

@PikaJoyce PikaJoyce self-assigned this Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants