getMediaInformation method

Future<FlutterSoundMediaInformation> getMediaInformation(
  1. String path
)

Returns media information for the given path.

This method does not support executing multiple concurrent operations. If you execute multiple operations (execute or getMediaInformation) at the same time, the response of this method is not predictable.

Implementation

Future<FlutterSoundMediaInformation> getMediaInformation(String path) async {
  try {
    var r = await _methodChannel
        .invokeMethod('getMediaInformation', {'path': path});
    return FlutterSoundMediaInformation(r);
  } on PlatformException catch (e, stack) {
    logger.e('Plugin getMediaInformation error: ${e.message}');
    return Future.error('getMediaInformation failed for $path.', stack);
  }
}