Exploring the SDK


In this section, you will get to know the details of Use Cases, Features of SDK, device selection, Logging, and observer properties.

Use Cases

Join Meeting

To join a Video/Audio meeting, use the following command.

webClientSDK.meetingService.joinMeeting("<MEETING_ID>","<PASSCODE>", "<DISPLAY_NAME>").then(() => {
   console.log("Success");
},(error)=>{
   console.error("Meeting join failed with error: ", JSON.stringify(error));
})
  • Alternatively, there is also a connection mode called "ScreenShareOnly" which permits solely sending and receiving the screen share without any audio or video functionality. You can refer to Screen Share Only Mode if needed.

Note:

BJNWebClientSDK connects the instance to the meeting ID. Also, there should be only one meeting instance of the SDK in the same web application, if you fail to join a meeting for some reason/join another meeting after leaving the first one, you need to reload the page.

Note

You can observe the join meeting API result by checking the connectionState on meetingService.

Attach Video View

Web Client SDK supports Video views for local video and remote video can be added to your webpage. Use the following steps to add a remote/local Video view to your webpage.

Pass a video element for local video as follows:

  • Local Video - Preview video for yourself.
webClientSDK.meetingService.attachLocalVideo("<localVideoElement>");

Pass a div element for :

  • Remote Video - You can see the video of other participants by receiving Video Share.
webClientSDK.meetingService.attachRemoteVideo("<remoteVideoDivElement>");

The other participants are displayed in multiple tiles/boxes alongside remote videos of the meeting.

List all Participant

To get a list of participants in a meeting, use participantService.participants property. It returns an array of participant

webClientSDK.meetingService.participantService.participants

Leave Meeting

Use the following command to end the meeting.

webClientSDK.meetingService.endMeeting();

Participant Self Audio/Video Mute

setAudioMuted/setVideoMuted method is used to mute/unmute your local audio/video.

webClientSDK.meetingService.setAudioMuted(boolean) //to unmute/mute self audio
webClientSDK.meetingService.setVideoMuted(boolean) // to mute/unmute self video

If you call the above code snippet true, will mute the local audio/video.

The audioMuteType/videoMutedType property of the Participant object specifies the type of audio mute that is applied.

localMuted will keep track of the audio/video mute state information, which will be updated whenever a participant mutes or unmutes themselves.

Call Quality

During a meeting, the quality of a participant's audio connection is an essential factor that can significantly impact effective communication and collaboration. The callQuality API is used to evaluate the audio connection quality of participants and provide an overview of its performance. callQuality is measured on a scale of 1 to 5, with 1 being poor connection quality and 5 representing excellent conditions. This scale provides an indication of the audio quality of the participant's network connectivity.

The Web Client SDK provides you with an API to check the current call quality of a meeting.

webClientSDK.meetingService.participantService.participants["<number>"].callQuality

Poor call quality can result in disruptions, delays, or difficulties in understanding speech, leading to a less productive meeting experience. In contrast, excellent call quality can promote clear and consistent communication and facilitate collaboration, leading to a more effective and efficient meeting. 

Observing Properties

Each service that has observable properties allows exposing observe API/Function. observe allows observing the changes to the property. Provide the property which you are interested in a call-back. Whenever the property value changes you will be notified via call-back.

Note: 

  • As mentioned in API Architecture section, inMeeting services get activated when the connectionState transition is CONNECTED. A sample example given below for registering the call-backs for inMeeting Services after connection state become connected.
    webClientSDK.meetingService.observe("connectionState", function() {
          console.info("Connection state is changed to :", webClientSDK.meetingService.connectionState)
        };
  • observe does not allow observing changes to methods mentioned in the services.