clique-api-client-js
Advanced tools
Comparing version 2.0.2 to 2.1.0
(function (global, factory) { | ||
/*global define*/ | ||
if (typeof define === 'function' && define.amd) { | ||
define(['./verto', 'socket.io-client'], factory); // AMD | ||
define(['./verto/verto', 'socket.io-client'], factory); // AMD | ||
} else if (typeof module === 'object' && module.exports) { | ||
module.exports = factory(require('./verto'), require('socket.io-client')); // commonjs | ||
module.exports = factory(require('./verto/verto'), require('socket.io-client')); // commonjs | ||
} else { | ||
global.CliqueClient = factory(global.jQuery, global.io) // Browser | ||
global.CliqueClient = factory(global.Verto, global.io) // Browser | ||
} | ||
}(this, function($, io) { | ||
}(this, function(Verto, io) { | ||
function AjaxRequest(request) { | ||
@@ -54,4 +54,3 @@ return new Promise(function(resolve, reject) { | ||
var self = this; | ||
if (typeof $ === 'undefined') throw new Error("jQuery is not available"); | ||
if (typeof $.verto === 'undefined') throw new Error("Verto is not available"); | ||
if (typeof Verto === 'undefined') throw new Error("Verto is not available"); | ||
if (typeof io === 'undefined') throw new Error("Socket.io is not available"); | ||
@@ -113,3 +112,2 @@ | ||
self.socket.on('event', function(event){ | ||
console.log(event.Action); | ||
switch (event.Action) { | ||
@@ -196,3 +194,3 @@ case 'add-member': | ||
self.nodes[conference.node_domain] = new $.verto({ | ||
self.nodes[conference.node_domain] = new Verto({ | ||
// The params... | ||
@@ -215,3 +213,3 @@ socketUrl: "wss://" + conference.node_domain + ":" + self.wss_port, | ||
function onDialogState(d) { | ||
function onDialogState(d) { | ||
switch (d.state.name) { | ||
@@ -221,5 +219,5 @@ case "trying": | ||
case "answering": | ||
self.__trigger('room_join', { conf_id: self.calls[d.callID], user: self.user }) | ||
break; | ||
case "active": | ||
self.__trigger('room_join', { conf_id: self.calls[d.callID], user: self.user }); | ||
break; | ||
@@ -285,3 +283,3 @@ case "hangup": | ||
self.nodes[node.node_domain] = new $.verto({ | ||
self.nodes[node.node_domain] = new Verto({ | ||
// The params... | ||
@@ -331,3 +329,2 @@ socketUrl: "wss://" + node.node_domain + ":" + self.wss_port, | ||
CliqueClient.prototype.error = function(code, error) { | ||
console.log(code, error); | ||
this.__trigger('error', {code: code, error: error}); | ||
@@ -548,3 +545,3 @@ } | ||
var self = this; | ||
console.log('_startConferenceCall'); | ||
var dialog = self.nodes[conference.node_domain].newCall({destination_number:"conference_" + conference.id, caller_id_number:self.user.uuid}); | ||
@@ -551,0 +548,0 @@ self.calls[dialog.callID] = conference.id; |
{ | ||
"name": "clique-api-client-js", | ||
"version": "2.0.2", | ||
"version": "2.1.0", | ||
"description": "Client side lib to work with clique platform", | ||
@@ -11,3 +11,2 @@ "main": "client.js", | ||
"jquery": "^3.2.1", | ||
"jquery-json": "^2.6.0", | ||
"socket.io-client": "~1.4.5" | ||
@@ -14,0 +13,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
587890
2
23
15369
1
3
70
8
- Removedjquery-json@^2.6.0
- Removedjquery-json@2.6.0(transitive)