npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bbb-rooms

v0.1.0

Published

bigbluebutton promise api with simple persistant rooms

Downloads

9

Readme

bbb-rooms

bigbluebutton promise api with simple persistant rooms

(Pseudo) persistant rooms:

Hint: there are no persistant rooms, once a conference is idle bbb will close it. This API however checks if the room exists, and will create it if it does not. For the user the room will therefor appear persistant.

joinPersitantRoom( joinOpts, createOpts )

Note: the options are kept separate intentionally. That way this module is much more future proof.

Creates the room (idempotent operation), then join. Session cookie returned as res.join.cookie (needs to be set before using URL!)

const BbbApi = require("bbb-rooms");
const bbbApi = new BbbApi( "bbb.example.com", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" );
bbb.joinPersitantRoom( {
    meetingID: "euroforth",
    fullName: "Gerald Wodni",
    password: "oneone",
    redirect: false,
}, {
    name: "EuroForth",
    meetingID: "euroforth",
    attendeePW: "oneone",
    moderatorPW: "twotwo",
    freeJoin: true,
})
.then( res => console.log( res.join ) )
.catch( err => console.log( "OH NOES:", err ) );

joinPersitantRoomUrl( joinOpts, createOpts )

Like joinPersitantRoom but used for cases where the session cookie cannot be set i.e. cross domain requests.

Creates the room (idempotent operation), then generates join url.

bbb.joinPersitantRoomUrl( {
    meetingID: "euroforth",
    fullName: "Gerald Wodni",
    password: "oneone",
    redirect: true, // here we do want bbb to redirect the user to the proper session
}, {
    name: "EuroForth",
    meetingID: "euroforth",
    attendeePW: "oneone",
    moderatorPW: "twotwo",
    freeJoin: true,
})
.then( res => console.log( res.join ) )
.catch( err => console.log( "OH NOES:", err ) );

Standard API (promisified)

See bigbluebutton api documentation for the most up-to-date parameters and their usage.

constructor( hostname, secret )

const BbbApi = require("bbb-rooms");
const bbbApi = new BbbApi( "bbb.example.com", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" );

create( params )

create a new meeting using GET

bbbApi.create({
    name: "EuroForth",
    meetingID: "euroforth",
    attendeePW: "oneone",
    moderatorPW: "twotwo",
    freeJoin: true, // allow choice of breakout rooms

    allowModsToUnmuteUsers: true,
    logoutURL: "https://euro.theforth.net",
    meetingLayout: "PRESENTATION_FOCUS",
})
.then( res => console.log( "RES:", res ) )
.catch( err => console.log( "OH NOES:", err ) );

createWithSlides( params, slides )

create a new meeting using POST (allows slide upload)

bbbApi.createWithSlides({
    name: "EuroForth",
    meetingID: "euroforth",
    attendeePW: "oneone",
    moderatorPW: "twotwo",
    freeJoin: true, // allow choice of breakout rooms
},[
    { url: "https://example.com/slides.pdf",  filename: "slides.pdf"  },
    { url: "https://example.com/slides2.pdf", filename: "slides2.pdf" },
])
.then( res => console.log( "RES:", res ) )
.catch( err => console.log( "OH NOES:", err ) );

join( params )

join existing meeting

Join as attendee

bbbApi.join({
    meetingID: "euroforth",
    fullName: "Gerald Wodni",
    password: "oneone", // note: use attendeePW from create
    redirect: false, // give us the xml, so we can handle the url
    avatarURL: "https://gravatar.com/avatar/c2a44082e5c02c04212c34d64c5fa9c5/64/retro", // gravatar, you might want to proxy that for privacy reasons
})
.then( res => console.log( "RES:", res ) )
.catch( err => console.log( "OH NOES:", err ) );

See bigbluebutton customization documentation for details on how to make bbb not look so bland.

Join as moderator (with customization)

bbbApi.join({
    meetingID: "euroforth",
    fullName: "Chuck Moore",
    password: "twotwo", // note: use moderatorPW from create
    "userdata-bbb_auto_join_audio": true,
    "userdata-bbb_client_title": "EuroForth",
    "userdata-bbb_show_public_chat_on_login": false,
    "userdata-bbb_force_restore_presentation_on_new_events": true,
    "userdata-bbb_custom_style": "body{background-color:#800!important;}",
})
.then( res => console.log( "RES:", res ) )
.catch( err => console.log( "OH NOES:", err ) );

getMeetings()

get a list of meetings

bbbApi.getMeetings()
.then( res => console.log( "RES:", res ) )
.catch( err => console.log( "OH NOES:", err ) );

getMeetingInfo( params )

get detailed meeting info including a list of attendees

bbbApi.getMeetingInfo({
    meetingID: "euroforth",
})
.then( res => console.log( "RES:", res ) )
.catch( err => console.log( "OH NOES:", err ) );

isMeetingRunning( params )

check if meeting is running

bbbApi.isMeetingRunning({
    meetingID: "euroforth",
})
.then( res => console.log( "RES:", res ) )
.catch( err => console.log( "OH NOES:", err ) );

end( params )

forcefully end meeting

bbbApi.end({
    meetingID: "euroforth",
    password: "twotwo", // provide moderator password
})
.then( res => console.log( "RES:", res ) )
.catch( err => console.log( "OH NOES:", err ) );