Interface IChannelMediaRelayConfiguration

Configurations of the media stream relay.

Use this interface to set the media stream relay when calling [startChannelMediaRelay]IAgoraRTCClient.startChannelMediaRelay or [updateChannelMediaRelay]IAgoraRTCClient.updateChannelMediaRelay.

const configuration = AgoraRTC.createChannelMediaRelayConfiguration();
configuration.setSrcChannelInfo({ channelName: "test", token: "xxx", uid: 12345 });
configuration.addDestChannelInfo({ channelName: "test2", token: "xxx", uid: 23456 });
interface IChannelMediaRelayConfiguration {
    addDestChannelInfo(info): void;
    removeDestChannelInfo(channelName): void;
    setSrcChannelInfo(info): void;
}

Methods

  • Adds a destination channel.

    To relay a media stream across multiple channels, call this method as many times (to a maximum of four).

    const config = AgoraRTC.createChannelMediaRelayConfiguration();
    config.addDestChannelInfo({ channelName: "test2", token: "xxx", uid: 23456 });
    config.addDestChannelInfo({ channelName: "test3", token: "xxx", uid: 23457 });

    Parameters

    Returns void

  • Removes the destination channel added through addDestChannelInfo.

    Parameters

    • channelName: string

      The name of the destination channel to be removed.

    Returns void

  • Sets the information of the source channel.

    const config = AgoraRTC.createChannelMediaRelayConfiguration();
    config.setSrcChannelInfo({ channelName: "test", token: "xxx", uid: 123456 });

    Parameters

    Returns void