The Client API facilitates communications between EnableX Server and Client End-Point applications developed using EnableX Client Toolkits (e.g. Web, iOS, Android, React Native Toolkit). The Client API uses in bi-directional signaling and media flow control to select the best network path.
Client APIs are called from embedded Java Script Code/Native SDK code which runs in the client browsers/Native mobile application on desktop and mobile respectively. A lightweight Java Script Client SDK/Mobile SDK is required to be included in the client applications. The SDK provides API and associated helper functions to communicate with EnableX platform. Additionally, it also provides helper functions for monitoring client-side state of the RTC Session. Typical usage consists of connection to the desired room using the token retrieved in the back end (explained at Server API), management of local audio and video, Client event handling (room & stream level events), and so on.
Client API handles following four major entities:
- EnableX Room: It represents the client side session and is used to handle all room/session related events. It handles the connection, local stream publication and remote stream subscriptions. It creates the room object by passing the token this users have previously received from your service. This token has to be retrieved using the Server API, because it is a user access token.
- EnableX Stream: It represents the user (audio, video and/or data) stream, identify it, and where it should be drawn.
- Events: It represents an events related to client side entities:
- Room Events: It represents events related to room connection
- Stream Events: It represents events related to streams within a room
- Player: It represents the customizable UI element which can be used to render the stream in the DOM/View handler in the browser/Mobile SDK respectively.
Functions of Client-End-Point Application
- Utilizes Client SDKs/Libraries written in Java Script or Native SDKs
- Gets token from the Application Server
- Connects to the Room using token
- Publishes audio-video streams
- Subscribes to audio-video streams
- Listens for session events