Video conferencing in the collaboration module

The collaboration module includes the possibility of creating meetings where users can interact via audio/video.

The “Meetings” submodule allows users to manage meetings that can be integrated with the “Comments” feature. That is, users in a meeting can view, speak and/or write to each other.

VideoconferencingCapture
Meetings integrated with comments

A video conferencing provider is required for meetings. Several providers exist, and our intention is to use the meetings submodule as an abstraction layer that encapsulates the integration with these providers.

We have worked on integrating two providers with different characteristics:

  1. Jitsi
    An open source option that can be used as a free cloud service (using the meet.jit.si server) or can be deployed locally.

  2. Twilio
    A SaaS provider that requires each application instance to have a Twilio account to get application keys that are used to track consumption.

Several guidelines a developer should consider when selecting a video conferencing provider follow:

  1. Confidentiality and legal framework considerations
    Depending on the application, the data shared via the video conferencing application may be subject to confidentiality requirements, and laws governing the geographic location of servers may apply. These restrictions may limit the provider options.

  2. Feature requirements
    Video conferencing applications offer similar features, but the application may need special features that are available only in some of them, such as recording video, for example.

  3. Scalability
    This may be a concern, especially when considering deploying your own server.

  4. Cost
    This varies greatly depending on each scenario and on the infrastructure already available.

Requirements

This feature requires:

  1. That user's web browsers support the WebRTC API.
  2. That the connection with the server is done view the HTTPS protocol.

Configuration

This feature must be configured before using it. To configure the feature the developer must implement a few procedures.

The procedures return SDTs used by the module, whose fields are detailed below. The developer may load these SDTs as they see fit.

LoadMeetingsConfiguration

This procedure configures the submodule’s global configuration. In it the developer must load the following values:

  • Enabled: Determines if the submodule is active in this KB.

  • ImplementationWC: Determines which provider will be used, by specifying the name of the web component that will be used to show the meeting.
    Supported values for this property are shown in this table:

    Provider Generator Property Value
    Jitsi Java k2btools.meetings.meetingjitsiwc
    Jitsi .Net k2btools.meetings.meetingjitsiwc.aspx
    Twilio Java k2btools.meetings.meetingtwiliowc
    Twilio .Net k2btools.meetings.meetingtwiliowc.aspx

LoadJitsiConfiguration

This procedure is used to configure meetings using Jitsi. If this provider is not used, the procedure may be left blank.

The output fields are:

  • Domain: The domain name for the Jitsi server.

  • UseToken: Determines if JWT tokens will be used to implement authentication.

  • TokenKey: Contains the token key used to sign the JWT tokens. Only used if the previous parameter is set to True. This value must be encoded as an hexadecimal value (See this).

  • RoomNameTemplate: Contains a naming template for rooms. The value %ROOM_GUID% will be replaced by the meeting’s id.

  • UsePassword: Determines whether a password will be set to the Jitsi room. If set to true, the password will be generated and set automatically.

LoadTwilioConfiguration

This procedure is used to configure meetings using Twilio. If this provider is not used, the procedure may be left blank.

The output fields are:

  • ApiKeySid: Twilio key identification. See this page for more information.

  • ApiKeySecret: Twilio key value. See this page for more information. This value must be encoded as an hexadecimal value (See this).

  • AccountSid: Twilio account identification. See this page for more information.

  • RoomNameTemplate: Contains a naming template for rooms. The value %ROOM_GUID% will be replaced by the meeting’s id.

Encoding JWT keys as hexadecimal values

The GeneXusJWT library expects keys to be a character value containing the hexadecimal representation of the key. Both Twilio and Jitsi provide the key as a string that is not encoded this way, and this can lead to errors if the developer does not encode the value when passing it to the JWTCreator.

To encode the key, you can use this Powershell command (replace <key> below with the key that should be encoded):

("<key>" | Format-Hex | Select-Object -Expand Bytes | ForEach-Object { '{0:x2}' -f $_ }) -join ''