#include <IAgoraRtmpStreamingService.h>
The IRtmpStreamingObserver class, which monitors events in of the live streaming service.
◆ 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
-
url | The RTMP URL address. |
state | The RTMP streaming state: #RTMP_STREAM_PUBLISH_STATE. |
errCode | The 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
-
url | The RTMP or RTMPS streaming URL. |
eventCode | The event code. See #RTMP_STREAMING_EVENT |
◆ 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.