Skip to main content

ProConfManager

ProCONF Web SDK Library Singleton class responsible for handling ProCONF SDK library.

Kind: global class

proConfManager.init(initOptions) ⇒ Promise

Initializes the ProCONF manager with the specified options.

Kind: instance method of ProConfManager
Fulfil: void
Reject: ProconfError On backend library load error

ParamTypeDescription
initOptionsInitOptionsThe initialization options for ProCONF SDK.

proConfManager.createConnection(proconfToken) ⇒ Promise

Creates a connection to the ProCONF backend.

Kind: instance method of ProConfManager
Returns: Promise - A Promise that resolves to the created Connection object.
Throws:

  • ProConfError if the connection is not initialized.

Fulfil: Connection object
Reject: ProconfError On create connection error

ParamTypeDefaultDescription
proconfTokenstringnullThe ProCONF token to be used for authentication.

Example

const proConfManager = ProConfManager.getInstance();

const connectionOptions = {
participantName: 'John Doe',
};

const token = '...'; // ProCONF token procurred from the backend
const connection = await proConfManager.createConnection(
token,
);

proConfManager.joinRoom(room, [password]) ⇒ void

Joins the room with the specified password.

Kind: instance method of ProConfManager
Throws:

  • ProConfError if the room is not initialized.
ParamTypeDescription
roomRoomThe Room to join.
[password]stringThe password required to join the room.

proConfManager.leaveRoom(room) ⇒ void

Leaves the current room.

Kind: instance method of ProConfManager
Throws:

  • ProConfError if the room is not initialized.
ParamTypeDescription
roomRoomThe Room to join.

proConfManager.endRoom(room) ⇒ void

Ends the current room.

Kind: instance method of ProConfManager
Throws:

  • ProConfError if the room is not initialized.
ParamTypeDescription
roomRoomThe Room instance to join.

proConfManager.createLocalTracks(createLocalTrackOptions) ⇒ Promise

Creates local media tracks based on the provided options. CreateLocalTrackOptions

Kind: instance method of ProConfManager
Returns: Promise - A promise that resolves with an array of LocalTrack objects representing the created local tracks.
Throws:

  • ProConfError if there is an error fetching the tracks.

Fulfil: LocalTrack track array
Reject: ProconfError On track creation error

ParamTypeDescription
createLocalTrackOptionsCreateLocalTrackOptionsThe options for creating local tracks.

proConfManager.createTrackFromMediaStreamTrack(mediaStreamTrack) ⇒

Creates local track from a MediaStreamTrack. To be used for screenshare mediaStreamTrack

Kind: instance method of ProConfManager
Returns: A promise that resolves to an array of LocalTrack objects.
Throws:

  • ProConfError if there is an error fetching the tracks.
ParamTypeDescription
mediaStreamTrackMediaStreamTrackThe MediaStreamTrack to create tracks from.

proConfManager.getCallCapablities(connection) ⇒

Retrieves the call capabilities from the provided connection.

Kind: instance method of ProConfManager
Returns: The call capabilities (supported feature) configuration.

ParamTypeDescription
connectionConnectionThe connection object.

proConfManager.getAppCapablities(connection) ⇒ any

Retrieves the app capabilities from the provided connection.

Kind: instance method of ProConfManager
Returns: any - The app capabilities (supported feature) configuration.

ParamTypeDescription
connectionConnectionThe connection object.

ProConfManager.getInstance() ⇒ ProConfManager

Returns the singleton instance of the ProConfManager class. If the instance does not exist, it creates a new instance and returns it.

Kind: static method of ProConfManager
Returns: ProConfManager - The singleton instance of the ProConfManager class.