#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 |
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. |
◆ 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
-
url | The RTMP URL address. |
error | The 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
-
◆ 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.