setEventHandler method
@detail api @brief Set the event handler. @param handler See IAudioEffectPlayerEventHandler{@link #IAudioEffectPlayerEventHandler}. @return - 0: Success. - < 0: Failed.
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}');
}
}