Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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

Package Overview
Dependencies
Maintainers
15
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

SDK for Bandwidth WebRTC Server Applications

  • 1.0.6
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
15
Weekly downloads
 
Created
Source

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}`
  );)
})

FAQs

Package last updated on 28 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc