-
Signaling Events
-
Streams Events
-
Data Channels Events
eventstypesvaluesparameters/argumentsfunctions/methodspropertiesFunctions
onBistriConferenceReady = function(){…}
onBistriConferenceReady() is called when the JavaScript SDK has been loaded and is ready to use.Return
void.
Usage:
var onBistriConferenceReady = function(){
// your code goes here
};
Objects
BistriConference
version
string
Usage:
console.log( BistriConference.version ); ➥ "3.0.b-647efef"
init( conf )
Return
void.
Usage:
BistriConference.init( {
appId: "125...445",
appKey: "edhh64...99v35",
userName: "John Doe"
} );
Parameters:
conf:object, JavaScript SDK settings.
Configuration keys:appId:string, your application id (mandatory).appKey:string, your application key (mandatory).userId:string, user ID (optional). If no ID is passed, the server will generate its own “technical” IDuserName:string, user display name (optional). Default value is""debug:boolean, allow to log some information (optional). Default value isfalse
Note: your application ID and application Key could be retreived from your developer account
➥ https://api.developers.bistri.com/admin/applications
connect()
Return
void.
Usage:
BistriConference.connect();
Event onConnected is triggered when the session has been successfully opened, otherwise event onError is triggered.
disconnect()
Return
void.
Usage:
BistriConference.disconnect();
Event onDisconnected is triggered when the session has been closed.
joinRoom( roomName )
Return
void.
Usage:
BistriConference.joinRoom( "my_conference_room" );
Parameters:
roomName:string, room to join.
If the room doesn’t exist, it will be created.
Event onJoinedRoom is triggered when user has successfully joined the room, other members already present into the room will receive an event onPeerJoinedRoom.
Otherwise event onJoinRoomError is triggered
quitRoom( roomName )
Return
void.
Usage:
BistriConference.quitRoom( "my_conference_room" );
Parameters:
roomName:string, room to quit
Event onQuittedRoom is triggered when the user has leaved the room, other room members will receive event onPeerQuittedRoom.
Otherwise an event onQuitRoomError is triggered.