Agora RTC Objective-C API Reference Refactor

Public Member Functions
IMediaRelayService Class Referenceabstract

Inherits RefCountInterface.

## Public Member Functions
virtual int | startOrUpdateChannelMediaRelay (const ChannelMediaRelayConfiguration &configuration)=0
virtual int | stopChannelMediaRelay ()=0
virtual int | pauseAllChannelMediaRelay ()=0
virtual int | resumeAllChannelMediaRelay ()=0

## Member Function Documentation

## ◆ startOrUpdateChannelMediaRelay()

virtual int startOrUpdateChannelMediaRelay | ( | const ChannelMediaRelayConfiguration & | configuration | ) |
| pure virtual

Starts or update to relay media streams across channels.

Since
  v4.2.0

Parameters

  configuration | The configuration of the media stream relay: ChannelMediaRelayConfiguration.

Returns
  - 0: Success.
  - < 0: Failure.
    - -1(ERR_FAILED): A general error occurs (no specified reason).
    - -2(ERR_INVALID_ARGUMENT): The argument is invalid.
    - -5(ERR_REFUSED): The request is rejected.

## ◆ stopChannelMediaRelay()

virtual int stopChannelMediaRelay | ( |  | ) |
| pure virtual

Stops the media stream relay.

Once the relay stops, the host quits all the destination channels.

Returns
  - 0: Success.
  - < 0: Failure.
    - -1(ERR_FAILED): A general error occurs (no specified reason).
    - -2(ERR_INVALID_ARGUMENT): The argument is invalid.
    - -5(ERR_REFUSED): The request is rejected.

## ◆ pauseAllChannelMediaRelay()

virtual int pauseAllChannelMediaRelay | ( |  | ) |
| pure virtual

pause the channels for media stream relay.

Returns
  - 0: Success.
  - < 0: Failure.
    - -1(ERR_FAILED): A general error occurs (no specified reason).
    - -2(ERR_INVALID_ARGUMENT): The argument is invalid.
    - -5(ERR_REFUSED): The request is rejected.

## ◆ resumeAllChannelMediaRelay()

virtual int resumeAllChannelMediaRelay | ( |  | ) |
| pure virtual

resume the channels for media stream relay.

Returns
  - 0: Success.
  - < 0: Failure.
    - -1(ERR_FAILED): A general error occurs (no specified reason).
    - -2(ERR_INVALID_ARGUMENT): The argument is invalid.
    - -5(ERR_REFUSED): The request is rejected.

## ◆ registerEventHandler()

virtual void registerEventHandler | ( | IMediaRelayObserver * | eventObserver,
|  | void(*)(IMediaRelayObserver *) | safeDeleter = `NULL`
| ) |  |
| pure virtual

## ◆ unregisterEventHandler()

virtual void unregisterEventHandler | ( | IMediaRelayObserver * | eventObserver | ) |
| pure virtual

## ◆ AddRef()

virtual void AddRef | ( |  | ) | const
| pure virtualinherited

## ◆ Release()

virtual RefCountReleaseStatus Release | ( |  | ) | const
| pure virtualinherited

## ◆ HasOneRef()

virtual bool HasOneRef | ( |  | ) | const
| pure virtualinherited