Agora RTC Objective-C API Reference Refactor

Instance Methods
AgoraLiveSubscriber Class Reference

Inherits <NSObject>.

## Instance Methods
(instancetype _Nonnull) | - initWithLiveKit:
(void) | - setDelegate:
(void) | - subscribeToHostUid:mediaType:view:renderMode:videoType:
(void) | - unsubscribeToHostUid:

## Detailed Description

The AgoraLiveSubscriber class manages all actions related to live broadcast subscribing.

## Method Documentation

## ◆ initWithLiveKit:

- (instancetype _Nonnull) initWithLiveKit: |  | (AgoraLiveKit *_Nonnull) | kit |

Initializes an AgoraLiveSubscriber object.

Parameters

  kit | AgoraLiveKit

Returns
  AgoraLiveSubscriber object.

## ◆ setDelegate:

- (void) setDelegate: |  | (_Nullable id< AgoraLiveSubscriberDelegate >) | delegate |

Sets the delegate.

Parameters

  delegate | AgoraLiveSubscriberDelegate

## ◆ subscribeToHostUid:mediaType:view:renderMode:videoType:

- (void) subscribeToHostUid: |  | (NSUInteger) | uid
mediaType: |  | (AgoraMediaType) | mediaType
view: |  | (VIEW_CLASS *_Nullable) | view
renderMode: |  | (AgoraVideoRenderMode) | mode
videoType: |  | (AgoraVideoStreamType) | videoType

Subscribes to a host.

Parameters

  uid | User ID of the host
  mediaType | AgoraMediaType
  view | View to render
  mode | AgoraVideoRenderMode
  videoType | AgoraVideoStreamType

## ◆ unsubscribeToHostUid:

- (void) unsubscribeToHostUid: |  | (NSUInteger) | uid |

Unsubscribes from a host.

Parameters

  uid | User ID of the host