This guide will outline the implementation process when outsourcing online video conferencing to MeetBit. Outsourcing means you are white labeling MeetBit Rooms to provide an online video conferencing feature to your own users.

MeetBit Rooms is MeetBit’s online video conferencing product. If you’re unfamiliar with what you can do with MeetBit Rooms, you may read more about it in its documentation here.

If you are using MeetBit’s other features like Meeting Links along with Online Conferencing, then this guide is not for you.

Use Cases

Some examples of use cases are:

  • You are building an online doctor appointment system and you are using MeetBit Rooms as video conferencing for online appointments.
  • You are building an online learning management system (LMS) and you are using MeetBit Rooms as video conferencing for online classes.

Pre-Requisites

Before you continue, make sure you meet the following:

MeetBit Rooms Provider

Later on, we’ll need to use the ID of the MeetBit Rooms Provider. This is usually 2, however to confirm this, open the MeetBit Admin Panel and open the providers page at https://customdomain.com/admin/providers. Look for the provider named “MeetBit Rooms” and click the “eye” icon to open its page. The ID we’re looking for should be at the end of the current URL.

MeetBitRoomsProvider

How to Find the MeetBit Rooms Provider ID

Resource Object Mapping

There are 4 MeetBit Resource Objects that must be mapped to your application’s resources.

  • Users
  • Customers
  • Online Conferences
  • Online Conference Attendees

Users

Mapping your users as MeetBit Users is explained in detail in a pre-requisite page. For video conferencing, map the subset of your users that are meant to “own” and control Online Conferences. Additionally, when mapping to the MeetBit User object, you must also take note of the online_conference_account_id to use when an Online Conference is created for that user.

To figure out which online_conference_account_id to use, we must find the User’s Online Conference Account that belongs to the MeetBit Room Provider:

1

Create User

An Online Conference Account for a User is automatically created everytime a new User is created.

POST /users
Content-Type: application/json
{ "active": true, "is_silent": true, "first_name": "James" }

Review the API Reference

2

Get the User's List of Connected Accounts

GET /users/{user_id}/connected_accounts

Review the API Reference

3

Find Connected Account for MeetBit Rooms

Using the MeetBit Rooms Provider ID we retrieved earlier, filter the User’s list of Connect Accounts by provider_id.

  const meetbit_rooms_provider_id = 2; // retrieved earlier
  const connected_accounts = []; // array of Connected Accounts from API
  const meetbit_rooms_connected_account = connected_accounts.find((connected_account) => {
    return connected_account.provider_id === meetbit_rooms_provider_id
  })

  const connected_account_id = meetbit_rooms_connected_account?.id;
4

Get the User's List of Online Conference Accounts

GET /users/{user_id}/online_conference_accounts

Review the API Reference

5

Find Online Conference Account for MeetBit Rooms

Using the Connected Account ID we retrieved in an earlier step, filter the User’s list of Online Conference Accounts by connected_account_id.

  const connected_account_id = 123; // retrieved earlier
  const online_conference_accounts = []; // array of Online Conference Accounts from API
  const meetbit_rooms_online_conference_account = online_conference_accounts.find((online_conference_account) => {
    return online_conference_account.connected_account_id === connected_account_id
  })
  
  const online_conference_account_id = meetbit_rooms_online_conference_account?.id;
6

Save Online Conference Account ID

Save the Online Conference Account ID in your database as an attribute of your user resource object.

Since your users are not meant to interact with MeetBit directly, make sure the following are met when creating a user:

Customers

Mapping a subset of your users as MeetBit Customers is also explained in the same pre-requisite page. However, this is completely optional and depends highly on your use case. As a general guide map the subset of your users as MeetBit Customers if they are meant to join Online Conferences but are not allowed to control them.

Online Conferences

Mapping MeetBit Conferences to a resource object in your application is highly dependent on your use case. For online doctor appointments, the appointment itself must be mapped to the MeetBit Online Conference. For an LMS on the other hand, online class sessions must be mapped to the MeetBit Online Conference.

Whatever resource object in your application you end up mapping to, you must attach the Online Conference ID to that resource object. You must also ensure parity across both systems by also performing update and delete actions to the Online Conference when these are performed on your application.

Online Conference Attendees

