nexmo-stitch
Advanced tools
Comparing version 1.0.13 to 1.0.14
@@ -1,16 +0,32 @@ | ||
# 1.0.13 | ||
# Changelog | ||
## Additions | ||
## 1.0.14 | ||
- new `call:state:changed`: `rejected`, `busy`, `timeout`, `failed`, `unanswered`, `answered` | ||
### Fixes | ||
- change `call:state:changed - completed` status to : `complete` | ||
- Fix enum elements in docs. | ||
# 1.0.12 | ||
### Updates | ||
## Changes | ||
- Libraries update | ||
--- | ||
## 1.0.13 | ||
### Additions | ||
- new `call:state:changed`: `rejected`, `busy`, `timeout`, `failed`, `unanswered`, `answered`. | ||
--- | ||
## 1.0.12 | ||
### Changes | ||
- `Call.type` removed | ||
- Add option to send constraints to enable video | ||
## Fixes | ||
### Fixes | ||
@@ -22,5 +38,5 @@ - mute to disable local streams | ||
## Internal changes | ||
### Internal changes | ||
- use `is_video_conversation` to know if video was enabled in the Conversation object | ||
- more stable webrtc Offer negotiation for audio stream |
@@ -38,5 +38,5 @@ /* | ||
}); | ||
* @fires Application#member:invited | ||
* @fires Application#member:joined | ||
* @fires Application#member:call | ||
* @emits Application#member:invited | ||
* @emits Application#member:joined | ||
* @emits Application#member:call | ||
*/ | ||
@@ -43,0 +43,0 @@ class Application { |
@@ -21,8 +21,11 @@ /* | ||
* @param {Member} from - The member that initiated the call. | ||
* @property {Application} application - The Application object that the call belongs to. | ||
* @property {Conversation} conversation - The Conversation object that belongs to this call. | ||
* @property {Member} from - The caller. The member object of the caller ( not a reference to the one in conversation.members) | ||
* @property {Member[]} to - The callees. The members that receive the call (not a reference to conversation.members) | ||
* @fires Application#member:call | ||
* @fires Call#member:call:state | ||
* @fires Call#call:state:changed | ||
* @property {Call.CALL_STATES} CALL_STATES="started" - the available call states | ||
* @property {Call.MEMBER_CALL_STATES} MEMBER_CALL_STATES - the available member call states | ||
* @emits Application#member:call | ||
* @emits Call#member:call:state | ||
* @emits Call#call:state:changed | ||
*/ | ||
@@ -48,6 +51,5 @@ | ||
* @event Call#call:state:changed | ||
* @property {CALL_STATES}='started' state - the new state | ||
* @property {Call} call - the actual event | ||
* @example <caption>listen for member state events</caption> | ||
* call.on("call:state:changed",(from, state, call) => { | ||
* call.on("call:state:changed",(call) => { | ||
* console.log("call: " + call.state); | ||
@@ -62,2 +64,4 @@ * }); | ||
this.from = from; | ||
this.conversation = null; | ||
/** | ||
@@ -67,5 +71,5 @@ * Enum for Call states. | ||
* @enum {string} | ||
* @private | ||
* @alias Call.CALL_STATES | ||
*/ | ||
this.CALL_STATES = Object.freeze({ | ||
this.CALL_STATES = { | ||
/** The Call is in started state */ | ||
@@ -77,4 +81,4 @@ STARTED: 'started', | ||
ANSWERED: 'answered', | ||
/** The Call is in completed state */ | ||
COMPLETED: 'completed', | ||
/** The Call is in complete state */ | ||
COMPLETE: 'complete', | ||
/** The Call is in busy state */ | ||
@@ -90,10 +94,11 @@ BUSY: 'busy', | ||
FAILED: 'failed' | ||
}); | ||
}; | ||
Object.freeze(this.CALL_STATES); | ||
/** | ||
* Enum for Call Member states. | ||
* @readonly | ||
* @alias Call.MEMBER_CALL_STATES | ||
* @enum {string} | ||
* @private | ||
*/ | ||
this.MEMBER_CALL_STATES = Object.freeze({ | ||
this.MEMBER_CALL_STATES = { | ||
/** A Member is in ringing state */ | ||
@@ -107,3 +112,4 @@ RINGING: 'ringing', | ||
REJECTED: 'rejected' | ||
}); | ||
} | ||
Object.freeze(this.MEMBER_CALL_STATES); | ||
this.state = this.CALL_STATES.STARTED; | ||
@@ -209,3 +215,3 @@ this._setupConversationObject(conversation); | ||
if (this.state === this.CALL_STATES.ANSWERED) { | ||
this.state = this.CALL_STATES.COMPLETED; | ||
this.state = this.CALL_STATES.COMPLETE; | ||
this.application.emit("call:state:changed", this); | ||
@@ -212,0 +218,0 @@ } |
@@ -54,3 +54,3 @@ /* | ||
* | ||
* @fires ConversationClient#ready | ||
* @emits ConversationClient#ready | ||
*/ | ||
@@ -74,3 +74,3 @@ | ||
repository: 'https://github.com/Nexmo/conversation-js-sdk', | ||
SDK_version: '1.0.13', | ||
SDK_version: '1.0.14', | ||
url: 'https://ws.nexmo.com', | ||
@@ -77,0 +77,0 @@ iceServers: [{ |
@@ -5,3 +5,3 @@ { | ||
"repository": "https://github.com/Nexmo/conversation-js-sdk", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"keywords": [ | ||
@@ -21,3 +21,3 @@ "nexmo", | ||
"loglevel": "^1.6.1", | ||
"loglevel-plugin-prefix": "^0.8.3", | ||
"loglevel-plugin-prefix": "^0.8.4", | ||
"socket.io": "^2.1.1", | ||
@@ -31,4 +31,2 @@ "socket.io-client": "^2.1.1", | ||
"devDependencies": { | ||
"grunt-contrib-watch": "^1.1.0", | ||
"grunt-umd": "^3.0.0", | ||
"browserify": "^16.2.2", | ||
@@ -39,9 +37,9 @@ "browserify-istanbul": "^3.0.1", | ||
"chai-as-promised": "^7.1.1", | ||
"concurrently": "^3.5.1", | ||
"concurrently": "^3.6.0", | ||
"eslint": "^4.19.1", | ||
"eslint-config-airbnb": "^16.1.0", | ||
"eslint-config-airbnb-base": "^12.1.0", | ||
"eslint-plugin-import": "^2.12.0", | ||
"eslint-plugin-import": "^2.13.0", | ||
"eslint-plugin-jsx-a11y": "^6.0.3", | ||
"eslint-plugin-react": "^7.9.1", | ||
"eslint-plugin-react": "^7.10.0", | ||
"grunt": "^1.0.3", | ||
@@ -52,7 +50,9 @@ "grunt-browserify": "^5.3.0", | ||
"grunt-contrib-clean": "^1.1.0", | ||
"grunt-contrib-watch": "^1.1.0", | ||
"grunt-jsdoc": "^2.2.1", | ||
"grunt-karma": "^2.0.0", | ||
"grunt-string-replace": "^1.3.1", | ||
"grunt-umd": "^3.0.0", | ||
"jsdoc": "latest", | ||
"karma": "^2.0.2", | ||
"karma": "^2.0.4", | ||
"karma-browserify": "^5.3.0", | ||
@@ -67,3 +67,3 @@ "karma-chrome-launcher": "^2.2.0", | ||
"mocha": "^5.2.0", | ||
"sinon": "^6.0.0", | ||
"sinon": "^6.0.1", | ||
"sinon-chai": "^3.2.0" | ||
@@ -70,0 +70,0 @@ }, |
Sorry, the diff of this file is too big to display
1321368
21371