Reach
Entry point for Reach SDK
Static Member Summary
Static Public Members | ||
public static get |
static get audioBitrateMax() { The audio bitrate maximum Config#audioBitrateMax |
|
public static get |
The browser's details |
|
public static get |
codecs: {audio: Codec/audio, video: Codec/video}: {"audio": *, "video": *} The codec presets to use when setting Config#preferredAudioCodec or Config#preferredVideoCodec |
|
public static get |
The bitrate presets to use when setting Config#communicationQuality |
|
public static get |
events: { room: Events/Room, reach: Events/Reach, stream: Events/Stream, invite: Events/Invite, local: Events/Local }: {"room": *, "reach": *, "stream": *, "invite": *, "local": *} The supported events |
|
public static get |
Media utility functions |
|
public static get |
types: StreamTypes: * The supported stream types |
|
public static get |
Get versions of SDK and DataModel. |
|
public static get |
static get videoBitrateMax() { The audio bitrate maximum Config#videoBitrateMax |
Constructor Summary
Public Constructor | ||
public |
constructor(url: string | Webcom, cfg: Config) Create Reach's data structure where the url points to (might not be the root of your namespace) |
Member Summary
Public Members | ||
public get |
DataSync reference |
|
public get |
The configuration |
|
public get |
The connected User |
|
public get |
peerConnections: *: * Get a list of all opened PeerConnections |
Method Summary
Public Methods | ||
public |
Sign-in an anonymous user |
|
public |
Create a new room |
|
public |
Get a Room from its |
|
public |
Get a User from its |
|
public |
Get the list of invites |
|
public |
Sign-in an existing user |
|
public |
Logout current user |
|
public |
on(event: string, callback: function, cancelCallback: Webcom/api.Query~cancelCallback) Register a callback for a specific event |
|
public |
Register & Sign-in as a new user |
|
public |
Resume previous session |
Static Public Members
public static get audioBitrateMax: audioBitrateMax: * source
static get audioBitrateMax() { The audio bitrate maximum Config#audioBitrateMax
public static get codecs: {audio: Codec/audio, video: Codec/video}: {"audio": *, "video": *} source
The codec presets to use when setting Config#preferredAudioCodec or Config#preferredVideoCodec
public static get communicationQuality: communicationQuality: * source
The bitrate presets to use when setting Config#communicationQuality
public static get events: { room: Events/Room, reach: Events/Reach, stream: Events/Stream, invite: Events/Invite, local: Events/Local }: {"room": *, "reach": *, "stream": *, "invite": *, "local": *} source
The supported events
Return:
{ room: Events/Room, reach: Events/Reach, stream: Events/Stream, invite: Events/Invite, local: Events/Local } |
public static get version: {sdk: string, schema: string}: {"sdk": *, "schema": *} source
Get versions of SDK and DataModel. The Schema version can be used to determine compatibility with the Android & iOS SDK.
public static get videoBitrateMax: videoBitrateMax: * source
static get videoBitrateMax() { The audio bitrate maximum Config#videoBitrateMax
Public Constructors
public constructor(url: string | Webcom, cfg: Config) source
Create Reach's data structure where the url points to (might not be the root of your namespace)
Example:
var myReach = new Reach('https://io.datasync.orange.com/base/<my_namespace>');
var myReach = new Reach('https://io.datasync.orange.com/base/<my_namespace>', {
constraints: Reach.media.constraints('SD'),
logLevel: 'INFO'
});
Public Members
Public Methods
public anonymous(name: string): Promise<User> source
Sign-in an anonymous user
Params:
Name | Type | Attribute | Description |
name | string | The display name of the user |
public createRoom(name: string, extra: object, publicRoom: boolean): Promise<Room> source
Create a new room
public getRoom(uid: string): Promise<Room> source
Get a Room from its uid
Params:
Name | Type | Attribute | Description |
uid | string | The room's UID |
public getUser(uid: string): Promise<User> source
Get a User from its uid
Params:
Name | Type | Attribute | Description |
uid | string | The user's UID |
public login(email: string, password: string, name: string, rememberMe: boolean): Promise<User> source
Sign-in an existing user
public on(event: string, callback: function, cancelCallback: Webcom/api.Query~cancelCallback) source
Register a callback for a specific event
Params:
Name | Type | Attribute | Description |
event | string | The event name (Events/Reach). Can be:
|
|
callback | function | The callback for the event, the arguments depends on the type of event: |
|
cancelCallback | Webcom/api.Query~cancelCallback |
|
The error callback for the event, takes an Error as only argument |