Nanobots Protecting Microbots

    This package has been deprecated

    Author message:

    This package has been deprecated. Please see @bandwidth/webrtc-server-node instead.

    @bandwidth/bandwidth-rtc-sdk-server-node
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.6 • Public • Published

    Application Server SDK Documentation

    • Authorization: accountId and password/OAuth token pair.

    API Methods

    startConference

    • Return:
      • conferenceId: The id of the conference that was started.
    • Description: Start a conference.
    let conferenceId = await bandwidthRtc.startConference();

    endConference

    • Params :
      • conferenceId: The id of the conference you are ending.
    • Description: End a conference.
    await bandwidthRtc.endConference(req.params.conferenceId);

    createParticipant

    • Params:
      • conferenceId: The id of the conference that the participant will be in.
    • Return:
      • participantId: The id of the participant that was created.
    • Description: Create a participant.
    let participantId = await bandwidthRtc.createParticipant(
      req.params.conferenceId
    );

    removeParticipant

    • Params:
      • conferenceId: The id of the conference the participant belongs to.
      • participantId: The id of the participant to removed.
    • Description: Remove a participant.
    await bandwidthRtc.removeParticipant(conferenceId, participantId);

    subscribe

    • Params:
      • conferenceId: The id of the conference.
      • participantId: The id of the participant to subscribe.
      • streamId: The stream that is being subscribed to.
    • Description: Subscribe a participant to a stream.
    await bandwidthRtc.subscribe(
                    conferenceId,
                    participantId,
                    streamId
                  );

    unsubscribe

    • Params:
      • conferenceId: The id of the conference.
      • participantId: The id of the participant to unsubscribe.
      • streamId: The stream that is being unsubscribed from.
    • Description: Unsubscribe a participant from a stream.
    await bandwidthRtc.unsubscribe(
                    conferenceId,
                    participantId,
                    streamId
                  );

    unpublish

    • Params:
      • conferenceId: The id of the conference.
      • participantId: The id of the participant that should unpublish.
      • streamId: The id of the stream that is being unpublished.
    • Description: Unpublish a stream.
    await bandwidthRtc.unpublish(
                    conferenceId,
                    participantId,
                    streamId
                  );

    Events

    onParticipantJoined

    • Description: Listens for onParticipantJoined event.
    bandwidthRtc.onParticipantJoined(async event => {
      console.log(
        `participant ${event.participantId} joined conference ${event.conferenceId}`
      );)
    });

    onParticipantLeft

    • Description: Listens for onParticipantLeft event.
    bandwidthRtc.onParticipantLeft(async event => {
      console.log(
        `participant ${event.participantId} left conference ${event.conferenceId}`
      );)
    }

    onParticipantPublished

    • Description: Listens for the onParticipantPublished event.
    bandwidthRtc.onParticipantPublished(async event => {
      console.log(
        `participant ${event.participantId} published stream ${event.streamId} to conference ${event.conferenceId}`
      );)
    }

    onParticipantUnpublished

    • Description: Listens for the onParticipantUnpublished event.
    bandwidthRtc.onParticipantUnpublished(async event => {
      console.log(
        `participant ${event.participantId} unpublished stream ${event.streamId} from conference ${event.conferenceId}`
      );)
    }

    onParticipantUnsubscribed

    • Description: Listens for the onParticipantUnsubscribed event.
    bandwidth.onParticipantUnsubscribed(async event => {
      console.log(
        `participant ${event.participantId} unsubscribed from stream ${event.streamId} in conference ${event.conferenceId}`
      );)
    })

    Keywords

    none

    Install

    npm i @bandwidth/bandwidth-rtc-sdk-server-node

    DownloadsWeekly Downloads

    7

    Version

    1.0.6

    License

    ISC

    Unpacked Size

    57.2 kB

    Total Files

    15

    Last publish

    Collaborators

    • mhamer-bw
    • jmulford-bandwidth
    • tbowen
    • zelitzsi
    • themikez
    • nguyer
    • developerhelp-bandwidth
    • cejohnson-bw