• English
  • Français

Class ApideoConnection


public class ApideoConnection
The ApideoConnection object represents a connection to your Apideo account. You use the Apideo connection object to access instances of the ApideoRoom class. ApideoConnection objects are created using the Apideo.connect function. Do not call the constructor directly.
Defined in apideo.js

Function Summary
public ApideoRoom joinRoom (string room_name, JsonObject user_obj, string security_token, JsonObject options)
Connects to the specified room.
public bool quitRoom (ApideoRoom room)
Quits the room.

Function Details

function joinRoom

public ApideoRoom joinRoom(string room_name, JsonObject user_obj, string security_token, JsonObject options)
Connects to the specified room. Returns an ApideoRoom object. This method expects the room_name, and optionnally; - the object descrining the user - a security token - a set of parameters, passed as a JSON object. Each parameter is optionnal: { "protocol": ["rtmp"|"rtmpt"], // The protocol to use to connect to Apideo. Can be one of: "rtmp", "rtmpt", "rtmps". Default value is "rtmp" and you should keep the default value unless you know what you are doing. Apideo will automatically fall back in rtmpt in case of communication problems. "port": null // The port number the application should connect to. This should always be null, unless you are an Apideo core developer
Parameters:
room_name - The name of the room to join
user_obj (optional) - An object describing the current user, that could be retrieved by other members of the room using ApideoRoom.onNewUser
security_token (optional) - The security token to use for the room. Security tokens grant permissions on the room if you enabled security via token on your Apideo key.
options (optional) - A set of options passed to create the room. See the details above.
Returns:
{ApideoRoom} an ApideoRoom object

function quitRoom

public bool quitRoom(ApideoRoom room)
Quits the room. Any camera or stream started in the room will be automatically closed. Returns true on if the room is indeed closing, and false if it was already closed.
Parameters:
room - The ApideoRoom object to quit.