clique-api-client-js
Advanced tools
Comparing version 3.2.4 to 3.2.5
@@ -74,3 +74,2 @@ (async() => { | ||
conference = await client.create({ conference_settings: settings }) || conference; | ||
client.chat.setInputDomElement(conference.id, id('chatMessage')); | ||
disableElements(false); | ||
@@ -87,3 +86,2 @@ prepareConfInfo(); | ||
conference = await client.join(conference.id); | ||
client.chat.setInputDomElement(conference.id, id('chatMessage')); | ||
const confUserList = await client.users(); | ||
@@ -136,3 +134,3 @@ members = Object.assign({}, confUserList); | ||
const disableElements = flag => { | ||
const els = ['invite', 'setgrace', 'mute', 'lock', 'recording', 'hangup', 'sendMessage', 'chatMessage']; | ||
const els = ['invite', 'setgrace', 'mute', 'lock', 'recording', 'hangup']; | ||
@@ -295,18 +293,2 @@ if (flag) { | ||
id('sendMessage') | ||
.addEventListener('click', async e => { | ||
const message = id('chatMessage').value; | ||
if (!message) return; | ||
if (client.chat) client.chat.send(conference.id, message); | ||
}); | ||
const addChatMessage = (sender, text) => { | ||
const node = document.createElement("P"); | ||
node.className = 'bg-primary'; | ||
const textnode = document.createTextNode(sender + ' : ' + text); | ||
node.appendChild(textnode); | ||
console.log('addChatMessage', sender, text); | ||
id('messages').appendChild(node); | ||
} | ||
//events | ||
@@ -362,10 +344,2 @@ const eventhandler = (event, name) => { | ||
client.on('conference-leave', event => eventhandler(event, 'conference-leave')); | ||
client.on('message', event => { | ||
eventhandler(event, 'message'); | ||
addChatMessage(event.uuid, event.message); | ||
}); | ||
client.on('message-start-typing', event => eventhandler(event, 'message-start-typing')); | ||
client.on('message-stop-typing', event => eventhandler(event, 'message-stop-typing')); | ||
client.on('error', event => eventhandler(event, 'error')); | ||
@@ -372,0 +346,0 @@ |
{ | ||
"name": "clique-api-client-js", | ||
"version": "3.2.4", | ||
"version": "3.2.5", | ||
"description": "Client side lib to work with clique platform", | ||
@@ -13,3 +13,3 @@ "main": "client.js", | ||
"jquery": "^3.2.1", | ||
"peerjs": "https://bitbucket.org/commcl/peerjs.git#2e3e252", | ||
"peerjs": "https://bitbucket.org/commcl/peerjs.git#35b1199", | ||
"socket.io-client": "~2.1.0" | ||
@@ -16,0 +16,0 @@ }, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
HTTP dependency
Supply chain riskContains a dependency which resolves to a remote HTTP URL which could be used to inject untrusted code and reduce overall package reliability.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
HTTP dependency
Supply chain riskContains a dependency which resolves to a remote HTTP URL which could be used to inject untrusted code and reduce overall package reliability.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
3001923
48
14352
11