cordova-plugin-iosrtc: 7.0.0-RC4 Does not restore audio device, always speaker

Please read first!

Please use Public Google Group (mailing list) for general technical discussions and questions.

  • I have used Google with the error message or bug in association with the library and Cordova words to make sure the issue I’m reporting is only related to iOSRTC.
  • I have provided steps to reproduce (e.g. sample code or updated extra/renderer-and-libwebrtc-tests.js file).
  • I have provided third party library name and version, ios, Xcode and plugin version and adapter.js version if used.

Note: If the checkboxes above are not checked (which you do after the issue is posted), the issue will be closed, removing this checkbox will result in automatic closed issue.

Versions affected

  • Cordova version (e.g 7.1.0): 9.0.0
  • Plugin version (e.g 6.0.12): 8.0.0RC1
  • iOS version (e.g 10.2): 13.6
  • Xcode version (e.g 11.1 - 11A1027): 11.6
  • WebRTC-adapter version (e.g. 7.4.0):
  • WebRTC Framework version (e.g. JSSip 3.1.2): JSSip 3.5

Description

iOS audio device always left on speaker after session

Steps to reproduce

Expected results

Actual results

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

I tested 7.0.0-RC4 and the same result. I then added cordova-plugin-nativeaudio just to see if I could hack around the issue.

What happens is on initial app startup, the volume is low (ambient) and then at the end of the first ios-rtc call the volume is unpredictable based on what happened before the first ios-rtc call.

For example, if I play a nativeaudio loop, it plays at non-ambient (normal) sound levels. Then, after the first call, all audio (including the loop) are back to ambient (low volume).

If I create an AudioContext and say generate some sounds, on app launch it’s ambient. After the first ios-rtc call, it’s now normal.

On 6.0.13 I can overcome this by simply playing a silent mp3 file on app launch, seems to work. But 6.0.13 has the ontrack() bug, so I have to use the later versions.

Is it possible to just disable all audio control in ios-rtc, at least as an option, so we can simply set the state elsewhere and not let ios-rtc manipulate that state?

Anyway, hope this helps 😃