Skip to main content Link Menu Expand (external link) Document Search Copy Copied
isDecoderSupported method - FlutterSoundPlayer class - player library - Dart API
menu
isDecoderSupported

isDecoderSupported method

Future<bool> isDecoderSupported(
  1. Codec codec
)

Returns true if the specified decoder is supported by Flutter Sound on this platform


Example

        if ( await myPlayer.isDecoderSupported(Codec.aacADTS) ) doSomething;

Implementation

Future<bool> isDecoderSupported(Codec codec) async {
  var result = false;
  _logger.d('FS:---> isDecoderSupported ');
  await _waitOpen();
  if (_isInited != Initialized.fullyInitialized) {
    throw Exception('Player is not open');
  }
  result = await FlutterSoundPlayerPlatform.instance.isDecoderSupported(
    this,
    codec: codec,
  );
  _logger.d('FS:<--- isDecoderSupported ');
  return result;
}
flutter_sound 9.25.3