1.0.0-beta.0 • Published 2 years ago

@blendvision/conference v1.0.0-beta.0

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

BlendVision One Meeting SDK

This SDK can help us to join the meeting with BlendVision One

How to Install?

You can install BlendVision One Meeting SDK through npm:

npm install @blendvision/conference@1.0.0-beta.0

How to initialize the SDK and join the meeting room

Initialize the SDK and join the meeting:

  const meeting = Conference('conferenceTarget', {
    license,
    media: {
      id: 'uuid',
      token: 'jwtToken',
      name: 'Meeting Name',
    }
  }

Parameters:

  • The first argument is the target element's id. In this example, our id is conferenceTarget:
<div id="conferenceTarget" style="width: 100%; height: 100%"></div>

By the way, we recommend that you set width/height to 100%.

  • license: get from BlendVision One.

  • media: call the following API from BlendVision One, you'll get the necessary created meeting room info to join

GET `/bv/cms/v1/meetings/{id}/sessions`

And the response.data is:

// response
{
    "id": "d299d68045a64c5f97853cfc7c60ca39",
    "name": "Amazing Meeting",
    "token": "${token}"
}

How to leave the meeting room and release the SDK

Leave the meeting room and release the SDK.

meeting.release()

Integration Example

const host = 'https://api.one.blendvision.com'
const bvToken = 'jwtToken' // From BlendVision One
const url = `${host}/bv/playback/v1/sessions/`
const headers: {
  Authorization: token,
  'Content-type': 'application/json'
}
const data = await axios(url, {method: 'GET', headers})

const license = 'license' // From BlendVision One


// Initialize the SDK and join the meeting room
const meeting = Conference('conferenceTarget', {
  license,
  media: data
}
<div id="conferenceTarget"></div>