Javascript library to interface with a Rhythm Server
npm install rhythm-client
- Connect to a rhythm server
const RhythmClient = require('rhythm-client')
var rc = new RhythmClient({
serverUrl: 'server-url',
serverEmail: 'server-email',
serverPassword: 'server-password'
})
rc.connect().then(function () {
console.log("connected!")
})
- Create a new meeting
rc.connect().then(function () {
assert(rc.connected === true)
var meeting = {id: 'meeting-id'}
var participants = [{uuid: 'p1uuid', consent: true}, {uuid: 'p2uuid', consent: true}]
rc.startMeeting(meeting, participants, {}).then(function (result) {
if (result) {
console.log("Started a meeting!")
}
}).catch(function (err) {
console.log("something went wrong.")
})
})
- Send speaking events
rc.sendSpeakingEvent("participant-id", 15840383299, 15840383302)
.then(function (result) {
console.log("speaking object made!", result)
}).catch(function (err) {
console.log("ran into a problem", err)
})
MIT