setEventHandler method
@detail api @brief 设置回调句柄。 @param handler 参看 IAudioEffectPlayerEventHandler{@link #IAudioEffectPlayerEventHandler}。 @return - 0: 成功。 - < 0: 失败。
Implementation
Future<int?> setEventHandler(IAudioEffectPlayerEventHandler handler) async {
$a() => ($instance as $p_a.IAudioEffectPlayer).setEventHandler(
packObject(handler, () => android_IAudioEffectPlayerEventHandler()));
$i() => ($instance as $p_i.ByteRTCAudioEffectPlayer).setEventHandler(
packObject(handler, () => ios_IAudioEffectPlayerEventHandler()));
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}