AgoraRtcEventHandlers constructor

const AgoraRtcEventHandlers({
  1. void onJoinChannelSuccess(
    1. RtcConnection connection,
    2. int elapsed
    )?,
  2. void onRejoinChannelSuccess(
    1. RtcConnection connection,
    2. int elapsed
    )?,
  3. void onProxyConnected(
    1. String channel,
    2. int uid,
    3. ProxyType proxyType,
    4. String localProxyIp,
    5. int elapsed,
    )?,
  4. void onError(
    1. ErrorCodeType err,
    2. String msg
    )?,
  5. void onAudioQuality(
    1. RtcConnection connection,
    2. int remoteUid,
    3. QualityType quality,
    4. int delay,
    5. int lost,
    )?,
  6. void onLastmileProbeResult(
    1. LastmileProbeResult result
    )?,
  7. void onAudioVolumeIndication(
    1. RtcConnection connection,
    2. List<AudioVolumeInfo> speakers,
    3. int speakerNumber,
    4. int totalVolume,
    )?,
  8. void onLeaveChannel(
    1. RtcConnection connection,
    2. RtcStats stats
    )?,
  9. void onRtcStats(
    1. RtcConnection connection,
    2. RtcStats stats
    )?,
  10. void onAudioDeviceStateChanged(
    1. String deviceId,
    2. MediaDeviceType deviceType,
    3. MediaDeviceStateType deviceState
    )?,
  11. void onAudioMixingFinished()?,
  12. void onAudioEffectFinished(
    1. int soundId
    )?,
  13. void onVideoDeviceStateChanged(
    1. String deviceId,
    2. MediaDeviceType deviceType,
    3. MediaDeviceStateType deviceState
    )?,
  14. void onNetworkQuality(
    1. RtcConnection connection,
    2. int remoteUid,
    3. QualityType txQuality,
    4. QualityType rxQuality,
    )?,
  15. void onIntraRequestReceived(
    1. RtcConnection connection
    )?,
  16. void onUplinkNetworkInfoUpdated(
    1. UplinkNetworkInfo info
    )?,
  17. void onDownlinkNetworkInfoUpdated(
    1. DownlinkNetworkInfo info
    )?,
  18. void onLastmileQuality(
    1. QualityType quality
    )?,
  19. void onFirstLocalVideoFrame(
    1. VideoSourceType source,
    2. int width,
    3. int height,
    4. int elapsed,
    )?,
  20. void onFirstLocalVideoFramePublished(
    1. VideoSourceType source,
    2. int elapsed
    )?,
  21. void onFirstRemoteVideoDecoded(
    1. RtcConnection connection,
    2. int remoteUid,
    3. int width,
    4. int height,
    5. int elapsed,
    )?,
  22. void onVideoSizeChanged(
    1. RtcConnection connection,
    2. VideoSourceType sourceType,
    3. int uid,
    4. int width,
    5. int height,
    6. int rotation,
    )?,
  23. void onLocalVideoStateChanged(
    1. VideoSourceType source,
    2. LocalVideoStreamState state,
    3. LocalVideoStreamReason error
    )?,
  24. void onRemoteVideoStateChanged(
    1. RtcConnection connection,
    2. int remoteUid,
    3. RemoteVideoState state,
    4. RemoteVideoStateReason reason,
    5. int elapsed,
    )?,
  25. void onFirstRemoteVideoFrame(
    1. RtcConnection connection,
    2. int remoteUid,
    3. int width,
    4. int height,
    5. int elapsed,
    )?,
  26. void onUserJoined(
    1. RtcConnection connection,
    2. int remoteUid,
    3. int elapsed
    )?,
  27. void onUserOffline(
    1. RtcConnection connection,
    2. int remoteUid,
    3. UserOfflineReasonType reason
    )?,
  28. void onUserMuteAudio(
    1. RtcConnection connection,
    2. int remoteUid,
    3. bool muted
    )?,
  29. void onUserMuteVideo(
    1. RtcConnection connection,
    2. int remoteUid,
    3. bool muted
    )?,
  30. void onUserEnableVideo(
    1. RtcConnection connection,
    2. int remoteUid,
    3. bool enabled
    )?,
  31. void onUserStateChanged(
    1. RtcConnection connection,
    2. int remoteUid,
    3. int state
    )?,
  32. void onUserEnableLocalVideo(
    1. RtcConnection connection,
    2. int remoteUid,
    3. bool enabled
    )?,
  33. void onLocalAudioStats(
    1. RtcConnection connection,
    2. LocalAudioStats stats
    )?,
  34. void onRemoteAudioStats(
    1. RtcConnection connection,
    2. RemoteAudioStats stats
    )?,
  35. void onLocalVideoStats(
    1. VideoSourceType source,
    2. LocalVideoStats stats
    )?,
  36. void onRemoteVideoStats(
    1. RtcConnection connection,
    2. RemoteVideoStats stats
    )?,
  37. void onCameraReady()?,
  38. void onCameraFocusAreaChanged(
    1. int x,
    2. int y,
    3. int width,
    4. int height,
    )?,
  39. void onCameraExposureAreaChanged(
    1. int x,
    2. int y,
    3. int width,
    4. int height,
    )?,
  40. void onFacePositionChanged(
    1. int imageWidth,
    2. int imageHeight,
    3. List<Rectangle> vecRectangle,
    4. List<int> vecDistance,
    5. int numFaces,
    )?,
  41. void onVideoStopped()?,
  42. void onAudioMixingStateChanged(
    1. AudioMixingStateType state,
    2. AudioMixingReasonType reason
    )?,
  43. void onRhythmPlayerStateChanged(
    1. RhythmPlayerStateType state,
    2. RhythmPlayerReason errorCode
    )?,
  44. void onConnectionLost(
    1. RtcConnection connection
    )?,
  45. void onConnectionInterrupted(
    1. RtcConnection connection
    )?,
  46. void onConnectionBanned(
    1. RtcConnection connection
    )?,
  47. void onStreamMessage(
    1. RtcConnection connection,
    2. int remoteUid,
    3. int streamId,
    4. Uint8List data,
    5. int length,
    6. int sentTs,
    )?,
  48. void onStreamMessageError(
    1. RtcConnection connection,
    2. int remoteUid,
    3. int streamId,
    4. ErrorCodeType code,
    5. int missed,
    6. int cached,
    )?,
  49. void onRequestToken(
    1. RtcConnection connection
    )?,
  50. void onTokenPrivilegeWillExpire(
    1. RtcConnection connection,
    2. String token
    )?,
  51. void onFirstLocalAudioFramePublished(
    1. RtcConnection connection,
    2. int elapsed
    )?,
  52. void onFirstRemoteAudioFrame(
    1. RtcConnection connection,
    2. int userId,
    3. int elapsed
    )?,
  53. void onFirstRemoteAudioDecoded(
    1. RtcConnection connection,
    2. int uid,
    3. int elapsed
    )?,
  54. void onLocalAudioStateChanged(
    1. RtcConnection connection,
    2. LocalAudioStreamState state,
    3. LocalAudioStreamReason error
    )?,
  55. void onRemoteAudioStateChanged(
    1. RtcConnection connection,
    2. int remoteUid,
    3. RemoteAudioState state,
    4. RemoteAudioStateReason reason,
    5. int elapsed,
    )?,
  56. void onActiveSpeaker(
    1. RtcConnection connection,
    2. int uid
    )?,
  57. void onContentInspectResult(
    1. ContentInspectResult result
    )?,
  58. void onSnapshotTaken(
    1. RtcConnection connection,
    2. int uid,
    3. String filePath,
    4. int width,
    5. int height,
    6. int errCode,
    )?,
  59. void onClientRoleChanged(
    1. RtcConnection connection,
    2. ClientRoleType oldRole,
    3. ClientRoleType newRole,
    4. ClientRoleOptions newRoleOptions,
    )?,
  60. void onClientRoleChangeFailed(
    1. RtcConnection connection,
    2. ClientRoleChangeFailedReason reason,
    3. ClientRoleType currentRole
    )?,
  61. void onAudioDeviceVolumeChanged(
    1. MediaDeviceType deviceType,
    2. int volume,
    3. bool muted
    )?,
  62. void onRtmpStreamingStateChanged(
    1. String url,
    2. RtmpStreamPublishState state,
    3. RtmpStreamPublishReason errCode
    )?,
  63. void onRtmpStreamingEvent(
    1. String url,
    2. RtmpStreamingEvent eventCode
    )?,
  64. void onTranscodingUpdated()?,
  65. void onAudioRoutingChanged(
    1. int routing
    )?,
  66. void onChannelMediaRelayStateChanged(
    1. ChannelMediaRelayState state,
    2. ChannelMediaRelayError code
    )?,
  67. void onLocalPublishFallbackToAudioOnly(
    1. bool isFallbackOrRecover
    )?,
  68. void onRemoteSubscribeFallbackToAudioOnly(
    1. int uid,
    2. bool isFallbackOrRecover
    )?,
  69. void onRemoteAudioTransportStats(
    1. RtcConnection connection,
    2. int remoteUid,
    3. int delay,
    4. int lost,
    5. int rxKBitRate,
    )?,
  70. void onRemoteVideoTransportStats(
    1. RtcConnection connection,
    2. int remoteUid,
    3. int delay,
    4. int lost,
    5. int rxKBitRate,
    )?,
  71. void onConnectionStateChanged(
    1. RtcConnection connection,
    2. ConnectionStateType state,
    3. ConnectionChangedReasonType reason
    )?,
  72. void onWlAccMessage(
    1. RtcConnection connection,
    2. WlaccMessageReason reason,
    3. WlaccSuggestAction action,
    4. String wlAccMsg,
    )?,
  73. void onWlAccStats(
    1. RtcConnection connection,
    2. WlAccStats currentStats,
    3. WlAccStats averageStats
    )?,
  74. void onNetworkTypeChanged(
    1. RtcConnection connection,
    2. NetworkType type
    )?,
  75. void onEncryptionError(
    1. RtcConnection connection,
    2. EncryptionErrorType errorType
    )?,
  76. void onPermissionError(
    1. PermissionType permissionType
    )?,
  77. void onLocalUserRegistered(
    1. int uid,
    2. String userAccount
    )?,
  78. void onUserInfoUpdated(
    1. int uid,
    2. UserInfo info
    )?,
  79. void onUploadLogResult(
    1. RtcConnection connection,
    2. String requestId,
    3. bool success,
    4. UploadErrorReason reason,
    )?,
  80. void onAudioSubscribeStateChanged(
    1. String channel,
    2. int uid,
    3. StreamSubscribeState oldState,
    4. StreamSubscribeState newState,
    5. int elapseSinceLastState,
    )?,
  81. void onVideoSubscribeStateChanged(
    1. String channel,
    2. int uid,
    3. StreamSubscribeState oldState,
    4. StreamSubscribeState newState,
    5. int elapseSinceLastState,
    )?,
  82. void onAudioPublishStateChanged(
    1. String channel,
    2. StreamPublishState oldState,
    3. StreamPublishState newState,
    4. int elapseSinceLastState,
    )?,
  83. void onVideoPublishStateChanged(
    1. VideoSourceType source,
    2. String channel,
    3. StreamPublishState oldState,
    4. StreamPublishState newState,
    5. int elapseSinceLastState,
    )?,
  84. void onExtensionEvent(
    1. String provider,
    2. String extension,
    3. String key,
    4. String value,
    )?,
  85. void onExtensionStarted(
    1. String provider,
    2. String extension
    )?,
  86. void onExtensionStopped(
    1. String provider,
    2. String extension
    )?,
  87. void onExtensionError(
    1. String provider,
    2. String extension,
    3. int error,
    4. String message,
    )?,
  88. void onUserAccountUpdated(
    1. RtcConnection connection,
    2. int remoteUid,
    3. String userAccount
    )?,
})

