-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, i'll edit
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. |
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. |
…putDevice (#933) * Implementation returns a list of audio sources,imp fun setPreferredInputDevice * format code
* 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>
调用方式
return WebRTC.invokeMethod('setPreferredInputDevice', {'deviceId': '1'});