getDuration method

FutureOr<int> getDuration(
  1. int effectId
)

@detail api @brief 获取音效文件时长。 @param effectId 音效 ID @return - >0: 成功, 音效文件时长,单位为毫秒。 - < 0: 失败 @note 仅在调用 start:filePath:config:{@link #ByteRTCAudioEffectPlayer#start:filePath:config} 后调用此接口。

Implementation

FutureOr<int> getDuration(int effectId) async {
  return await nativeCall('getDuration:', [effectId]);
}