Agora Java API Reference for Android

Public Member Functions | List of all members
agora::rtc::IMediaRelayService Class Referenceabstract
Inheritance diagram for agora::rtc::IMediaRelayService:

## 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
virtual void | registerEventHandler (IMediaRelayObserver *eventObserver, void(*safeDeleter)(IMediaRelayObserver *)=NULL)=0
virtual void | unregisterEventHandler (IMediaRelayObserver *eventObserver)=0
Public Member Functions inherited from agora::RefCountInterface
virtual void | AddRef () const =0
virtual RefCountReleaseStatus | Release () const =0
virtual bool | HasOneRef () const =0

## Member Function Documentation

## ◆ startOrUpdateChannelMediaRelay()

virtual int agora::rtc::IMediaRelayService::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 agora::rtc::IMediaRelayService::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 agora::rtc::IMediaRelayService::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 agora::rtc::IMediaRelayService::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.