Skip to content

Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session #621

@numerized

Description

@numerized

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): latest
  • Cordova iOS version (e.g 5.1.0): latest
  • Plugin version (e.g 6.0.12): 6.latest
  • iOS version (e.g 10.2): 14
  • Xcode version (e.g 11.1 - 11A1027):12
  • WebRTC-adapter version (e.g. 7.4.0): latest
  • WebRTC Framework version (e.g. JSSip 3.1.2): RTCmulticonnection

Description

We are developing a webrtc communication tool + local recording with cordova-plugin-media, when we establish a connection with 2 peers and we start a recording those two peers stay on the line all works fine, we can start and stop many recordings it's all dealt very well with cordova-plugin-media and cordova-plugin-iosrtc.

Once one peer is leaving during the recording we have an issue:
[avas] AVAudioSession_iOS.mm:1149 Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session.

This stops the recording of the one that stays in the room, it shouldn't.

Steps to reproduce

Record a cordova-plugin-media on both device while in a call and make one peer disconnect while recording

Expected results

The peer that stays in the call should be kept recording

Actual results

The peer that stays on the call has his recording stopped gracefully by this "Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session."

I've checked the code and I don't see where there's any deactivating of audio session, it looks good to me:

This is where I looked:

do {
			let audioSession: AVAudioSession = AVAudioSession.sharedInstance()
			try audioSession.setCategory(
				PluginRTCAudioController.audioCategory,
				mode: PluginRTCAudioController.audioMode,
				options: PluginRTCAudioController.audioCategoryOptions
			)
		} catch {
			NSLog("PluginRTCAudioController#setCategory() | ERROR \(error)")
		};

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions