Coder Social home page Coder Social logo

bigbluebot's Introduction

BigBlueBot

BigBlueButton bots

Requirements

A BigBlueButton server with bbb-demo installed or setting the server API secret

Instructions

IMPORTANT: do not run this lib with root privileges

npm i bigbluebot

cp node_modules/bigbluebot/.env.template .env

Set your environment variables

At the .env file you just copied, set:

  • your BigBlueButton server URL
BIGBLUEBOT_HOST=https://your.bigbluebutton.server
  • [optional] room name or meetingID
BIGBLUEBOT_ROOM=yourbigbluebuttonroomidentifier

If you would like the bots to join an existing room, you may fill out the password variables and use the meetingID value as BIGBLUEBOT_ROOM To find out these data, you may call the getMeetings route of your BBB instance as described here.

  • [optional] the attendeePW and moderatorPW as shown in getMeetings
BIGBLUEBOT_ATTENDEE_PW=yourattendeepassword
BIGBLUEBOT_MODERATOR_PW=yourmoderatorpassword
  • [optional] your BigBlueButton server API secret
BIGBLUEBOT_SECRET=yourbigbluebuttonsecret
  • [optional] number of bots to join the room
BIGBLUEBOT_BOTS=1
  • [optional] time (milliseconds) between bots to join
BIGBLUEBOT_WAIT=2000
  • [optional] time (milliseconds) of a bot life span
BIGBLUEBOT_LIFE=60000
  • [optional] external browser to be used
BIGBLUEBOT_BROWSER=/path/to/your/browser
  • [optional] number of browser processes
BIGBLUEBOT_POOL=1
  • [optional] endpoint browser websocket to be used
BIGBLUEBOT_ENDPOINT=wss://your.browser.websocket
  • [optional] endpoint authentication token
BIGBLUEBOT_TOKEN=yourauthenticationtoken
  • [optional] log level
BIGBLUEBOT_LOG=info

Make a run script

Create your script, e.g. run.js:

Join audio with microphone

const bigbluebot = require('bigbluebot');

const actions = async page => {
  await bigbluebot.audio.modal.microphone(page);
};

bigbluebot.run(actions);

Join audio as a listener

const bigbluebot = require('bigbluebot');

const actions = async page => {
  await bigbluebot.audio.modal.listen(page);
};

bigbluebot.run(actions);

Join video

const bigbluebot = require('bigbluebot');

const actions = async page => {
  await bigbluebot.video.join(page);
};

bigbluebot.run(actions);

Write in chat

const bigbluebot = require('bigbluebot');

const actions = async page => {
  await bigbluebot.chat.send(page);
};

bigbluebot.run(actions);

Runtime options

You can pass options as a run parameter

const bigbluebot = require('bigbluebot');

const actions = async page => {
  await bigbluebot.audio.modal.microphone(page);
  await bigbluebot.video.join(page);
  await bigbluebot.chat.send(page);
};

const options = {
  host: 'https://your.bigbluebutton.server',
  secret: 'yourbigbluebuttonsecret',
  room: 'yourbigbluebuttonroomidentifier',
  password: {
    moderator: 'yourmoderatorpassword',
    attendee: 'yourattendeepassword',
  },
  moderator: true OR false,
};

bigbluebot.run(actions, options);

Run your script

node run.js

bigbluebot's People

Contributors

pedrobmarin avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.