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 (aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int | pauseAllChannelMediaRelay (aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int | resumeAllChannelMediaRelay (aosl_ref_t ares=AOSL_REF_INVALID)=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 | ( | aosl_ref_t | ares = `AOSL_REF_INVALID` | ) |
| 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 | ( | aosl_ref_t | ares = `AOSL_REF_INVALID` | ) |
| 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 | ( | aosl_ref_t | ares = `AOSL_REF_INVALID` | ) |
| 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 virtual inherited

## ◆ Release()

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

## ◆ HasOneRef()

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