2018-05-21 20:48:24 +00:00
|
|
|
|
// User invite statuses
|
|
|
|
|
|
2018-05-16 15:03:10 +00:00
|
|
|
|
/**
|
|
|
|
|
* Тhe status for a participant when it's invited to a conference.
|
|
|
|
|
*
|
|
|
|
|
* @type {string}
|
|
|
|
|
*/
|
|
|
|
|
export const INVITED = 'Invited';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Тhe status for a participant when a call has been initiated.
|
|
|
|
|
*
|
|
|
|
|
* @type {string}
|
|
|
|
|
*/
|
2018-05-22 19:37:57 +00:00
|
|
|
|
export const CALLING = 'calling';
|
2018-05-16 15:03:10 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Тhe status for a participant when the invite is received and its device(s)
|
|
|
|
|
* are ringing.
|
|
|
|
|
*
|
|
|
|
|
* @type {string}
|
|
|
|
|
*/
|
2018-05-22 19:37:57 +00:00
|
|
|
|
export const RINGING = 'ringing';
|
2018-05-16 15:03:10 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* A status for a participant that indicates the call is connected.
|
2018-05-21 20:48:24 +00:00
|
|
|
|
*
|
|
|
|
|
* @type {string}
|
|
|
|
|
*/
|
|
|
|
|
export const CONNECTED_USER = 'connected';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The status for a participant when the invitation is received but the user
|
|
|
|
|
* has responded with busy message.
|
|
|
|
|
*
|
|
|
|
|
* @type {string}
|
|
|
|
|
*/
|
2018-05-22 19:37:57 +00:00
|
|
|
|
export const BUSY = 'busy';
|
2018-05-21 20:48:24 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The status for a participant when the invitation is rejected.
|
|
|
|
|
*
|
|
|
|
|
* @type {string}
|
|
|
|
|
*/
|
2018-05-22 19:37:57 +00:00
|
|
|
|
export const REJECTED = 'rejected';
|
2018-05-21 20:48:24 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The status for a participant when the invitation is ignored.
|
|
|
|
|
*
|
|
|
|
|
* @type {string}
|
|
|
|
|
*/
|
2018-05-22 19:37:57 +00:00
|
|
|
|
export const IGNORED = 'ignored';
|
2018-05-21 20:48:24 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The status for a participant when the invitation is expired.
|
|
|
|
|
*
|
|
|
|
|
* @type {string}
|
|
|
|
|
*/
|
2018-05-22 19:37:57 +00:00
|
|
|
|
export const EXPIRED = 'expired';
|
2018-05-21 20:48:24 +00:00
|
|
|
|
|
|
|
|
|
// Phone call statuses
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* A status for a participant that indicates the call is in process of
|
|
|
|
|
* initialization.
|
2018-05-16 15:03:10 +00:00
|
|
|
|
* NOTE: Currently used for phone numbers only.
|
|
|
|
|
*
|
|
|
|
|
* @type {string}
|
|
|
|
|
*/
|
2018-05-21 20:48:24 +00:00
|
|
|
|
export const INITIALIZING_CALL = 'Initializing Call';
|
2018-05-16 15:03:10 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* A status for a participant that indicates the call is in process of
|
|
|
|
|
* connecting.
|
|
|
|
|
* NOTE: Currently used for phone numbers only.
|
|
|
|
|
*
|
|
|
|
|
* @type {string}
|
|
|
|
|
*/
|
|
|
|
|
export const CONNECTING = 'Connecting';
|
|
|
|
|
|
|
|
|
|
/**
|
2018-05-21 20:48:24 +00:00
|
|
|
|
* A status for a participant that indicates the call is in process of
|
|
|
|
|
* connecting.
|
|
|
|
|
* NOTE: Currently used for phone numbers only.
|
|
|
|
|
*
|
|
|
|
|
* @type {string}
|
2018-05-16 15:03:10 +00:00
|
|
|
|
*/
|
2018-05-21 20:48:24 +00:00
|
|
|
|
export const CONNECTING2 = 'Connecting*';
|
|
|
|
|
|
2018-05-16 15:03:10 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2018-05-21 20:48:24 +00:00
|
|
|
|
* A status for a phone number participant that indicates the call is connected.
|
|
|
|
|
*
|
|
|
|
|
* @type {string}
|
2018-05-16 15:03:10 +00:00
|
|
|
|
*/
|
2018-05-21 20:48:24 +00:00
|
|
|
|
export const CONNECTED_PHONE_NUMBER = 'Connected';
|
|
|
|
|
|
2018-05-16 15:03:10 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2018-05-21 20:48:24 +00:00
|
|
|
|
* A status for a participant that indicates the call is disconnected.
|
|
|
|
|
* NOTE: Currently used for phone numbers only.
|
|
|
|
|
*
|
|
|
|
|
* @type {string}
|
2018-05-16 15:03:10 +00:00
|
|
|
|
*/
|
2018-05-21 20:48:24 +00:00
|
|
|
|
export const DISCONNECTED = 'Disconnected';
|
2018-05-16 15:03:10 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Maps the presence status values to i18n translation keys.
|
|
|
|
|
*
|
|
|
|
|
* @type {Object<String, String>}
|
|
|
|
|
*/
|
|
|
|
|
export const STATUS_TO_I18N_KEY = {
|
2018-05-21 20:48:24 +00:00
|
|
|
|
[INVITED]: 'presenceStatus.invited',
|
|
|
|
|
[RINGING]: 'presenceStatus.ringing',
|
|
|
|
|
[CALLING]: 'presenceStatus.calling',
|
|
|
|
|
[BUSY]: 'presenceStatus.busy',
|
|
|
|
|
[REJECTED]: 'presenceStatus.rejected',
|
|
|
|
|
[IGNORED]: 'presenceStatus.ignored',
|
|
|
|
|
[EXPIRED]: 'presenceStatus.expired',
|
|
|
|
|
|
|
|
|
|
[INITIALIZING_CALL]: 'presenceStatus.initializingCall',
|
|
|
|
|
[CONNECTING]: 'presenceStatus.connecting',
|
|
|
|
|
[CONNECTING2]: 'presenceStatus.connecting2',
|
|
|
|
|
[CONNECTED_PHONE_NUMBER]: 'presenceStatus.connected',
|
2018-06-26 22:56:22 +00:00
|
|
|
|
[CONNECTED_USER]: 'presenceStatus.connected',
|
2018-05-21 20:48:24 +00:00
|
|
|
|
[DISCONNECTED]: 'presenceStatus.disconnected'
|
2018-05-16 15:03:10 +00:00
|
|
|
|
};
|