mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-13 04:41:30 +03:00
refact: seperate audio device for voice call (#8703)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -500,7 +500,7 @@ class _GeneralState extends State<_General> {
|
||||
return const Offstage();
|
||||
}
|
||||
|
||||
return AudioInput(builder: (devices, currentDevice, setDevice) {
|
||||
builder(devices, currentDevice, setDevice) {
|
||||
return _Card(title: 'Audio Input Device', children: [
|
||||
...devices.map((device) => _Radio<String>(context,
|
||||
value: device,
|
||||
@@ -511,7 +511,9 @@ class _GeneralState extends State<_General> {
|
||||
setState(() {});
|
||||
}))
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
||||
return AudioInput(builder: builder, isCm: false, isVoiceCall: false);
|
||||
}
|
||||
|
||||
Widget record(BuildContext context) {
|
||||
|
||||
@@ -732,7 +732,7 @@ class _CmControlPanel extends StatelessWidget {
|
||||
child: buildButton(context,
|
||||
color: MyTheme.accent,
|
||||
onClick: null, onTapDown: (details) async {
|
||||
final devicesInfo = await AudioInput.getDevicesInfo();
|
||||
final devicesInfo = await AudioInput.getDevicesInfo(true, true);
|
||||
List<String> devices = devicesInfo['devices'] as List<String>;
|
||||
if (devices.isEmpty) {
|
||||
msgBox(
|
||||
@@ -758,13 +758,13 @@ class _CmControlPanel extends StatelessWidget {
|
||||
value: d,
|
||||
height: 18,
|
||||
padding: EdgeInsets.zero,
|
||||
onTap: () => AudioInput.setDevice(d),
|
||||
onTap: () => AudioInput.setDevice(d, true, true),
|
||||
child: IgnorePointer(
|
||||
child: RadioMenuButton(
|
||||
value: d,
|
||||
groupValue: currentDevice,
|
||||
onChanged: (v) {
|
||||
if (v != null) AudioInput.setDevice(v);
|
||||
if (v != null) AudioInput.setDevice(v, true, true);
|
||||
},
|
||||
child: Container(
|
||||
child: Text(
|
||||
|
||||
Reference in New Issue
Block a user