ProConfManager
ProCONF Web SDK Library Singleton class responsible for handling ProCONF SDK library.
Kind: global class
- ProConfManager
- instance
- .init(initOptions) ⇒
Promise - .createConnection(proconfToken) ⇒
Promise - .joinRoom(room, [password]) ⇒
void - .leaveRoom(room) ⇒
void - .endRoom(room) ⇒
void - .createLocalTracks(createLocalTrackOptions) ⇒
Promise - .createTrackFromMediaStreamTrack(mediaStreamTrack) ⇒
- .getCallCapablities(connection) ⇒
- .getAppCapablities(connection) ⇒
any
- .init(initOptions) ⇒
- static
- instance
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
| Param | Type | Description |
|---|---|---|
| initOptions | InitOptions | The 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
| Param | Type | Default | Description |
|---|---|---|---|
| proconfToken | string | null | The 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.
| Param | Type | Description |
|---|---|---|
| room | Room | The Room to join. |
| [password] | string | The 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.
| Param | Type | Description |
|---|---|---|
| room | Room | The Room to join. |
proConfManager.endRoom(room) ⇒ void
Ends the current room.
Kind: instance method of ProConfManager
Throws:
- ProConfError if the room is not initialized.
| Param | Type | Description |
|---|---|---|
| room | Room | The 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
| Param | Type | Description |
|---|---|---|
| createLocalTrackOptions | CreateLocalTrackOptions | The 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.
| Param | Type | Description |
|---|---|---|
| mediaStreamTrack | MediaStreamTrack | The 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.
| Param | Type | Description |
|---|---|---|
| connection | Connection | The 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.
| Param | Type | Description |
|---|---|---|
| connection | Connection | The 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.