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

#include <IAgoraRtmpStreamingService.h>

Public Member Functions

virtual void onRtmpStreamingStateChanged (const char *url, RTMP_STREAM_PUBLISH_STATE state, RTMP_STREAM_PUBLISH_ERROR_TYPE errCode)
 
virtual void onRtmpStreamingEvent (const char *url, RTMP_STREAMING_EVENT eventCode)
 
virtual void onStreamPublished (const char *url, int error)
 
virtual void onStreamUnpublished (const char *url)
 
virtual void onTranscodingUpdated ()
 

Detailed Description

The IRtmpStreamingObserver class, which monitors events in of the live streaming service.

Member Function Documentation

◆ onRtmpStreamingStateChanged()

virtual void agora::rtc::IRtmpStreamingObserver::onRtmpStreamingStateChanged ( const char *  url,
RTMP_STREAM_PUBLISH_STATE  state,
RTMP_STREAM_PUBLISH_ERROR_TYPE  errCode 
)
virtual

Occurs when the state of the RTMP streaming changes.

The SDK triggers this callback to report the result of the local user calling addPublishStreamUrl or removePublishStreamUrl.

This callback also reports the streaming URL and its current streaming state. When exceptions occur, you can troubleshoot issues by referring to the detailed error description in the errCode parameter.

Parameters
urlThe RTMP URL address.
stateThe RTMP streaming state: #RTMP_STREAM_PUBLISH_STATE.
errCodeThe detailed error information for streaming: #RTMP_STREAM_PUBLISH_ERROR_TYPE.

◆ onRtmpStreamingEvent()

virtual void agora::rtc::IRtmpStreamingObserver::onRtmpStreamingEvent ( const char *  url,
RTMP_STREAMING_EVENT  eventCode 
)
virtual

Reports events during the RTMP or RTMPS streaming.

Since
v3.1.0
Parameters
urlThe RTMP or RTMPS streaming URL.
eventCodeThe event code. See #RTMP_STREAMING_EVENT

◆ onStreamPublished()

virtual void agora::rtc::IRtmpStreamingObserver::onStreamPublished ( const char *  url,
int  error 
)
virtual

Reports the result of the addPublishStreamUrl method.

This callback reports whether you have successfully added an RTMP stream to the CDN.

Parameters
urlThe RTMP URL address.
errorThe detailed error information.

◆ onStreamUnpublished()

virtual void agora::rtc::IRtmpStreamingObserver::onStreamUnpublished ( const char *  url)
virtual

Reports the result of calling the removePublishStreamUrl method.

This callback reports whether you have successfully removed an RTMP stream from the CDN.

Parameters
urlThe RTMP URL address.

◆ onTranscodingUpdated()

virtual void agora::rtc::IRtmpStreamingObserver::onTranscodingUpdated ( )
virtual

Occurs when the publisher's transcoding settings are updated.

When the LiveTranscoding class in the setLiveTransocding method updates, the SDK triggers this callback to report the update information.

Note
If you call the setLiveTranscoding method to set the LiveTranscoding class for the first time, the SDK does not trigger this callback.