This topic describes the AliEngineEventListener callback and listening interfaces of the Windows SDK.

Contents

API Description Supported earliest version
OnJoinChannelResult Callback for the result of adding a channel. 2.1
OnLeaveChannelResult The callback of the result of leaving the channel. 2.1
OnRemoteUserOnLineNotify The callback that is launched by the remote user. 2.1
OnRemoteUserOffLineNotify The callback for the remote user to go offline. 2.1
OnAudioPublishStateChanged The callback for audio stream ingest changes. 2.1
OnVideoPublishStateChanged The callback for the video ingest change. 2.1
OnDualStreamPublishStateChanged Callback for minor stream ingest changes. 2.1
OnScreenSharePublishStateChanged The screen shares the callback for the stream change. 2.1
OnScreenSharePublishStateChangedWithInfo The screen shares the callback for streaming changes (for Mac or windows). 2.1
OnRemoteTrackAvailableNotify Callback when the audio and video streams of remote users change. 2.1
OnAudioSubscribeStateChanged The callback for the audio subscription change. 2.1
OnVideoSubscribeStateChanged Callback for changes to the camera stream subscription. 2.1
OnScreenShareSubscribeStateChanged Callback for changes in screen sharing stream subscription status. 2.1
OnSubscribeStreamTypeChanged The callback for the change of the size stream subscription. 2.1
OnFirstRemoteVideoFrameDrawn The callback when the first frame of the remote video stream is rendered. 2.1
OnFirstLocalVideoFrameDrawn The callback when the preview starts displaying the first frame of video. 2.1
OnFirstAudioPacketSend The callback for sending the first audio packet. 2.1
OnFirstAudioPacketReceived The callback for receiving the first audio packet. 2.1
OnFirstRemoteAudioDecoded The callback for decoding the first frame of the far-end audio. 2.1
OnFirstVideoPacketSend The callback for sending the first packet of a video. 2.1
OnFirstVideoPacketReceived The callback for receiving the first video packet. 2.1
OnFirstVideoFrameReceived Callback for receiving the first frame of the remote user's video. 2.1
OnOccurWarning Warning callback. 2.1
OnOccurError Error callback. 2.1
OnBye The callback when the server is kicked out or the channel is closed. 2.1
OnAudioDeviceStateChanged The callback for the status change of the audio device. 2.1
OnVideoDeviceStateChanged The callback for the status change of the video device. 2.1
OnConnectionLost Callback for network disconnection. 2.1
OnTryToReconnect Callback for attempting network reconnection. 2.1
OnConnectionRecovery The callback for successful network reconnection. 2.1
OnNetworkQualityChanged Callback when the network quality changes. 2.1
OnConnectionStatusChange Callback for network connection status change. 2.1
OnUserAudioMuted A notification that the peer user stops sending audio data. 2.1
OnUserVideoMuted A notification sent by the peer user to send the video black frame data. 2.1
OnUserAudioInterruptedBegin Notification of user audio being interrupted. 2.1
OnUserAudioInterruptedEnded Notification of the end of the user's audio interruption. 2.1
OnRemoteAudioAccompanyStarted The callback when the user accompaniment starts playing. 2.1
OnRemoteAudioAccompanyFinished The callback when the user accompaniment ends playing. 2.1
OnUserWillResignActive The callback when the remote user application is retreated to the background. 2.1
OnUserWillBecomeActive The callback when the remote user application returns to the foreground. 2.1
OnUpdateRoleNotify The callback when the user role changes. 2.1
OnAudioPlayingStateChanged The callback played by the accompaniment. 2.1
OnAudioEffectFinished Callback for the end of playback of the local sound effect file. 2.1
OnLastmileDetectResultWithQuality The callback for the network quality probe. 2.1
OnAudioDeviceRecordLevel The callback for the audio capture device test. 2.1
OnAudioDevicePlayoutLevel Audio playback device test callback. 2.1
OnAudioDevicePlayoutEnd The callback when the audio playback device test ends (the audio file is played). 2.1
OnStats The callback of current session statistics (triggered once in 2 seconds). 2.1
OnLocalVideoStats Local video statistics callback (triggered once in 2s). 2.1
OnRemoteVideoStats Remote video statistics callback (triggered once in 2s). 2.1
OnLocalAudioStats Local audio statistics callback (triggered once in 2s). 2.1
OnRemoteAudioStats Remote audio statistics callback (triggered once in 2s). 2.1
OnStartLiveStreamingResult The callback at the start of the low-latency interactive live mode. 2.1
OnMediaRecordEvent Recording event callback. 2.1
OnPerformanceLow The callback for insufficient performance of the current device. 2.1
OnPerformanceRecovery The callback for the performance recovery of the current device. 2.1
OnAudioVolumeCallback Callback for user volume size. 2.1
OnActiveSpeaker The current speaker of the subscription. 2.1
OnMediaExtensionMsgReceived Callback for receiving media extension information. 2.1
OnAudioRouteChanged Callback for voice route changes (applicable to iOS). 2.1
OnSnapshotComplete Screenshot callback. 2.1
OnPublishLiveStreamStateChanged The callback for the status change of the bypass ingest stream. 2.1
OnPublishTaskStateChanged The callback for the status change of the bypass task. 2.1
OnChannelRelayStateChanged The callback of the change of the status of the cross-channel wheat. 2.1
OnChannelRelayEvent The callback of the cross-channel wheat event. 2.1
OnUserVideoEnabled Disable Camera Stream collection for end users to send notifications. 2.1
OnRemoteVideoChanged Remote video stream change callback. 2.4

