supportedCodecs property

Future<List<String>> supportedCodecs

Implementation

static Future<List<String>> get supportedCodecs async {
  List<String> codecs = [
    'vp8',
    'vp9',
    'h264',
    'av1',
  ];
  if (!kIsWeb) {
    if (Platform.isAndroid) {
      List<Object?> codecsObject =
          await _channel.invokeMethod('getSupportedCodecs');
      List<String> codecs = [];
      codecs = codecsObject
          .map((codec) => (codec as String).toLowerCase())
          .toList();
      return codecs;
    }
    if (Platform.isMacOS) {
      // Not supported, needs further investigation
      codecs.remove('vp9');
    }
  }
  return codecs;
}