8000 Implementation returns a list of audio sources,imp fun setPreferredInputDevice by zjzhang-cn · Pull Request #933 · flutter-webrtc/flutter-webrtc · GitHub
[go: up one dir, main page]

Skip to content

Implementation returns a list of audio sources,imp fun setPreferredInputDevice #933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 19, 2022

Conversation

zjzhang-cn
Copy link
Contributor

调用方式
return WebRTC.invokeMethod('setPreferredInputDevice', {'deviceId': '1'});

}
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just mention that you add an odd new line to all added blocks. What is the point?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you tell me which line it is, the purpose of this function is to try to set the priority audio source, so that you can choose to specify the audio device as audio input, such as bluetooth, built-in MIC, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function needs to add an interface method at the Flutter level to call it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I understand the intent of this function. My current comment is completely about code formatting - the in lines 1077, 683 & 1158 you just add spare new lines.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, i'll edit

@ycherniavskyi
Copy link
Member

Do I understand it correct that this PR is in progress? Because it only add Android functionality - no iOS one and event no dart interface method.

@zjzhang-cn
Copy link
Contributor Author

It is only implemented in Android, because it is possible to have multiple audio input devices on Android, such as USB MIC, build-in MIC, OTG device, etc. Regarding not being implemented in Dart, the reason is that there is no corresponding interface required in dart-webrtc project. For testing, it can be specified directly by initializing the pc.

@cloudwebrtc cloudwebrtc merged commit ef81095 into flutter-webrtc:main Aug 19, 2022
cloudwebrtc pushed a commit that referenced this pull request Aug 19, 2022
…putDevice (#933)

* Implementation returns a list of audio sources,imp fun setPreferredInputDevice

* format code
cloudwebrtc added a commit that referenced this pull request Aug 22, 2022
* chore: Add selectAudioOutput method.

* cleanup.

* update.

* bump version.

* feat: selectAudioOutput support for macOS.

* Android audio outputs and audio selection

* chore: code format.

* chore: update loopback sample.

* update webrtc-interface.

* Fix compilation errors for iOS.

* Audio device enumeration for iOS.

* Add mediaDeviceEvent for MediaDeviceNative.

* feat: Implemented ondevicechang events for windows.

* chore: feat: Implemented ondevicechange events for Android.

* Tidy up the code.

* feat: Implemented ondevicechange events for macOS.

* chore: Use the unified Events channel to transmit the ondevicechange event.

* chore: Use the unified Events channel to transmit the ondevicechange event (win).

* Remove unused import.

* feat: Implemented ondevicechange events for iOS.

* Replace AVAudioSession with RTCAudioSession.

* Add setPreferredInput/setPreferredOutput.

* Implementation returns a list of audio sources,imp fun setPreferredInputDevice (#933)

* Implementation returns a list of audio sources,imp fun setPreferredInputDevice

* format code

* update.

* Add SetPreferredInput for win.

* update.

* update.

* fix compile error for mac.

Co-authored-by: davidliu <davidliu@deviange.net>
Co-authored-by: 代码人生 <zjzhang@126.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0