mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 11:06:57 +00:00
@@ -280,15 +280,18 @@ Future<List<TRadioMenu<String>>> toolbarCodec(
|
||||
try {
|
||||
final Map codecsJson = jsonDecode(alternativeCodecs);
|
||||
final vp8 = codecsJson['vp8'] ?? false;
|
||||
final av1 = codecsJson['av1'] ?? false;
|
||||
final h264 = codecsJson['h264'] ?? false;
|
||||
final h265 = codecsJson['h265'] ?? false;
|
||||
codecs.add(vp8);
|
||||
codecs.add(av1);
|
||||
codecs.add(h264);
|
||||
codecs.add(h265);
|
||||
} catch (e) {
|
||||
debugPrint("Show Codec Preference err=$e");
|
||||
}
|
||||
final visible = codecs.length == 3 && (codecs[0] || codecs[1] || codecs[2]);
|
||||
final visible =
|
||||
codecs.length == 4 && (codecs[0] || codecs[1] || codecs[2] || codecs[3]);
|
||||
if (!visible) return [];
|
||||
onChanged(String? value) async {
|
||||
if (value == null) return;
|
||||
@@ -307,10 +310,11 @@ Future<List<TRadioMenu<String>>> toolbarCodec(
|
||||
|
||||
return [
|
||||
radio('Auto', 'auto', true),
|
||||
if (isDesktop || codecs[0]) radio('VP8', 'vp8', codecs[0]),
|
||||
if (codecs[0]) radio('VP8', 'vp8', codecs[0]),
|
||||
radio('VP9', 'vp9', true),
|
||||
if (isDesktop || codecs[1]) radio('H264', 'h264', codecs[1]),
|
||||
if (isDesktop || codecs[2]) radio('H265', 'h265', codecs[2]),
|
||||
if (codecs[1]) radio('AV1', 'av1', codecs[1]),
|
||||
if (codecs[2]) radio('H264', 'h264', codecs[2]),
|
||||
if (codecs[3]) radio('H265', 'h265', codecs[3]),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user