getMediaInformation method

Future<MediaInformation> 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<MediaInformation> getMediaInformation(String path) async {
  try {
    return await _methodChannel.invokeMethod('getMediaInformation',
        {'path': path}).then((value) => new MediaInformation(value));
  } on PlatformException catch (e, stack) {
    print("Plugin getMediaInformation error: ${e.message}");
    return Future.error("getMediaInformation failed for $path.", stack);
  }
}