getAudioMixingDuration method

  1. @override
Future<int> getAudioMixingDuration(
  1. int taskId
)

Get duration of music file.

Parameter taskId unique identifier of task.

Returns Duration with millisecond. If fail, the duration is less than 0.

Note The duration is estimated based on the average bitrate. For some audio files with a non-constant bitrate, there may be a deviation from the actual value.

获取音频文件的总时长。

Parameter taskId 任务标识。

Returns 毫秒级总时长。如果失败,返回值小于0。

Note 总时长是根据文件平均码率估算出来的。对于某些非恒定码率的音频文件,可能与实际总时长相比存在一定偏差。

Implementation

@override
Future<int> getAudioMixingDuration(int taskId) {
  return _invokeMethod('getAudioMixingDuration', {'taskId': taskId})
      .then((value) => value);
}