Implementation

const AgoraRtcEventHandlers({
  this.onJoinChannelSuccess,
  this.onRejoinChannelSuccess,
  this.onProxyConnected,
  this.onError,
  this.onAudioQuality,
  this.onLastmileProbeResult,
  this.onAudioVolumeIndication,
  this.onLeaveChannel,
  this.onRtcStats,
  this.onAudioDeviceStateChanged,
  this.onAudioMixingFinished,
  this.onAudioEffectFinished,
  this.onVideoDeviceStateChanged,
  this.onNetworkQuality,
  this.onIntraRequestReceived,
  this.onUplinkNetworkInfoUpdated,
  this.onDownlinkNetworkInfoUpdated,
  this.onLastmileQuality,
  this.onFirstLocalVideoFrame,
  this.onFirstLocalVideoFramePublished,
  this.onFirstRemoteVideoDecoded,
  this.onVideoSizeChanged,
  this.onLocalVideoStateChanged,
  this.onRemoteVideoStateChanged,
  this.onFirstRemoteVideoFrame,
  this.onUserJoined,
  this.onUserOffline,
  this.onUserMuteAudio,
  this.onUserMuteVideo,
  this.onUserEnableVideo,
  this.onUserStateChanged,
  this.onUserEnableLocalVideo,
  this.onLocalAudioStats,
  this.onRemoteAudioStats,
  this.onLocalVideoStats,
  this.onRemoteVideoStats,
  this.onCameraReady,
  this.onCameraFocusAreaChanged,
  this.onCameraExposureAreaChanged,
  this.onFacePositionChanged,
  this.onVideoStopped,
  this.onAudioMixingStateChanged,
  this.onRhythmPlayerStateChanged,
  this.onConnectionLost,
  this.onConnectionInterrupted,
  this.onConnectionBanned,
  this.onStreamMessage,
  this.onStreamMessageError,
  this.onRequestToken,
  this.onTokenPrivilegeWillExpire,
  this.onFirstLocalAudioFramePublished,
  this.onFirstRemoteAudioFrame,
  this.onFirstRemoteAudioDecoded,
  this.onLocalAudioStateChanged,
  this.onRemoteAudioStateChanged,
  this.onActiveSpeaker,
  this.onContentInspectResult,
  this.onSnapshotTaken,
  this.onClientRoleChanged,
  this.onClientRoleChangeFailed,
  this.onAudioDeviceVolumeChanged,
  this.onRtmpStreamingStateChanged,
  this.onRtmpStreamingEvent,
  this.onTranscodingUpdated,
  this.onAudioRoutingChanged,
  this.onChannelMediaRelayStateChanged,
  this.onLocalPublishFallbackToAudioOnly,
  this.onRemoteSubscribeFallbackToAudioOnly,
  this.onRemoteAudioTransportStats,
  this.onRemoteVideoTransportStats,
  this.onConnectionStateChanged,
  this.onWlAccMessage,
  this.onWlAccStats,
  this.onNetworkTypeChanged,
  this.onEncryptionError,
  this.onPermissionError,
  this.onLocalUserRegistered,
  this.onUserInfoUpdated,
  this.onUploadLogResult,
  this.onAudioSubscribeStateChanged,
  this.onVideoSubscribeStateChanged,
  this.onAudioPublishStateChanged,
  this.onVideoPublishStateChanged,
  this.onExtensionEvent,
  this.onExtensionStarted,
  this.onExtensionStopped,
  this.onExtensionError,
  this.onUserAccountUpdated,
});