MediaSFU Angular
    Preparing search index...

    Class ConnectRecvTransport

    Connects the receiving transport to consume media from a remote producer.

    The options for connecting the receiving transport.

    The transport used for consuming media.

    The ID of the remote producer.

    The ID of the server consumer transport.

    The socket used for communication.

    The parameters for the connection.

    A promise that resolves when the connection is established.

    Will throw an error if the connection or consumption fails.

    const options = {
    consumerTransport,
    remoteProducerId: 'producer-id',
    serverConsumerTransportId: 'transport-id',
    nsock: socket,
    parameters: connectRecvTransportOptions,
    };

    connectRecvTransport(options)
    .then(() => {
    console.log('Transport connected and consuming media');
    })
    .catch((error) => {
    console.error('Error connecting transport:', error);
    });
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Connects the receiving transport to consume media from a remote producer.

      Parameters

      Returns Promise<void>

      A promise that resolves when the connection is established.

      Will throw an error if the connection or consumption fails.

      const options = {
      consumerTransport,
      remoteProducerId: 'producer-id',
      serverConsumerTransportId: 'transport-id',
      nsock: socket,
      parameters: connectRecvTransportOptions,
      };

      connectRecvTransport(options)
      .then(() => {
      console.log('Transport connected and consuming media');
      })
      .catch((error) => {
      console.error('Error connecting transport:', error);
      });