getEffectCurrentPosition method

  1. @override
Future<int?> getEffectCurrentPosition(
  1. int soundId
)

Gets the playback postion of the audio effect file.

Since v3.4.2

Note Call this method after RtcEngine.playEffect.

Parameter soundId Audio effect ID. Ensure that this parameter is set to the same value as in playEffect.

Returns

  • The playback position (ms) of the specified audio effect file, if this method call succeeds.
  • Error code, if this method call fails.
    • -22(ERR_RESOURCE_LIMITED): Cannot find the audio effect file. Please set a valid soundId.

Implementation

@override
Future<int?> getEffectCurrentPosition(int soundId) {
  return _invokeMethod('getEffectCurrentPosition', {
    'soundId': soundId,
  });
}