getMusicDurationInMS method

Future<int?> getMusicDurationInMS(
  1. String path
)

Get the total duration of the background music file in milliseconds

Parameters:

path Path of the music file. If the path parameter is empty, the duration of the music file being played back will be returned.

Return: the music duration will be returned if this API is successfully called; otherwise, -1 will be returned

Implementation

Future<int?> getMusicDurationInMS(String path) async {
  var result = await _channel.invokeMethod('getMusicDurationInMS', {"path": path});
  return V2TXLiveFlutterResult.intValue(result);
}