Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Mar 26, 2021. It is now read-only.

JavaScript layer to interact with BigBlueButton API

License

NotificationsYou must be signed in to change notification settings

aakatev/bigbluebutton-js

Repository files navigation

BigBlueButtonJs Logo

JavaScript layer to interact with BigBlueButtonAPI. SupportsWebHooks.

Features

  • Supports BBB API, and WebHooks
  • Provides methods to construct URLs, and calculate SHA checksum
  • Provides HTTP client that converts XML responses to JS objects
  • Works with Node 10 or newer
  • Works in browserdist/browser.js

Installation

npm i bigbluebutton-js

Usage

You will need to provide BigBlueButton URL and secret to the script. You can obtain them by logging into you BBB server, and running:

bbb-conf --secret

Use the obtained values in your script:

constbbb=require('bigbluebutton-js')letapi=bbb.api(process.env.BBB_URL,process.env.BBB_SECRET)

For comprehensive getting started section, seeofficial docs.

Examples

The following example shows how to create a room, and links for moderator and attendee to join:

constbbb=require('bigbluebutton-js')// BBB_URL and BBB_SECRET can be obtained// by running bbb-conf --secret on your BBB server// refer to Getting Started for more informationletapi=bbb.api(process.env.BBB_URL,process.env.BBB_SECRET)lethttp=bbb.http// api module itself is responsible for constructing URLsletmeetingCreateUrl=api.administration.create('My Meeting','1',{duration:2,attendeePW:'secret',moderatorPW:'supersecret',})// http method should be used in order to make callshttp(meetingCreateUrl).then((result)=>{console.log(result)letmoderatorUrl=api.administration.join('moderator','1','supersecret')letattendeeUrl=api.administration.join('attendee','1','secret')console.log(`Moderator link:${moderatorUrl}\nAttendee link:${attendeeUrl}`)letmeetingEndUrl=api.administration.end('1','supersecret')console.log(`End meeting link:${meetingEndUrl}`)})

For comprehensive examples section, seeofficial docs.

Reference

Our reference is divided into two sections:API andWebHooks.

Tests

To run the test suites some prior configuration is required. First, create a.env file in library root. The file should have the following content:

BBB_URL=https://mysite.com/bigbluebuttonBBB_SECRET=MySuperSecretSharedToken

Make sure, you installed development dependencies (mocha, anddotenv). Now you can runnpm run test:

npm runtest

License

This project is licensed under the ISC License - see theLICENSE file for details

Acknowledgments


[8]ページ先頭

©2009-2025 Movatter.jp