fix: register ADM observer after the peer connection factory is created (iOS)#13
Draft
SERDUN wants to merge 1 commit into
Draft
fix: register ADM observer after the peer connection factory is created (iOS)#13SERDUN wants to merge 1 commit into
SERDUN wants to merge 1 commit into
Conversation
…ed (iOS) The observer was assigned in the plugin init, but _peerConnectionFactory is created lazily in initialize:, so the assignment ran on nil and was a silent no-op - no ADM callback (device updates via audioDeviceModuleDidUpdateDevices, engine lifecycle) was ever delivered. The observer is now set right after the factory is created. The full RTCAudioDeviceModuleDelegate protocol is implemented with no-op stubs for the engine-lifecycle methods: the ADM invokes every method without respondsToSelector checks (all are required), so a partial adoption would crash once the observer is live.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
The audio device module observer was assigned in the plugin init, but
_peerConnectionFactoryis created lazily ininitialize:, so the assignment ran on nil and was a silent no-op. As a result no ADM callback was ever delivered - including the pre-existingaudioDeviceModuleDidUpdateDevices:(device-change events posted to Dart asonDeviceChange). The observer is now set right after the factory is created.The full
RTCAudioDeviceModuleDelegateprotocol is implemented with no-op stubs for the engine-lifecycle methods: the ADM invokes every method withoutrespondsToSelector:checks (all methods are required in the header), so a partial adoption would crash with unrecognized selector once the observer is live.No functional change beyond restoring the device-change events.
Testing
clang -fsyntax-onlyclean.