Callbacks and listeners

Updated at:

This topic describes the callbacks and listeners of the Ohos software development kit (SDK).

Contents

DingRtcEventListener: Callbacks and listeners

API

Description

Minimum supported version

onJoinChannelResult

Callback for joining a channel.

3.0

onLeaveChannelResult

Callback for leaving a channel.

3.0

onChannelRemainingTimeNotify

Callback for the remaining duration of a channel.

3.0

onAudioPublishStateChanged

Callback for a change in the audio stream ingest state.

3.0

onVideoPublishStateChanged

Callback for a change in the video stream ingest state.

3.0

onScreenSharePublishStateChanged

Callback for a change in the screen sharing stream ingest state.

3.0

onAudioSubscribeStateChanged

Callback for a change in the audio subscription state.

3.0

onVideoSubscribeStateChanged

Callback for a change in the camera stream subscription state.

3.0

onSubscribeStreamTypeChanged

Callback for a change in the subscription state of large and small streams.

3.0

onScreenShareSubscribeStateChanged

Callback for a change in the screen sharing stream subscription state.

3.0

onNetworkQualityChanged

Message sent when the network quality changes.

3.0

onOccurWarning

Warning notification.

3.0

onOccurError

Error notification.

3.0

onConnectionStatusChanged

The network connection state changes.

3.0

onRemoteUserOnLineNotify

Callback for a remote user joining a channel in communication mode.

3.0

onRemoteUserOffLineNotify

Callback for a remote user leaving a channel in communication mode.

3.0

onRemoteTrackAvailableNotify

Callback for a change in the audio and video streams of a remote user.

3.0

onFirstRemoteVideoFrameDrawn

This message is triggered when the first video frame of a remote user is displayed.

3.0

onRenderRemoteVideoSizeChanged

This callback is triggered when the video renderer detects a change in the resolution of a remote video.

3.2.1

onRenderLocalVideoSizeChanged

This callback is triggered when the video renderer detects a change in the resolution of the local video.

3.2.1

onFirstLocalVideoFrameDrawn

This message is triggered when the preview starts to display the first video frame.

3.0

onFirstVideoFrameReceived

Callback for receiving the first video frame from a remote user.

3.0

onFirstVideoPacketSend

Callback for sending the first video packet.

3.0

onFirstAudioPacketSend

Callback for sending the first audio packet.

3.0

onFirstVideoPacketReceived

Callback for receiving the first video packet.

3.0

onFirstAudioPacketReceived

Callback for receiving the first audio packet.

3.0

onBye

Message that you were removed from the channel by the server or the session ended.

3.0

onStats

Real-time data callback, triggered every 2 seconds.

3.0

onUserAudioMuted

Callback for a remote user muting or unmuting audio.

3.0

onUserVideoMuted

Notification that a remote user paused or resumed sending their video stream.

3.0

onUserVideoEnabled

Notification that a remote user stopped camera stream capture.

3.5

onUserWillResignActive

A remote user's application moves to the background.

3.5

onUserWillBecomeActive

A remote user's application returns to the foreground.

3.5

onLocalVideoStats

Data statistics for the published video stream.

3.0

onRemoteVideoStats

Data statistics for the subscribed video stream.

3.0

onRemoteAudioStats

Data statistics for the subscribed remote audio stream.

3.0

onLocalAudioStats

You can subscribe to the local audio stream.

3.0

onAudioVolumeIndication

Callback for remote user volume levels.

3.0

onRecordingDeviceAudioLevel

Callback for capture volume level.

3.0

onPlayoutDeviceAudioLevel

Callback for playback volume level.

3.0

onAudioDeviceStateChanged

The state of the local audio device changes.

3.4.1

onVideoDeviceStateChanged

The state of the local video device changes.

3.4.1

onRenderRemoteVideoSizeChanged

Notification of a change in a remote user's video resolution.

3.0

