Created on 04 July 2022
icon_unfollowing
Login to follow
rtcplugin-oml

RTCPlugin

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded on 04 July 2022 by 
rtcplugin-oml

RTCPlugin

Details
Peer-To-Peer messaging based on WebRTC
Read more

The plugin is implemented without any other technologies than Outsystems. No public signaling services for WebRTC (e.g. pusher).

It works in a Local Network, and also it can connect users behind NAT. The plugin is using a public free TURN server to serve iceCandidates behind NAT. In production cases this should be replaced with some commercial one to make all connections reliable (free services might go offline). So, if for some reason a communication is not established then it is probably it, and starting over might help. But I did not have any issues during my testing. Anyway, you can provide a json with iceServers.


Tech details:


Events:

  • OnChannelOpen (when channel is ready for communication)
  • OnChannelClose
  • OnMessage


Public client actions:

  • SendMessage (sends a message to the remote party)
  • CreateConnection


Public server actions:

  • ClearConnection - Deletes all information from DB for a given Connection
  • ClearConnections - Deletes all information from DB for all Connections


The application needs only these events and methods. All the WebRTC magic happens inside the plugin.


Usage: 

Create an Entity with a relation connecting your Screen (e.g. FormId) with ConnectionId (long integer). For example MyFormConnection

When a caller (client) initiate a connection, the DB record should be crated in MyFormConnection

Drag'n'Drop RTCPlugin control to your screen/control. If this is a caller (client), assign ConnectionId to NullIdentifier. If it is an accepter (receiver), assign ConnectionId from your MyFormConnection entity.

Use events to be informed when connection is available or closed.

Use client action SendMessage to send message to the other party. If you are client, the message will be send to a accepter (receiver) and vs.

Check the Demo app for working example.


HowTo: (demo app)

You can open the app in two browsers/tabs/(browser+phone). On the first device choose to act as a user, on the second one -- as a Support agent.

 You will see a start page where you can login as a user, who needs support or as a Support Agent.

A user will see a form and the button "Ask Support Agent to help". 

A Support agent will see a list of the requests. When a user presses a button  "Ask Support Agent to help", the agent should see a new request record.

When an agent clicks a request record he/she is redirected to the user's form. When a connection is established, the form fields become enabled and an agent can start filling the form. And at the same time a user will see the changes the agent makes in real time.

 When an agent leaves the form,  the request changes its state to Completed. When a user leaves the request, the request changes its state to Canceled.

Release notes (1.0.0)
Reviews (1)
by 
8 Jan
in version 1.0.0
In reactive demo not working as expected 
Category
Demos & samples, User interface
Tags
Support options
This asset is not supported by OutSystems. You may use the discussion forums to leave suggestions or obtain best-effort support from the community, including from  who created this asset.
Dependencies
RTCPlugin has no dependencies.
Application Objects
RTCPlugin has 4 AOs.
Team
Compatible with
Version 11
11.14.0 or higher
Database:
All
Asset consumers
No consumers yet.
Weekly downloads