Interface IChannelMediaRelayConfiguration

Configurations of the media stream relay.

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

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

Hierarchy

  • IChannelMediaRelayConfiguration

Index

Methods

addDestChannelInfo

  • 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

removeDestChannelInfo

  • removeDestChannelInfo(channelName: string): void
  • Removes the destination channel added through addDestChannelInfo.

    Parameters

    • channelName: string

      The name of the destination channel to be removed.

    Returns void

setSrcChannelInfo

  • Sets the information of the source channel.

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

    Parameters

    Returns void