Agora RTC Objective-C API Reference  Refactor
Public Member Functions
IRtmpStreamingObserver Class Reference

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 onTranscodingUpdated ()
 

Detailed Description

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

Member Function Documentation

◆ onRtmpStreamingStateChanged()

virtual void onRtmpStreamingStateChanged ( const char *  url,
RTMP_STREAM_PUBLISH_STATE  state,
RTMP_STREAM_PUBLISH_ERROR_TYPE  errCode 
)
inlinevirtual

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 onRtmpStreamingEvent ( const char *  url,
RTMP_STREAMING_EVENT  eventCode 
)
inlinevirtual

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

◆ onTranscodingUpdated()

virtual void onTranscodingUpdated ( )
inlinevirtual

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.