twilio / video-quickstart-ios

Twilio Video Quickstart for iOS
https://www.twilio.com/docs/api/video
MIT License
457 stars 177 forks source link

No audio when publishing started from background #580

Closed andschdk closed 3 years ago

andschdk commented 3 years ago

Description

No audio when publishing audio track while in the background. When entering the foreground still no audio is being transmitted to the remote participants. It seems to work in the quickstart project, however, it's not behaving the same way in my client application. If I unpublish + publish the audio track when entering the foreground it works.

Can you provide more info about the mechanism that ensures the audio track is "republished" when entering the foreground if publishing started from the background? That way I might be able to trace the bug.

Steps to Reproduce

I modified the Quickstart project slightly so that it does not publish audio "on connect" but instead when the remote participant connects.

  1. Connect to room
  2. Background app
  3. Remote participant did connect
  4. Start publishing audio (still in background)
  5. No audio is transmitted to the remote participant (guess this is an iOS limitation)
  6. Foreground the app
  7. Still no audio in my client application (quickstart project works fine - it starts to publish)

Video iOS SDK

3 + 4

Xcode

[e.g. 9.2]

iOS Version

14

piyushtank commented 3 years ago

@andschdk Can you check your app has the following entitlements set in plist file?

    <key>UIBackgroundModes</key>
    <array>
        <string>audio</string>
        <string>voip</string>
    </array>
piyushtank commented 3 years ago

Closing the ticket but feel free to reopen or open another ticket if you have any issues.