Mapping MeetBit Online Conference Attendees to a resource object in your application is also highly dependent on your user case. The most basic way is to create a pivot table between your users table and whatever resource object you’re mapping to MeetBit Online Conferences. This pivot should show the attendee relationship and map to MeetBit Online Conference Attendees.

Creating Online Conferences

When you should create Online Conferences in MeetBit is dependent on your use case. As an example, let’s say you’re building an LMS where Instructors can create adhoc class sessions. The flow of this process would look something like this:

To explain the above process flow:

  1. Instructor Creates a Session through your frontend application.

  2. Your backend application receives this request and queries the instructor’s data from your database. This is so you’re able to get your instructor’s MeetBit Online Conference Account ID.

  3. Using the Online Confeence Account ID, and other datils about the class session, you create a MeetBit Online Conference.

    To prevent random people from joining your Online Conference, make sure to set the is_public field to false when creating the Online Conference.

    In this step, MeetBit also automatically creates an Online Conference Attendee for the instructor.

  4. You query the Online Conference’s attendees to get the instructor’s Online Conference Attendee ID

  5. You save the Online Conference ID and the Online Conference Attendee ID in your database along with any other data required.

  6. The operation is a sucess and you display this to the user.

Another scenario for creating Online Conferences is for a class’s fixed schedule. An approach for this is to create a daily CRON job that creates Online Conferences in MeetBit that map to class sessions for the day.

Creating Attendees

Creating Online Conference Attendees is still highly dependent on your use case. However, keep in mind that you should not create attendees ahead of time for users mapped to MeetBit Customers. Instead, you should create these attendees right before they join the Online Conference.

This is because Customers can enter a MeetBit Room by providing their registered email in the entry page. Thus, a Customer that is pre-registered as an attendee to a non-public MeetBit Room, can enter the room outside your intended flow if they know the MeetBit Room URL.

This isn’t an issue for MeetBit Users as they can only join by using a Join Token (or if they are already authenticated through the MeetBit Admin Panel, but this isn’t relevant to this use case).

You must manage who and when your users can join an Online Conference yourself and use the Join Token explained in the next section to actually allow them to enter.

Joining an Online Conference

MeetBit Rooms is a web application. Thus, you will have to redirect your users to the MeetBit Rooms URL along with their Join Token in the query parameters.

If you’re building a mobile application, MeetBit supports WKWebView for iOS and Chromium WebView for Android to launch the MeetBit Rooms in an in-app browser. Or, you may simply open the URL in their default browser. For a list of supported devices see Supported Devices

The Join Token authenticates your user into the MeetBit Rooms as an Online Conference Attendee and allows them to interact with others inside (if they’re the owner, they can also control the room).

Assuming you have a “Join Call” button (or something similar) within your application, the flow will look something like this:

To explain the above process flow:

  1. The user clicks on the “Join” button in your frontend application.

  2. The backend receives this request and:

    If the user is Customer-mapped & is not mapped to an Online Conference Attendee:

    If the user is User-mapped & is already mapped to an Online Conference Attendee:

    • Gets the user’s MeetBit Online Conference Attendee ID from your database
  3. You generate an Online Conference Join Token using the Online Conference Attendee ID.

  4. You build the MeetBit Rooms URL in the backend following this format

      https://{custom_domain.com}/rooms/{public_id}?token={token}
    
  5. The frontend application receives this URL and redirects the user to it.

  6. The user can now interact with the MeetBit Room.

    The user is first directed to the MeetBit Room Setup Page where they can preview their device configurations. From there, they can then manually join the room.

Preventing Joins

As explained in a previous section, your application must manage who and when your users can join. This will depend on your user experience flow but MeetBit helps you prevent joins outside the intended flow through the Join Token and by following these rules:

  • The Join Token must be generated only when users are about to join the Online Conference.

    Join Tokens also expire quickly so don’t save this in the database. If you need to let a user rejoin a call, just generate a new Join Token.

  • Customer-mapped users must only be added as an Online Conference Attendee when they’re about to join the Online Conference.

    You can always add them as attendees in your application anytime. Just don’t call the Create Online Conference Attendees endpoint until they’re about to join.

  • Do not provide the MeetBit Room URL beforehand.

    If you are sending a “video conferencing link” to users beforehand, send them a link to your application where you can handle the join logic yourself. If they’re allowed to join, redirect them to the MeetBit Room URL with their join token. If not, you can show an error page.