Skip to content

HumanDynamics/rhythm-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rhythm-client

Javascript library to interface with a Rhythm Server

Installation

npm install rhythm-client

usage

  1. 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!")
})
  1. 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.")
  })
})
  1. 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)
  })

License

MIT

About

Javascript library to interface with a Rhythm Server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published