onStreamSubscribed method
@detail callback @author shenpengliang @brief Callback on subscription status of media streams @param stateCode Subscription status of media streams, see SubscribeState{@link #SubscribeState}. @param userId The ID of the user who published the stream. @param info Configurations of stream subscription, see SubscribeConfig{@link #SubscribeConfig}. @note Local users will receive this callback: After calling subscribeStreamVideo{@link #RTCRoom#subscribeStreamVideo} to change the subscription status of remote media streams captured by camera/microphone.
Implementation
FutureOr<void> onStreamSubscribed(
dynamic stateCode, dynamic userId, dynamic info) async {
if ($instance == null || $instance is! IRTCRoomEventHandler) {
return;
}
return ($instance as IRTCRoomEventHandler).onStreamSubscribed?.call(
t_SubscribeState.android_to_code($p_a.SubscribeState.values
.firstWhere((t) => t.$value == stateCode || t.name == stateCode)),
userId.toString(),
packObject(
info,
() => SubscribeConfig.fromMap(SubscribeConfig.deepPackedMapValues(
SubscribeConfig.mapMemberToConstructorParams(info)))));
}