Methods

  • Parameters

    • deviceId: string

      The device ID.

    • deviceType: DingRtcConstants.RtcEngineDeviceType

      The device type.

    • deviceState: number

      The device state.

    Returns 

    void

    Ingroup

    • OHOS_DingRtcCallbackEventListener

    Since

    • 3.0

    Brief

    • The state of the local audio device has changed.

    • Parameters

      • oldState: DingRtcConstants.RtcEnginePublishState

        The previous stream ingest state.

      • newState: DingRtcConstants.RtcEnginePublishState

        The current stream ingest state.

      • elapseSinceLastState: number

        The time interval between state changes, in milliseconds.

      • channel: string

        The current channel ID.

      Returns 

      void

      Ingroup

      • OHOS_DingRtcCallbackEventListener

      Since

      • 3.0

      Brief

      • This callback is triggered when the audio stream ingest state changes.

      • Parameters

        • audioRouteType: DingRtcConstants.RtcEngineAudioRouteType

        Returns 

        void

        Brief

        • This callback is triggered when the audio route changes.

        Details

        • The audio route specifies whether sound is played from the phone's speaker or earpiece. A change in the audio route means the sound output location has changed.

          • When the audio route is the earpiece, the sound is quieter and requires you to hold the phone to your ear to hear clearly. This route provides better privacy and is suitable for phone calls.

          • When the audio route is the speaker, the sound is louder and can be heard without holding the phone close to your ear. This route enables a hands-free feature.

        • Parameters

          • uid: string

            The user ID. This is a unique identifier assigned by the application server.

          • oldState: DingRtcConstants.RtcEngineSubscribeState

            The previous subscription state.

          • newState: DingRtcConstants.RtcEngineSubscribeState

            The current subscription state.

          • elapseSinceLastState: number

            The time interval between the two state changes, in milliseconds.

          • channel: string

            The current channel ID.

          Returns 

          void

          Ingroup

          • OHOS_DingRtcCallbackEventListener

          Since

          • 3.0

          Brief

          • This callback is triggered when the audio subscription state changes.

          • TypeParameters

            • DingRtcConstants.RtcAudioVolumeInfo

            Parameters

            • speakers: Array<DingRtcConstants.RtcAudioVolumeInfo>

              If `speakers` is empty, it indicates that no remote users are sending streams or that there are no remote users in the channel. A `uid` of "0" indicates the local user.

            • speakerNumber: number

              The number of users.

            Returns 

            void

            Since

            • 3.0

            Brief

            • This callback reports the volume levels of users.

            • Parameters

              • code: DingRtcConstants.RtcEngineOnByeType

                .

              Returns 

              void

              Ingroup

              • OHOS_DingRtcCallbackEventListener

              Since

              • 3.0

              Brief

              • The server kicked you from the channel.

              • Parameters

                • remainingTimeInSec: number

                  The remaining duration of the channel, in seconds.

                Returns 

                void

                Ingroup

                • OHOS_DingRtcCallbackEventListener

                Since

                • 3.0

                Brief

                • This callback reports the remaining duration of a channel.

                • Parameters

                  • status: DingRtcConstants.RtcEngineConnectionStatus

                    The current network connection state.

                  • reason: DingRtcConstants.RtcEngineConnectionStatusChangeReason

                    The reason for the change in the network connection state.

                  Returns 

                  void

                  Ingroup

                  • OHOS_DingRtcCallbackEventListener

                  Since

                  • 3.0

                  Brief

                  • This callback is triggered when the network connection state changes.

                  • Parameters

                    • uid: string

                      The remote user ID. This is a unique identifier assigned by the application server.

                    • timeCost: number

                      The time elapsed, in milliseconds, from joining the session until the first audio packet is received.

                    Returns 

                    void

                    Ingroup

                    • OHOS_DingRtcCallbackEventListener

                    Since

                    • 3.0

                    Brief

                    • This callback is triggered when the first audio packet from a remote user is received.

                    Details

                    • This callback is triggered when the first audio data packet from a remote user is received.

                    • Parameters

                      • timeCost: number

                        The time elapsed, in milliseconds, from joining the session until the first audio packet is sent.

                      Returns 

                      void

                      Ingroup

                      • OHOS_DingRtcCallbackEventListener

                      Since

                      • 3.0

                      Brief

                      • This callback is triggered when the first local audio packet is sent.

                      Details

                      • This callback is triggered when the first local audio data packet is sent.

                      • Parameters

                        • width: number

                          The width of the local preview video.

                        • height: number

                          The height of the local preview video.

                        • elapsed: number

                          The total time elapsed, in milliseconds, from when the local user joined the channel until this callback is triggered.

                        Returns 

                        void

                        Ingroup

                        • OHOS_DingRtcCallbackEventListener

                        Since

                        • 3.0

                        Brief

                        • This callback is triggered when the first frame of the local video is rendered.

                        Note

                        • This callback is triggered when the first frame of the local video is rendered.

                        • Parameters

                          • uid: string

                            The user ID.

                          • videoTrack: DingRtcConstants.RtcEngineVideoTrack

                            .

                          • width: number

                            The video width.

                          • height: number

                            The video height.

                          • elapsed: number

                            The total time elapsed, in milliseconds, from when the local user joined the channel until this callback is triggered.

                          Returns 

                          void

                          Ingroup

                          • OHOS_DingRtcCallbackEventListener

                          Since

                          • 3.0

                          Brief

                          • This callback is triggered when the first frame of a remote user's video is rendered.

                          Note

                          • This callback is triggered when the first frame of a remote user's video is rendered.

                          • Parameters

                            • uid: string

                              The user ID. This is a unique identifier assigned by the application server.

                            • videoTrack: DingRtcConstants.RtcEngineVideoTrack

                              The received video track.

                            • timeCost: number

                              Duration (ms).

                            Returns 

                            void

                            Ingroup

                            • OHOS_DingRtcCallbackEventListener

                            Since

                            • 3.0

                            Brief

                            • This callback is triggered when the first video frame from a remote user is received.

                            Note

                            • This callback is triggered when the first video frame from a remote user is received.

                            • Parameters

                              • uid: string

                                The user ID. This is a unique identifier assigned by the application server.

                              • videoTrack: DingRtcConstants.RtcEngineVideoTrack

                                You can accept the video track.

                              • timeCost: number

                                Duration (ms).

                              Returns 

                              void

                              Ingroup

                              • OHOS_DingRtcCallbackEventListener

                              Since

                              • 3.0

                              Brief

                              • This callback is triggered when the first video packet from a remote user is received.

                              Note

                              • This callback is triggered when the first video packet from a remote user is received.

                              • Parameters

                                • videoTrack: DingRtcConstants.RtcEngineVideoTrack

                                  The sent video track.

                                • timeCost: number

                                  Duration (ms)

                                Returns 

                                void

                                Ingroup

                                • OHOS_DingRtcCallbackEventListener

                                Since

                                • 3.0

                                Brief

                                • This callback is triggered when the first local video packet is sent.

                                Note

                                • This callback is triggered when the first local video packet is sent.

                                • Parameters

                                  • result: number

                                    The result of joining the channel. A value of 0 indicates success. A non-zero value indicates an error code.

                                  • channel: string

                                    The channel ID.

                                  • userId: string

                                    The user ID.

                                  • elapsed: number

                                    The time elapsed to join the channel, in milliseconds.

                                  Returns 

                                  void

                                  Ingroup

                                  • OHOS_DingRtcCallbackEventListener

                                  Since

                                  • 3.0

                                  Brief

                                  • Channel join result.

                                  Details

                                  • After a user calls the joinChannel method, this callback is triggered to indicate whether the user has successfully joined the channel. It returns the result and the time elapsed.

                                  • Parameters

                                    • result: number

                                      The result of leaving the channel. A value of 0 indicates success. A non-zero value indicates an error code.

                                    • stats: DingRtcConstants.Stats

                                      A summary of data statistics for the session.

                                    Returns 

                                    void

                                    Ingroup

                                    • OHOS_DingRtcCallbackEventListener

                                    Since

                                    • 3.0

                                    Brief

                                    • Result of leaving a channel.

                                    Details

                                    • The SDK does not receive this callback.

                                    • Parameters

                                      • localAudioStats: DingRtcConstants.LocalAudioStats

                                        Local audio statistics.

                                      Returns 

                                      void

                                      Ingroup

                                      • OHOS_DingRtcCallbackEventListener

                                      Since

                                      • 3.0

                                      Brief

                                      • Local audio statistics

                                      Note

                                      • The SDK triggers this callback periodically.

                                      • Parameters

                                        • localVideoStats: DingRtcConstants.LocalVideoStats

                                          Local video statistics.

                                        Returns 

                                        void

                                        Ingroup

                                        • OHOS_DingRtcCallbackEventListener

                                        Since

                                        • 3.0

                                        Brief

                                        • Statistics information of the local video.

                                        Note

                                        • The SDK triggers this callback periodically.

                                        • Parameters

                                          • uid: string

                                            The UID of the user whose network quality has changed.

                                          • upQuality: DingRtcConstants.RtcEngineNetworkQuality

                                            .

                                          • downQuality: DingRtcConstants.RtcEngineNetworkQuality

                                            .

                                          Returns 

                                          void

                                          Ingroup

                                          • OHOS_DingRtcCallbackEventListener

                                          Since

                                          • 3.0

                                          Brief

                                          • This callback is triggered when the network quality changes.

                                          Note

                                          • This callback is triggered when the network quality changes. If the UID is empty, this callback reports a change in the local user's network quality.

                                          • Parameters

                                            • error: number

                                              .

                                            • msg: string

                                              The error description.

                                            Returns 

                                            void

                                            Ingroup

                                            • OHOS_DingRtcCallbackEventListener

                                            Since

                                            • 3.0

                                            Brief

                                            • This message notifies the app of an error in the engine.

                                            • Parameters

                                              • warn: number

                                                The warning type.

                                              • msg: string

                                                The warning message.

                                              Returns 

                                              void

                                              Ingroup

                                              • OHOS_DingRtcCallbackEventListener

                                              Since

                                              • 3.0

                                              Brief

                                              • This message notifies the application when the engine generates a warning.

                                              • Parameters

                                                • level: number

                                                  The volume level of the audio playback device. The value ranges from 0 to 100.

                                                Returns 

                                                void

                                                Ingroup

                                                • OHOS_DingRtcCallbackEventListener

                                                Since

                                                • 3.0

                                                Brief

                                                • This callback reports the volume level of the audio playback device.

                                                • Parameters

                                                  • level: number

                                                    The volume level of the audio capture device. The value ranges from 0 to 100.

                                                  Returns 

                                                  void

                                                  Ingroup

                                                  • OHOS_DingRtcCallbackEventListener

                                                  Since

                                                  • 3.0

                                                  Brief

                                                  • This callback reports the volume level of the audio capture device.

                                                  • Parameters

                                                    • remoteAudioStats: DingRtcConstants.RemoteAudioStats

                                                      Remote audio statistics.

                                                    Returns 

                                                    void

                                                    Ingroup

                                                    • OHOS_DingRtcCallbackEventListener

                                                    Since

                                                    • 3.0

                                                    Brief

                                                    • Provides statistics for remote audio.

                                                    Note

                                                    • The SDK triggers this callback periodically.

                                                    • Parameters

                                                      • uid: string

                                                        The user ID. This is a unique identifier assigned by the application server.

                                                      • audioTrack: DingRtcConstants.RtcEngineAudioTrack

                                                        .

                                                      • videoTrack: DingRtcConstants.RtcEngineVideoTrack

                                                        .

                                                      Returns 

                                                      void

                                                      Ingroup

                                                      • OHOS_DingRtcCallbackEventListener

                                                      Since

                                                      • 3.0

                                                      Brief

                                                      • This callback is triggered when the availability of a remote user's audio or video stream changes.

                                                      Details

                                                      • This callback is triggered in the following scenarios:

                                                        • A remote user starts to send an audio or video stream.

                                                        • A remote user stops sending an audio or video stream.

                                                      • Parameters

                                                        • uid: string

                                                          The user ID. This is a unique identifier assigned by the application server.

                                                        • reason: DingRtcConstants.UserOfflineReason

                                                          .

                                                        Returns 

                                                        void

                                                        Ingroup

                                                        • OHOS_DingRtcCallbackEventListener

                                                        Since

                                                        • 3.0

                                                        Brief

                                                        • This callback is triggered when a remote user leaves the channel.

                                                        • Parameters

                                                          • uid: string

                                                            The user ID. This is a unique identifier assigned by the application server.

                                                          • elapsed: number

                                                            The time elapsed for the user to join the channel.

                                                          Returns 

                                                          void

                                                          Ingroup

                                                          • OHOS_DingRtcCallbackEventListener

                                                          Since

                                                          • 3.0

                                                          Brief

                                                          • This callback is triggered when a remote user joins the channel.

                                                          • Parameters

                                                            • remoteVideoStats: DingRtcConstants.RemoteVideoStats

                                                              Remote video statistics.

                                                            Returns 

                                                            void

                                                            Ingroup

                                                            • OHOS_DingRtcCallbackEventListener

                                                            Since

                                                            • 3.0

                                                            Brief

                                                            • Statistics for remote video.

                                                            Note

                                                            • The SDK triggers this callback periodically.

                                                            • Parameters

                                                              • videoTrack: DingRtcConstants.RtcEngineVideoTrack

                                                                The local video track.

                                                              • newWidth: number

                                                                The new video width after the change.

                                                              • newHeight: number

                                                                The new video height after the change.

                                                              • oldWidth: number

                                                                The old video width before the change.

                                                              • oldHeight: number

                                                                The old video height before the change.

                                                              Returns 

                                                              void

                                                              Ingroup

                                                              • OHOS_DingRtcCallbackEventListener

                                                              Since

                                                              • 3.2.1

                                                              Brief

                                                              • This callback is triggered when the resolution of the local video renderer changes.

                                                              Note

                                                              • The rendered video size may differ from the captured video size if post-processing, such as scaling, is applied after capture.

                                                              • Parameters

                                                                • uid: string

                                                                  The user ID. This is a unique identifier assigned by the application server.

                                                                • videoTrack: DingRtcConstants.RtcEngineVideoTrack

                                                                  The received video track.

                                                                • newWidth: number

                                                                  The new video width after the change.

                                                                • newHeight: number

                                                                  The new video height after the change.

                                                                • oldWidth: number

                                                                  The old video width before the change.

                                                                • oldHeight: number

                                                                  The old video height before the change.

                                                                Returns 

                                                                void

                                                                Ingroup

                                                                • OHOS_DingRtcCallbackEventListener

                                                                Since

                                                                • 3.2.1

                                                                Brief

                                                                • This callback is triggered when the resolution of a remote video renderer changes.

                                                                Note

                                                                • The rendered video size may differ from the decoder output size if video post-processing features, such as super resolution, are used.

                                                                Note

                                                                • Due to features such as simulcast, dynamic resolution adjustment, and orientation changes, the rendered video size may differ from the maximum stream ingest resolution set by the remote user.

                                                                • Parameters

                                                                  • oldState: DingRtcConstants.RtcEnginePublishState

                                                                    The previous stream ingest state.

                                                                  • newState: DingRtcConstants.RtcEnginePublishState

                                                                    The current stream ingest state.

                                                                  • elapseSinceLastState: number

                                                                    The time interval between state changes, in milliseconds.

                                                                  • channel: string

                                                                    The current channel ID.

                                                                  Returns 

                                                                  void

                                                                  Ingroup

                                                                  • OHOS_DingRtcCallbackEventListener

                                                                  Since

                                                                  • 3.0

                                                                  Brief

                                                                  • This callback is triggered when the screen sharing stream ingest state changes.

                                                                  • Parameters

                                                                    • uid: string

                                                                      The user ID. This is a unique identifier assigned by the application server.

                                                                    • oldState: DingRtcConstants.RtcEngineSubscribeState

                                                                      The previous subscription state.

                                                                    • newState: DingRtcConstants.RtcEngineSubscribeState

                                                                      The current subscription state.

                                                                    • elapseSinceLastState: number

                                                                      The time interval between the two state changes, in milliseconds.

                                                                    • channel: string

                                                                      The current channel ID.

                                                                    Returns 

                                                                    void

                                                                    Ingroup

                                                                    • OHOS_DingRtcCallbackEventListener

                                                                    Since

                                                                    • 3.0

                                                                    Brief

                                                                    • This callback is triggered when the screen sharing stream subscription state changes.

                                                                    • Parameters

                                                                      • uid: string

                                                                        The user ID. An empty string indicates the local user.

                                                                      • videoTrack: DingRtcConstants.RtcEngineVideoTrack

                                                                        .

                                                                      • filePath: string

                                                                        The local path where the snapshot is saved.

                                                                      • width: number

                                                                        The snapshot width.

                                                                      • height: number

                                                                        The snapshot height.

                                                                      • success: boolean

                                                                        Indicates whether the snapshot was taken successfully.

                                                                      Returns 

                                                                      void

                                                                      Ingroup

                                                                      • OHOS_DingRtcCallbackEventListener

                                                                      Since

                                                                      • 3.0

                                                                      Brief

                                                                      • This callback reports the result of a video snapshot.

                                                                      Note

                                                                      • This API handles screenshot callbacks.

                                                                      • Parameters

                                                                        • stats: DingRtcConstants.Stats

                                                                          Session statistics.

                                                                        Returns 

                                                                        void

                                                                        Ingroup

                                                                        • OHOS_DingRtcCallbackEventListener

                                                                        Since

                                                                        • 3.0

                                                                        Brief

                                                                        • This callback reports the current session statistics.

                                                                        Note

                                                                        • The SDK triggers this callback periodically.

                                                                        • Parameters

                                                                          • uid: string

                                                                            The user ID. This is a unique identifier assigned by the application server.

                                                                          • oldStreamType: DingRtcConstants.RtcEngineVideoStreamType

                                                                            The previously subscribed video stream type.

                                                                          • newStreamType: DingRtcConstants.RtcEngineVideoStreamType

                                                                            The currently subscribed video stream type.

                                                                          • elapseSinceLastState: number

                                                                            The time interval between video stream type changes, in milliseconds.

                                                                          • channel: string

                                                                            The current channel ID.

                                                                          Returns 

                                                                          void

                                                                          Ingroup

                                                                          • OHOS_DingRtcCallbackEventListener

                                                                          Since

                                                                          • 3.0

                                                                          Brief

                                                                          • This callback is triggered when the subscribed video stream type changes.

                                                                          Note

                                                                          • Subscribing to a specific video stream type does not guarantee that you will receive that stream. The actual received stream type depends on the remote user's stream ingest and network conditions.

                                                                          • Parameters

                                                                            • uid: string

                                                                              The remote user ID.

                                                                            • isMute: boolean
                                                                              • Indicates whether the user is muted.

                                                                              • true: The user is muted.

                                                                              • false: The user is unmuted.

                                                                            Returns 

                                                                            void

                                                                            Ingroup

                                                                            • OHOS_DingRtcCallbackEventListener

                                                                            Since

                                                                            • 3.0

                                                                            Brief

                                                                            • This callback is triggered when a remote user mutes or unmutes their audio.

                                                                            • Parameters

                                                                              • uid: string

                                                                                The remote user ID.

                                                                              • enabled: boolean
                                                                                   - true: Enables camera stream capture.
                                                                                   - false: Disables camera stream capture.
                                                                                

                                                                              Returns 

                                                                              void

                                                                              Ingroup

                                                                              • OHOS_DingRtcCallbackEventListener

                                                                              Since

                                                                              • 3.5

                                                                              Brief

                                                                              • The remote user has stopped the camera stream.

                                                                              • Parameters

                                                                                • uid: string

                                                                                  The remote user ID.

                                                                                • isMute: boolean
                                                                                     - true: The user paused sending their video stream.
                                                                                     - false: The user resumed sending their video stream.
                                                                                  
                                                                                • videoTrack: DingRtcConstants.RtcEngineVideoTrack

                                                                                  .

                                                                                Returns 

                                                                                void

                                                                                Ingroup

                                                                                • OHOS_DingRtcCallbackEventListener

                                                                                Since

                                                                                • 3.0

                                                                                Brief

                                                                                • This callback is triggered when a remote user pauses or resumes sending their video stream.

                                                                                • Parameters

                                                                                  • uid: string

                                                                                    The remote user ID.

                                                                                  Returns 

                                                                                  void

                                                                                  Ingroup

                                                                                  • OHOS_DingRtcCallbackEventListener

                                                                                  Since

                                                                                  • 3.5

                                                                                  Brief

                                                                                  • The remote user's application is brought to the foreground.

                                                                                  • Parameters

                                                                                    • uid: string

                                                                                      The remote user ID.

                                                                                    Returns 

                                                                                    void

                                                                                    Ingroup

                                                                                    • OHOS_DingRtcCallbackEventListener

                                                                                    Since

                                                                                    • 3.5

                                                                                    Brief

                                                                                    • The remote user's application enters the background.

                                                                                    • Parameters

                                                                                      • deviceId: string

                                                                                        The camera ID.

                                                                                      • deviceType: DingRtcConstants.RtcEngineDeviceType

                                                                                        The device type.

                                                                                      • deviceState: number

                                                                                        The device state.

                                                                                      Returns 

                                                                                      void

                                                                                      Brief

                                                                                      • The status of the local camera changes.

                                                                                      Since

                                                                                      • 3.4.1

                                                                                      • Parameters

                                                                                        • oldState: DingRtcConstants.RtcEnginePublishState

                                                                                          The previous stream ingest state.

                                                                                        • newState: DingRtcConstants.RtcEnginePublishState

                                                                                          The current stream ingest state.

                                                                                        • elapseSinceLastState: number

                                                                                          The time interval between state changes, in milliseconds.

                                                                                        • channel: string

                                                                                          The current channel ID.

                                                                                        Returns 

                                                                                        void

                                                                                        Ingroup

                                                                                        • OHOS_DingRtcCallbackEventListener

                                                                                        Since

                                                                                        • 3.0

                                                                                        Brief

                                                                                        • This callback is triggered when the video stream ingest state changes.

                                                                                        • Parameters

                                                                                          • uid: string

                                                                                            The user ID. This is a unique identifier assigned by the application server.

                                                                                          • oldState: DingRtcConstants.RtcEngineSubscribeState

                                                                                            The previous subscription state.

                                                                                          • newState: DingRtcConstants.RtcEngineSubscribeState

                                                                                            The current subscription state.

                                                                                          • elapseSinceLastState: number

                                                                                            The time interval between the two state changes, in milliseconds.

                                                                                          • channel: string

                                                                                            The current channel ID.

                                                                                          Returns 

                                                                                          void

                                                                                          Ingroup

                                                                                          • OHOS_DingRtcCallbackEventListener

                                                                                          Since

                                                                                          • 3.0

                                                                                          Brief

                                                                                          • This callback is triggered when the camera stream subscription state changes.