Android SDK Reference

Android SDK Reference

eventstypesvaluesparameters/argumentsfunctions/methodsproperties
?

Functions

 

onBistriConferenceReady = function(){…}

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

This property contains the JavaScript SDK version string 

Usage:

console.log( BistriConference.version );
➥ "3.0.b-647efef"

init( conf )

Initialize JavaScript SDK.
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” ID
    • userName: string, user display name (optional). Default value is ""
    • debug: boolean, allow to log some information (optional). Default value is false

Note: your application ID and application Key could be retreived from your developer account
https://api.developers.bistri.com/admin/applications

connect()

Open a new session on the server.
Return void

Usage:

BistriConference.connect();

Event onConnected is triggered when the session has been successfully opened, otherwise event onError is triggered.

disconnect()

Close the session.
Return void

Usage:

BistriConference.disconnect();

Event onDisconnected is triggered when the session has been closed.

joinRoom( roomName )

Enter a conference room. Note: the room is limited to 4 people.
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 )

Quit conference room.
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.