Agora Java API Reference for Android
Public Member Functions | List of all members
agora::rtc::IVideoTrackObserver Class Referenceabstract

#include <NGIAgoraVideoTrack.h>

Public Member Functions

virtual bool isExternal ()
 
virtual void onLocalVideoStateChanged (int track_id, LOCAL_VIDEO_STREAM_STATE state, LOCAL_VIDEO_STREAM_ERROR error_code, int timestamp_ms)=0
 
virtual void onFirstVideoFrameRendered (user_id_t user_id, int width, int height, int timestamp_ms)=0
 

Detailed Description

The observer of the video track.

Member Function Documentation

◆ isExternal()

virtual bool agora::rtc::IVideoTrackObserver::isExternal ( )
virtual

Indicate if the observer is for internal use. Note: Never override this function

Returns
  • true: the observer is for external use
  • false: the observer is for internal use

◆ onLocalVideoStateChanged()

virtual void agora::rtc::IVideoTrackObserver::onLocalVideoStateChanged ( int  track_id,
LOCAL_VIDEO_STREAM_STATE  state,
LOCAL_VIDEO_STREAM_ERROR  error_code,
int  timestamp_ms 
)
pure virtual

Occurs when the local video stream state changes.

Parameters
track_idThe id of the local video track.
stateState type #LOCAL_VIDEO_STREAM_STATE. When the state is LOCAL_VIDEO_STREAM_STATE_FAILED (3), see the error_code parameter for details.
error_codeThe detailed error information: #LOCAL_VIDEO_STREAM_ERROR.
timestamp_msThe timestamp when the event is triggered.

◆ onFirstVideoFrameRendered()

virtual void agora::rtc::IVideoTrackObserver::onFirstVideoFrameRendered ( user_id_t  user_id,
int  width,
int  height,
int  timestamp_ms 
)
pure virtual

Occurs when the first video frame is rendered.

Parameters
user_idthe user id of the video track, If it's local video track, uid is "".
widththe width of the video frame.
heightthe height of the video frame.
timestamp_msThe timestamp when the event is triggered.