Agora RTC Objective-C API Reference Refactor

Instance Methods
<AgoraLivePublisherDelegate> Protocol Reference

Inherits <NSObject>.

## Instance Methods
(void) | - rtcEngine:rtmpStreamingChangedToState:state:reason:
(void) | - publisher:streamPublishedWithUrl:error:
(void) | - publisher:streamUnpublishedWithUrl:
(void) | - publisherTranscodingUpdated:
(void) | - publisher:streamInjectedStatusOfUrl:uid:status:

## Detailed Description

Protocol providing the AgoraLivePublisher class with callbacks.

## Method Documentation

## ◆ rtcEngine:rtmpStreamingChangedToState:state:reason:

- (void) rtcEngine: |  | (AgoraRtcEngineKit *_Nonnull) | engine
rtmpStreamingChangedToState: |  | (NSString *_Nonnull) | url
state: |  | (AgoraRtmpStreamingState) | state
reason: |  | (AgoraRtmpStreamingReason) | reason
| optional

Occurs when the state of Media Push changes.

When the state of Media Push changes, the SDK triggers this callback and reports the URL address and the current state of the Media Push. This callback indicates the state of the Media Push. When exceptions occur, you can troubleshoot issues by referring to the detailed error descriptions in the error code parameter.

Parameters

  engine | `AgoraRtcEngineKit` object.
  url | The URL address where the state of the Media Push changes.
  state | The current state of the Media Push. See `AgoraRtmpStreamingState`.
  reason | Reasons for the changes in the Media Push status. See `AgoraRtmpStreamingReason`.

## ◆ publisher:streamPublishedWithUrl:error:

- (void) publisher: |  | (AgoraLivePublisher *_Nonnull) | publisher
streamPublishedWithUrl: |  | (NSString *_Nonnull) | url
error: |  | (AgoraErrorCode) | error
| optional

A stream was published.

Parameters

  publisher | AgoraRtcEngineKit object.
  url | Address to which the publisher publishes the stream.
  error | AgoraErrorCode

## ◆ publisher:streamUnpublishedWithUrl:

- (void) publisher: |  | (AgoraLivePublisher *_Nonnull) | publisher
streamUnpublishedWithUrl: |  | (NSString *_Nonnull) | url
| optional

A stream was unpublished.

Parameters

  publisher | AgoraRtcEngineKit object.
  url | Address to which the publisher unpublishes the stream.

## ◆ publisherTranscodingUpdated:

- (void) publisherTranscodingUpdated: |  | (AgoraLivePublisher *_Nonnull) | publisher |
| optional

The publisher transcoding was updated.

Parameters

  publisher | AgoraRtcEngineKit object

## ◆ publisher:streamInjectedStatusOfUrl:uid:status:

- (void) publisher: |  | (AgoraLivePublisher *_Nonnull) | publisher
streamInjectedStatusOfUrl: |  | (NSString *_Nonnull) | url
uid: |  | (NSUInteger) | uid
status: |  | (AgoraInjectStreamStatus) | status
| optional

The status of the imported external video stream.

Parameters

  publisher | AgoraRtcEngineKit object.
  url | URL address of the imported external video stream added to the live broadcast.
  uid | User ID.
  status | AgoraInjectStreamStatus.