We have a video chat single page application developed in AngularJS that connects Callers with Receivers using OpenTok (Tokbox). Receivers must use computers but Callers can use iOS or Android devices. However, when a Caller uses iOS, the first call is fine, but the 2nd and subsequent calls in the same session result in audio being lost for the iPhone user.
The application consists of a Homepage, Profile pages, Dashboards and Call Screens. A Caller initiates a video chat with a Receiver in the following way:
Types in Receiver’s Profile page and logs in Clicks ‘Call’ from Receiver’sProfile page, lands on Call Screen & gives permission to use camera etc. Clicks ‘Call’ again and video/audio chat starts Clicks ‘End call’ and lands on their dashboard page
Then, if the Caller chooses to call Receiver again, the Caller:
Either clicks back button or retypes Receiver’s URL to return to Receiver’s profile page Clicks ‘Call’ from Receiver’s Profile page, lands on call screen Clicks ‘Call’ again and video starts - but usually (although not always) cannot hear any audio on the iPhone
After extensive testing, only 3 things happen with 100% consistency:
If, after a chat, the Caller goes to the Homepage and then returns to Profile page, the audio will never work, no matter how many times you try. If, however, the Caller types in a URL of an entirely different site, and returns to the profile page, the problem is always reset: the Caller will definitely have audio for the next call, after which the whole problem starts again. Closing and initiating a new window also resets the issue.
Aside from these certainties, there are many other variables that may or may not produce the issue (and how often), including:
What version of iOS the Caller is using Whether the Caller uses the back button or types in the URL to go from dashboard to profile page after a call Whether the Caller simply clicks the back button or holds and chooses the Profile page URL Whether the Caller clicks around in their Dashboard or not before returning to Profile page
Tokbox session logs show that both published streams contain both audio and video, and no errors are reported. The audio is lost within iOS.
We have no problems with computer to computer, or Android to computer: Only iOS.
We have attempted almost everything to solve this issue - from stripping back almost all 3rd party APIs to removing most of the AngularJS code and nothing solves this mysterious (and very annoying) problem.
Versions: Angular 1.5, Opentok: 2.16.2
Please let me know if anybody came across anything like this.