opentok / opentok-ios-sdk-samples-swift

Sample applications using the OpenTok iOS SDK in Swift
https://tokbox.com/
MIT License
137 stars 65 forks source link

OPENTOK-50698: Fix issue where can't hear audio after disconnect #189

Closed iujielim closed 1 year ago

iujielim commented 1 year ago

What is this PR doing?

Fixes an issue where audio can't be hear after disconnecting from a session.

How should this be manually tested?

There are 2 ways to reproduce the bug.

1st: 1- join the video call from the custom-audio app and opentok playground (playground should hear the voice from app) 2- disconnect the session from the app 3- reconnect and republish to the session from the app 4- you will find the playground cnt hear the voice from the app anymore

2nd: 1- connect the phone to a bluetooth earphone, then join the video call from the custom-audio app, and opentok playground (playground should hear the voice from app) 2- in your phone, go to setting -> bluetooth, then turn off the bluetooth 3- in your phone, go back to the app 4- you will find the playground cnt hear the voice from the app anymore

in short, you cant hear the voice from the app once the function doRestartAudio being triggered by handleRouteChangeEvent.

iujielim commented 1 year ago

@jvalli , @sergioturgil-vonage , i don't have write access to this repo, could you help to merge the PR ?