Details

  • OnJoinChannelResult: the callback for the result of adding a channel.
    void OnJoinChannelResult(int result, const char *channel, int elapsed);
    Parameter Type Description
    result int The result of adding a channel. 0 is returned if it is successful and an error code is returned if it fails.
    channel const char * The ID of the channel.
    elapsed int The duration of joining the channel.
  • OnLeaveChannelResult: The callback of the result of leaving the channel. This callback is returned after you call the leaveChannel operation. If you release the SDK after leaveChannel, no callback is received.
    void OnLeaveChannelResult(int result, AliEngineStats stats);
    Parameter Type Description
    result int 0 is returned if successful and error code information is returned if failed.
    stats AliEngineStats Statistics summary of the sessions in this channel.
  • OnRemoteUserOnLineNotify: the callback that is launched by the remote user.
    void OnRemoteUserOnLineNotify(const char *uid, int elapsed);
    Parameter Type Description
    uid const char * The ID of the remote user.
    elapsed int The duration when the user joins the channel.
  • OnRemoteUserOffLineNotify: the callback for remote users to go offline.
    void OnRemoteUserOffLineNotify(const char *uid, AliEngineUserOfflineReason reason);
    Parameter Type Description
    uid const char * The ID of the remote user.
    reason AliEngineUserOfflineReason The reason why the user is offline.
  • OnAudioPublishStateChanged: the callback for audio stream ingest changes.
    void OnAudioPublishStateChanged(AliEnginePublishState oldState, AliEnginePublishState newState, int elapseSinceLastState, const char *channel);
    Parameter Type Description
    oldState AliEnginePublishState The previous stream ingest status.
    newState AliEnginePublishState The current stream ingest status.
    elapseSinceLastState int The interval at which the status changes.
    channel const char * The ID of the current channel.
  • OnVideoPublishStateChanged: the callback for video stream ingest changes.
    void OnVideoPublishStateChanged(AliEnginePublishState oldState, AliEnginePublishState newState, int elapseSinceLastState, const char *channel);
    Parameter Type Description
    oldState AliEnginePublishState The previous stream ingest status.
    newState AliEnginePublishState The current stream ingest status.
    elapseSinceLastState int The interval at which the status changes.
    channel const char * The ID of the current channel.
  • OnDualStreamPublishStateChanged: callback for secondary stream ingest changes.
    void OnDualStreamPublishStateChanged(AliEnginePublishState oldState, AliEnginePublishState newState, int elapseSinceLastState, const char *channel);
    Parameter Type Description
    oldState AliEnginePublishState The previous stream ingest status.
    newState AliEnginePublishState The current stream ingest status.
    elapseSinceLastState int The interval at which the status changes.
    channel const char * The ID of the current channel.
  • OnScreenSharePublishStateChanged: The screen shares the callback for the stream change.
    void OnScreenSharePublishStateChanged(AliEnginePublishState oldState, AliEnginePublishState newState, int elapseSinceLastState, const char *channel);
    Parameter Type Description
    oldState AliEnginePublishState The previous stream ingest status.
    newState AliEnginePublishState The current stream ingest status.
    elapseSinceLastState int The interval at which the status changes.
    channel const char * The ID of the current channel.
  • OnScreenSharePublishStateChangedWithInfo: The screen shares the callback for streaming changes (for Mac or windows).
    void OnScreenSharePublishStateChangedWithInfo(AliEnginePublishState oldState, AliEnginePublishState newState, int elapseSinceLastState, const char *channel, AliEngineScreenShareInfo& screenShareInfo);
    Parameter Type Description
    oldState AliEnginePublishState The previous stream ingest status.
    newState AliEnginePublishState The current stream ingest status.
    elapseSinceLastState int The interval at which the status changes.
    channel const char * The ID of the current channel.
    screenShareInfo AliEngineScreenShareInfo& This screen shares streaming information.
  • OnRemoteTrackAvailableNotify: the callback when the audio and video streams of remote users change.
    void OnRemoteTrackAvailableNotify(const char *uid, AliEngineAudioTrack audioTrack, AliEngineVideoTrack videoTrack);
    Parameter Type Description
    uid const char * The ID of the remote user.
    audioTrack AliEngineAudioTrack The audio stream after the remote user changes.
    videoTrack AliEngineVideoTrack The video stream after the remote user changes.
  • OnAudioSubscribeStateChanged: the callback for the audio subscription change.
    void OnAudioSubscribeStateChanged(const char *uid, AliEngineSubscribeState oldState, AliEngineSubscribeState newState, int elapseSinceLastState, const char *channel);
    Parameter Type Description
    uid const char * The ID of the remote user.
    oldState AliEngineSubscribeState The previous subscription status.
    newState AliEngineSubscribeState The current subscription status.
    elapseSinceLastState int The interval at which the status changes.
    channel const char * The ID of the current channel.
  • OnVideoSubscribeStateChanged: the callback for the change of the camera stream subscription.
    void OnVideoSubscribeStateChanged(const char *uid, AliEngineSubscribeState oldState, AliEngineSubscribeState newState, int elapseSinceLastState, const char *channel);
    Parameter Type Description
    uid const char * The ID of the remote user.
    oldState AliEngineSubscribeState The previous subscription status.
    newState AliEngineSubscribeState The current subscription status.
    elapseSinceLastState int The interval at which the status changes.
    channel const char * The ID of the current channel.
  • OnScreenShareSubscribeStateChanged: Callback for changes in screen sharing stream subscription status.
    void OnScreenShareSubscribeStateChanged(const char *uid, AliEngineSubscribeState oldState, AliEngineSubscribeState newState, int elapseSinceLastState, const char *channel);
    Parameter Type Description
    uid const char * The ID of the remote user.
    oldState AliEngineSubscribeState The previous subscription status.
    newState AliEngineSubscribeState The current subscription status.
    elapseSinceLastState int The interval at which the status changes.
    channel const char * The ID of the current channel.
  • OnSubscribeStreamTypeChanged: the callback for the change of the size stream subscription.
    virtual void OnSubscribeStreamTypeChanged(const char *uid,
                                                      AliEngineVideoStreamType oldStreamType, 
                                                      AliEngineVideoStreamType newStreamType, 
                                                      int elapseSinceLastState, 
                                                      const char *channel);
    Parameter Type Description
    uid const char * The ID of the remote user.
    oldStreamType AliEngineVideoStreamType The previous subscription status.
    newStreamType AliEngineVideoStreamType The current subscription status.
    elapseSinceLastState int The interval at which the status changes.
    channel const char * The ID of the current channel.
  • OnFirstRemoteVideoFrameDrawn: the callback when the first frame of the remote video stream is rendered.
    void OnFirstRemoteVideoFrameDrawn(const char *uid, AliEngineVideoTrack videoTrack, int width, int height, int elapsed);
    Parameter Type Description
    uid const char * The ID of the remote user.
    videoTrack AliEngineVideoTrack The type of stream to render.
    width int The width of the video.
    height int The height of the video.
    elapsed int The total duration.
  • OnFirstLocalVideoFrameDrawn: The callback when the preview starts displaying the first frame of video.
    void OnFirstLocalVideoFrameDrawn(int width, int height, int elapsed);
    Parameter Type Description
    width int The width of the video.
    height int The height of the video.
    elapsed int The total duration.
  • OnFirstAudioPacketSend: the callback for sending the first audio packet.
    void OnFirstAudioPacketSend(int timeCost);
    Parameter Type Description
    timeCost int The amount of time consumed.
  • OnFirstAudioPacketReceived: the callback for receiving the first audio packet.
    void OnFirstAudioPacketReceived(const char* uid, int timeCost);
    Parameter Type Description
    uid const char * The ID of the remote user.
    timeCost int The amount of time consumed.
  • OnFirstAudioPacketReceived: the callback for decoding the first frame of the remote audio.
    void OnFirstRemoteAudioDecoded(const char* uid, int elapsed);
    Parameter Type Description
    uid const char * The ID of the remote user.
    elapsed int The amount of time consumed.
  • OnFirstVideoPacketSend: the callback for sending the first video packet.
    void OnFirstVideoPacketSend(AliEngineVideoTrack streamUrl, int timeCost);
    Parameter Type Description
    streamUrl AliEngineVideoTrack Send a video stream.
    timeCost int The amount of time consumed.
  • OnFirstVideoPacketReceived: the callback for receiving the first video packet.
    void OnFirstVideoPacketReceived(const char* uid, AliEngineVideoTrack videoTrack, int timeCost);
    Parameter Type Description
    uid const char * The ID of the remote user.
    videoTrack AliEngineVideoTrack Receive video streams.
    timeCost int The amount of time consumed.
  • OnFirstVideoFrameReceived: The callback for receiving the first frame of the remote user's video.
    void OnFirstVideoFrameReceived(const char* uid, AliEngineVideoTrack videoTrack, int timeCost);
    Parameter Type Description
    uid const char * The ID of the remote user.
    videoTrack AliEngineVideoTrack Receive video streams.
    timeCost int The amount of time consumed.
  • OnOccurWarning: a warning callback. Currently, the warning callback can be ignored and will not affect normal use.
    void OnOccurWarning(int warn, const char *msg);
    Parameter Type Description
    warn int The type of the warning.
    msg const char * Warning instructions.
  • OnOccurError: the error callback.
    void OnOccurError(int error, const char *msg);
    Parameter Type Description
    error int The type of the error that occurred.
    Note If the error parameter is set to 16908812 or 33620229, you need to release the instance, recreate the SDK instance, and then call JoinChannel to join the channel.
    msg const char * The error description.
  • OnBye: the callback when the server is kicked out or the channel is closed.
    void OnBye(int code);
    Parameter Type Description
    code int The onBye type. For more information, see AliEngineOnByeType.
  • OnAudioDeviceStateChanged: the callback for the status change of the audio device.
    void OnAudioDeviceStateChanged(const AliEngineDeviceInfo& deviceInfo, AliEngineExternalDeviceType deviceType, AliEngineExternalDeviceState deviceState);
    Parameter Type Description
    deviceInfo const AliEngineDeviceInfo& The information about the external device.
    deviceType AliEngineExternalDeviceType The type of the external device.
    deviceState AliEngineExternalDeviceState The status of the external device.
  • OnVideoDeviceStateChanged: the callback for the status change of the video device.
    void OnVideoDeviceStateChanged(const AliEngineDeviceInfo& deviceInfo, AliEngineExternalDeviceType deviceType, AliEngineExternalDeviceState deviceState);
    Parameter Type Description
    deviceInfo const AliEngineDeviceInfo& The information about the external device.
    deviceType AliEngineExternalDeviceType The type of the external device.
    deviceState AliEngineExternalDeviceState The status of the external device.
  • OnConnectionLost: the callback for network disconnection.
    void OnConnectionLost();
  • OnTryToReconnect: the callback for attempting network reconnection.
    void OnTryToReconnect();
  • OnConnectionRecovery: the callback for successful network reconnection.
    void OnConnectionRecovery();
  • OnNetworkQualityChanged: the callback when the network quality changes.
    void OnNetworkQualityChanged(const char *uid, AliEngineNetworkQuality upQuality, AliEngineNetworkQuality downQuality);
    Parameter Type Description
    uid const char * The ID of the user whose network quality has changed. If the user ID is empty, it means local, and others means remote.
    upQuality AliEngineNetworkQuality Upstream network quality.
    downQuality AliEngineNetworkQuality The downstream network quality.
  • OnConnectionStatusChange: the callback for the network connection status change.
    void OnConnectionStatusChange(int status, int reason);
    Parameter Type Description
    status int The current network link status. For more information, see AliEngineConnectionStatus.
    reason int The reason why the status of the network link changes. For more information, see AliEngineConnectionStatusChangeReason.
  • OnUserAudioMuted: the notification that the peer user stops sending audio data.
    void OnUserAudioMuted(const char* uid, bool isMute);
    Parameter Type Description
    uid const char* The user who executes muteAudio.
    isMute bool Specifies whether to mute. Valid values:
    • true: mute.
    • false: The instance is not muted.
  • OnUserVideoMuted: The peer user sends a notification sent by the video black frame data.
    void OnUserVideoMuted(const char* uid, bool isMute);
    Parameter Type Description
    uid const char* The user who executed the EnableLocalVideo.
    isMute bool Specifies whether to turn on camera stream collection. Valid values:
    • true: enables camera stream collection.
    • false: disables camera stream collection.
  • OnUserAudioInterruptedBegin: the notification that the user's audio was interrupted.
    void OnUserAudioInterruptedBegin(const char* uid);
    Parameter Type Description
    uid const char* The user whose audio was interrupted.
  • OnUserAudioInterruptedEnded: the notification that the user's audio interruption ends.
    void OnUserAudioInterruptedEnded(const char* uid);
    Parameter Type Description
    uid const char* The user whose audio interruption ends.
  • OnRemoteAudioAccompanyStarted: the callback when the user accompaniment starts to play.
    void OnRemoteAudioAccompanyStarted(const char* uid);
    Parameter Type Description
    uid const char* The ID of the user.
  • OnRemoteAudioAccompanyFinished: the callback when the user accompaniment ends.
    void OnRemoteAudioAccompanyFinished(const char* uid);
    Parameter Type Description
    uid const char* The ID of the user.
  • OnUserWillResignActive: the callback when the remote user application is retreated to the background.
    void OnUserWillResignActive(const char* uid);
    Parameter Type Description
    uid const char* The ID of the user.
  • OnUserWillBecomeActive: the callback when the remote user application returns to the foreground.
    void OnUserWillBecomeActive(const char* uid);
    Parameter Type Description
    uid const char* The ID of the user.
  • OnUpdateRoleNotify: the callback when the user role changes.
    void onUpdateRoleNotify(const AliEngineClientRole oldRole, const AliEngineClientRole newRole);
    Parameter Type Description
    oldRole AliEngineClientRole The role before the switch.
    newRole AliEngineClientRole The role after the switch.
  • OnAudioPlayingStateChanged: Callback for accompaniment playback.
    void OnAudioPlayingStateChanged(AliEngineAudioPlayingType type, AliEngineAudioPlayingErrorCode errorCode);
    Parameter Type Description
    type AliEngineAudioPlayingType The current playback status.
    errorCode AliEngineAudioPlayingErrorCode The error code returned.
  • OnAudioEffectFinished: the callback for the end of playback of the local sound effect file.
    void OnAudioEffectFinished(int soundId);
    Parameter Type Description
    soundId int The ID assigned by the user to the sound effect file.
  • OnLastmileDetectResultWithQuality: the callback for network quality detection.
    void OnLastmileDetectResultWithQuality(AliEngineNetworkQuality networkQuality);
    Parameter Type Description
    networkQuality AliEngineNetworkQuality Network quality.
  • OnAudioDeviceRecordLevel: the callback for the audio capture device test.
    void OnAudioDeviceRecordLevel(int level);
    Parameter Type Description
    level int The audio collection device volume value.
  • OnAudioDevicePlayoutLevel: the audio playback device test callback.
    void OnAudioDevicePlayoutLevel(int level);
    Parameter Type Description
    level int The audio collection device volume value.
  • OnAudioDevicePlayoutEnd: the callback when the audio playback device test ends (the audio file is played).
    void OnAudioDevicePlayoutEnd();
  • OnStats: the callback for the statistics of the current session. The callback is triggered once in 2 seconds.
    void OnStats(const AliEngineStats& stats);
    Parameter Type Description
    stats const AliEngineStats& Session statistics.
  • OnLocalVideoStats: local video statistics callback (triggered once in 2 seconds).
    void OnLocalVideoStats(const AliEngineLocalVideoStats& localVideoStats);
    Parameter Type Description
    localVideoStats const AliEngineLocalVideoStats& The statistics on local videos.
  • OnRemoteVideoStats: remote video statistics callback (triggered once in 2s).
    void OnRemoteVideoStats(const AliEngineRemoteVideoStats& remoteVideoStats);
    Parameter Type Description
    remoteVideoStats const AliEngineRemoteVideoStats& The statistics on remote videos.
  • OnLocalAudioStats: local audio statistics callback (triggered once in 2s).
    void OnLocalAudioStats(const AliEngineLocalAudioStats& localAudioStats);
    Parameter Type Description
    localAudioStats const AliEngineLocalAudioStats& The local audio statistics.
  • OnRemoteAudioStats: remote audio statistics callback (triggered once in 2s).
    void OnRemoteAudioStats(const AliEngineRemoteAudioStats& remoteAudioStats);
    Parameter Type Description
    remoteAudioStats const AliEngineRemoteAudioStats& The statistics on remote audio.
  • OnStartLiveStreamingResult: the callback when the low-latency interactive live mode starts.
    void OnStartLiveStreamingResult(int result);
    Parameter Type Description
    result int The live stream pulling result. 0 indicates that the stream is pulled successfully. Others indicate that the stream is pulled successfully.
  • OnMediaRecordEvent: the callback for recording events.
    void OnMediaRecordEvent(int event, const char* filePath);
    Parameter Type Description
    event int Record events. Valid values:
    • 0: The recording starts.
    • 1: The recording ends.
    • 2: Failed to open the file.
    • 3: Failed to write the file.
    filePath const char* The path of the recording file.
  • OnPerformanceLow: the callback for insufficient performance of the current device.
    void OnPerformanceLow();
  • OnPerformanceRecovery: the callback for the performance recovery of the current device.
    void OnPerformanceRecovery();
  • OnAudioVolumeCallback: the callback for the volume of the user.
    void OnAudioVolumeCallback(const AliEngineUserVolumeInfo* volumeInfo, int volumeInfoCount, int totalVolume);
    Parameter Type Description
    volumeInfo const AliEngineUserVolumeInfo* Speaker structure information.
    Note In the AliEngineUserVolumeInfo, a user_id value of 0 indicates the local stream ingest volume, 1 indicates the remote mixing volume, and others indicate the volume of the user.
    volumeInfoCount int The number of speakers for the callback.
    totalVolume int The total volume after mixing, in the range of [0,255]. In the callback of the local user, totalVolume is the volume after the local user mixes. In the callback of the remote user, totalVolume is the total volume after all speakers mixes.
  • OnActiveSpeaker: the current speaker of the subscription. The uid of the user who is most likely to speak in the current time period. If the returned uid is 0, the default value is the local user.
    void OnActiveSpeaker(const char *uid);
    Parameter Type Description
    uid const char * The ID of the user.
  • OnMediaExtensionMsgReceived: the callback for receiving the media extension information. If there is a user in the room sending custom data, you can use this callback to receive the data.
    void OnMediaExtensionMsgReceived(const char* uid,unsigned char* message, unsigned int size);
    Parameter Type Description
    uid const char* User uid.
    message unsigned char* The received custom data.
    size int The length of the received data.
  • OnAudioRouteChanged: callback for voice route changes (applicable to iOS).
    void OnAudioRouteChanged(const AliEngineAudioRouteType routing);
    Parameter Type Description
    routing const AliEngineAudioRouteType The voice route currently in use.
  • OnSnapshotComplete: screenshot callback.
    void OnSnapshotComplete(const char* userId, AliEngineVideoTrack trackType, void* buffer, int width, int height, bool success);
    Parameter Type Description
    userId const char* The ID of the user.
    trackType AliEngineVideoTrack Screenshot the video stream.
    buffer void* The snapshot data is returned if it succeeds. The value of this parameter is NULL.
    width int The width of the screenshot.
    height int The height of the screenshot.
    success bool Indicates whether the screenshot was successful.
  • OnPublishLiveStreamStateChanged: callback for the status change of bypass ingest.
    void OnPublishLiveStreamStateChanged(const char* streamUrl ,int state ,int errCode);
    Parameter Type Description
    streamUrl const char* The URL of the stream.
    state int The ingest status. For more information, see AliEngineTrascodingLiveStreamStatus.
    errCode int The error code. For more information, see AliEngineTrascodingLiveStreamErrorCode.
  • OnPublishTaskStateChanged: the callback for the status change of the bypass task.
    void OnPublishTaskStateChanged(const char* streamUrl, int state);
    Parameter Type Description
    streamUrl const char* The URL of the stream.
    state int The ingest status. For more information, see AliEngineTrascodingLiveStreamStatus.
  • OnChannelRelayStateChanged: callback for cross-channel status changes.
    void OnChannelRelayStateChanged(int state, int code, const char* msg);
    Parameter Type Description
    state int The current wheat-connected status. For more information, see AliEngineChannelRelayState.
    code int The current status code. For more information, see AliEngineChannelRelayErrorCode.
    msg const char* The description of the status.
  • OnChannelRelayEvent: The callback of the cross-channel wheat event.
    void OnChannelRelayEvent(int state);
    Parameter Type Description
    state int status code. For more information, see AliEngineChannelRelayEvent.
  • OnUserVideoEnabled: Disable Camera Stream collection for peer users to send notifications.
    void OnUserVideoEnabled(const char* uid, bool isEnable);
    Parameter Type Description
    uid const char* The user who executed the EnableLocalVideo.
    isEnable bool Specifies whether to disable camera stream collection. Valid values:
    • true: enables camera stream collection.
    • false: disables camera stream collection.
  • OnRemoteVideoChanged: remote video stream change callback.
    virtual void OnRemoteVideoChanged(const char* uid, AliEngineVideoTrack trackType, const AliEngineVideoState state, const AliEngineVideoReason reason);
    Parameter Type Description
    uid const char* The user to be notified.
    trackType AliEngineVideoTrack The type of the video stream.
    state const AliEngineVideoState The type of the video status.
    reason AliEngineVideoReason The reason why the trigger status changes.