2020 API AWARDS WINNER - BEST IN MEDIA APIs LEARN MORE

Using Invitations

This article describes the process of inviting participants to a conference.

All application users can join a conference using the create or fetch methods to obtain the conference object, as described in the Conferencing article. The Dolby Interactivity APIs also allow users to obtain conference information using invitations. This option requires:

  • Using the application users' external IDs in the application
  • Sending invitations only while being in a conference
  • Opening a session to be able to receive a conference invitation

Workflow:

  • JavaScript
  • Swift
  • Java

1. The inviter creates and joins a conference.

2. The application users, who want to participate at the conference, open sessions and add event listeners for the invitation event. The invitation contains the following properties:

  • The conference alias
  • The conference ID
  • The information about participant who sends the invitation
VoxeetSDK.notification.on("invitation", invitation => {
  //join conference here
  VoxeetSDK.conference.fetch(invitation.conferenceId).then(conference => {
    VoxeetSDK.conference
      .join(conference, {})
      .then(() => console.log("conference joined!"))
  })
})

The code example includes methods that allow the application users to join the conference after receiving the invitation. For more information about joining conferences, see the Conferencing article.

Note: The Dolby Interactivity APIs platform does not provide a notification system that informs when an application user opens a session. Manage the notification through your application. If a user does not have an open session, when the inviter sends the invitation, the user will not receive the invitation. The inviter has to resend the invitation.

3. The inviter invites the application users using an array of ParticipantInfo objects. The inviter can send invitations to multiple participants using a single invite request.

VoxeetSDK.conference.invite(conference: Conference, participants: Array�ParticipantInfo�): Promise�any�

When the inviter sends invitations, the server adds the invited participants to the conference with the Reserved status. All conference participants receive the participantAdded event.

4. When the conference participants receive invitations, the application calls the callback registered in the event listener and the participants automatically join the conference. The server sends the participantUpdated event with the Connecting status.

1. The inviter creates and joins a conference.

2. The application users, who want to participate at the conference, open sessions and add event listeners for the invitation event. The invitation contains the following properties:

  • The conference alias
  • The conference ID
  • The information about participant who sends the invitation
VoxeetSDK.shared.notification.delegate = self
extension YourClass: VTNotificationDelegate {
    func invitationReceived(notification: VTInvitationReceivedNotification) {
        VoxeetSDK.shared.conference.fetch(conferenceID: notification.conferenceID) { conference in
            VoxeetSDK.shared.conference.join(conference: conference, options: nil, success: { _ in }, fail: { _ in })
        }
    }
}

The code example includes methods that allow the application users to join the conference after receiving the invitation. For more information about joining conferences, see the Conferencing article.

Note: The Dolby Interactivity APIs platform does not provide a notification system that informs when an application user opens a session. Manage the notification through your application. If a user does not have an open session, when the inviter sends the invitation, the user will not receive the invitation. The inviter has to resend the invitation.

3. The inviter invites the application users using their external IDs.

let participantInfo = VTParticipantInfo()

VoxeetSDK.shared.notification.invite(conference: conference, participantInfos: [participantInfo], completion: { error in })

When the inviter sends invitations, the server adds the invited participants to the conference with the Reserved status. All conference participants receive the participantAdded event.

4. When the conference participants receive invitations, the application calls the requested callback and the participants automatically join the conference. The server sends the participantUpdatedEvent with the Connecting status.

1. The inviter creates and joins a conference.

2. The application users, who want to participate at the conference, open sessions and add event listeners for the InvitationReceivedNotificationEvent event. The invitation contains the following properties:

  • The conference alias
  • The conference ID
  • The information about participant who sends the invitation
    @Subscribe(threadMode = ThreadMode.MAIN)
    public void onEvent(@NonNull InvitationReceivedEvent event) {
        Log.d(TAG, "InvitationReceivedEvent: event:=" + event.conferenceId + " " + event.conferenceAlias);
        VoxeetSDK.conference().fetchConference(event.conferenceId)
                .then((ThenPromise<Conference, Conference>) conference -> VoxeetSDK.conference().join(conference))
                .then(conference -> {
                    Log.d(TAG, "InvitationReceivedEvent: joined " + event.conferenceId);
                })
                .error(error -> Log.e(TAG, "InvitationReceivedEvent, error while joining", error));
    }

The code example includes methods that allow the application users to join the conference after receiving the invitation. For more information about joining conferences, see the Conferencing article.

Note: The Dolby Interactivity APIs platform does not provide a notification system that informs when an application user opens a session. Manage the notification through your application. If a user does not have an open session, when the inviter sends the invitation, the user will not receive the invitation. The inviter has to resend the invitation.

3. The inviter invites the application users using their external IDs.

VoxeetSDK.notification().invite(conference: Conference, participantOptions: List<ParticipantInfo>):

When the inviter sends invitations, the server adds the invited participants to the conference with the Reserved status. All conference participants receive the participantAddedEvent event.

4. When the conference participants receive invitations, the application calls the requested callback and the participants automatically join the conference. The server sends the participantUpdatedEvent event with the Connecting status.