podchat-browser 11.3.2 → 11.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +7 -2
- package/dist/podchat-11.3.2.js +55921 -55921
- package/dist/{podchat-11.2.3.js → podchat-11.3.3.js} +56842 -56708
- package/dist/{podchat-11.2.1.js → podchat-11.3.4.js} +2722 -833
- package/dist/{podchat-11.2.2.js → podchat-11.4.1.js} +57048 -56947
- package/examples/index.html +62 -4
- package/package.json +3 -3
- package/src/call.module.js +247 -303
- package/src/chat.js +61 -20
- package/config.js +0 -59
- package/dist/podchat-10.14.11.js +0 -71188
- package/dist/podchat-10.14.12.js +0 -71188
- package/dist/podchat-11.1.0.js +0 -72792
package/examples/index.html
CHANGED
|
@@ -1955,10 +1955,10 @@ Thread: <input type="text" id="threadInput" autocomplete="on" width="500">
|
|
|
1955
1955
|
<fieldset>
|
|
1956
1956
|
<legend>Send File Message</legend>
|
|
1957
1957
|
<label for="sendFileThread">Thread Id</label>
|
|
1958
|
-
<input type="text" name="sendFileThread" id="sendFileThread" value="
|
|
1958
|
+
<input type="text" name="sendFileThread" id="sendFileThread" value="972967" class="custom-thread-id">
|
|
1959
1959
|
<br>
|
|
1960
1960
|
<label for="sendFileUserGroupHash">Thread userGroupHash</label>
|
|
1961
|
-
<input type="text" name="sendFileUserGroupHash" id="sendFileUserGroupHash" value="
|
|
1961
|
+
<input type="text" name="sendFileUserGroupHash" id="sendFileUserGroupHash" value="EY8X3CYDZQ9QBQ">
|
|
1962
1962
|
<br>
|
|
1963
1963
|
|
|
1964
1964
|
<label for="sendFileMessageType">Message Type</label>
|
|
@@ -1979,6 +1979,7 @@ Thread: <input type="text" id="threadInput" autocomplete="on" width="500">
|
|
|
1979
1979
|
<label for="sendFileDescription">Description: </label>
|
|
1980
1980
|
<textarea type="text" name="sendFileDescription" id="sendFileDescription"></textarea>
|
|
1981
1981
|
<button type="button" name="button" id="sendFileMessage">Send File Message</button>
|
|
1982
|
+
<button type="button" name="button" id="sendMultipleFileMessage">Send Multiple File Message</button>
|
|
1982
1983
|
</fieldset>
|
|
1983
1984
|
</form>
|
|
1984
1985
|
|
|
@@ -2614,6 +2615,63 @@ Thread: <input type="text" id="threadInput" autocomplete="on" width="500">
|
|
|
2614
2615
|
// }, 100);
|
|
2615
2616
|
});
|
|
2616
2617
|
|
|
2618
|
+
/**
|
|
2619
|
+
* SEND MULTIPLE FILES
|
|
2620
|
+
*/
|
|
2621
|
+
document.getElementById("sendMultipleFileMessage")
|
|
2622
|
+
.addEventListener("click", function (e) {
|
|
2623
|
+
e.preventDefault();
|
|
2624
|
+
var fileInput = document.getElementById("sendFileInput"),
|
|
2625
|
+
image = fileInput.files[0],
|
|
2626
|
+
content = document.getElementById("sendFileDescription").value,
|
|
2627
|
+
thread = document.getElementById("sendFileThread").value,
|
|
2628
|
+
messageType = document.getElementById("sendFileMessageType").value,
|
|
2629
|
+
userGroupHash = document.getElementById("sendFileUserGroupHash").value;
|
|
2630
|
+
|
|
2631
|
+
for(var i =1; i<= 5; i++) {
|
|
2632
|
+
setTimeout(function () {
|
|
2633
|
+
var instantResult = chatAgent.sendFileMessage({
|
|
2634
|
+
threadId: thread,
|
|
2635
|
+
file: image,
|
|
2636
|
+
content: content,
|
|
2637
|
+
userGroupHash: userGroupHash,
|
|
2638
|
+
messageType: messageType,
|
|
2639
|
+
metadata: {
|
|
2640
|
+
custom_name: "John Doe"
|
|
2641
|
+
}
|
|
2642
|
+
}, {
|
|
2643
|
+
onResult: function (result) {
|
|
2644
|
+
if (result.hasError) {
|
|
2645
|
+
console.log('[examples/html] upload of an item failed', result)
|
|
2646
|
+
}
|
|
2647
|
+
},
|
|
2648
|
+
onSent: function (result) {
|
|
2649
|
+
console.log(result);
|
|
2650
|
+
console.log(result.uniqueId + " \t has been Sent!");
|
|
2651
|
+
},
|
|
2652
|
+
onDeliver: function (result) {
|
|
2653
|
+
console.log(result.uniqueId + " \t has been Delivered!");
|
|
2654
|
+
},
|
|
2655
|
+
onSeen: function (result) {
|
|
2656
|
+
console.log(result.uniqueId + " \t has been Seen!");
|
|
2657
|
+
},
|
|
2658
|
+
onFileUpload: function (result) {
|
|
2659
|
+
console.log('File Upload is done', result);
|
|
2660
|
+
}
|
|
2661
|
+
});
|
|
2662
|
+
console.log("Instant sendFile Results", instantResult)
|
|
2663
|
+
}, i * 5000);
|
|
2664
|
+
}
|
|
2665
|
+
|
|
2666
|
+
// console.log("Should cancel file upload after 100ms. (uid = " + instantResult.content.file.uniqueId + ")")
|
|
2667
|
+
// setTimeout(() => {
|
|
2668
|
+
// chatAgent.cancelFileUpload({
|
|
2669
|
+
// uniqueId: instantResult.content.file.uniqueId
|
|
2670
|
+
// }, function() {
|
|
2671
|
+
// console.log("Upload has been Canceled!");
|
|
2672
|
+
// });
|
|
2673
|
+
// }, 100);
|
|
2674
|
+
})
|
|
2617
2675
|
|
|
2618
2676
|
/**
|
|
2619
2677
|
* REPLY FILE MESSAGE
|
|
@@ -3039,8 +3097,8 @@ Thread: <input type="text" id="threadInput" autocomplete="on" width="500">
|
|
|
3039
3097
|
threadId: inp,
|
|
3040
3098
|
autoStartDownload: true,
|
|
3041
3099
|
responseType: 'link',
|
|
3042
|
-
wantedCount:
|
|
3043
|
-
stepCount:
|
|
3100
|
+
wantedCount: 10000,
|
|
3101
|
+
stepCount: 1000
|
|
3044
3102
|
}, result => {
|
|
3045
3103
|
console.log(result);
|
|
3046
3104
|
})
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "podchat-browser",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.4.1",
|
|
4
4
|
"description": "Javascript SDK to use POD's Chat Service - Browser Only",
|
|
5
5
|
"main": "./src/chat.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "mocha --reporter spec --exit",
|
|
8
|
-
"bundle": "browserify browser-bundling.js -o ./dist/podchat-11.
|
|
8
|
+
"bundle": "browserify browser-bundling.js -o ./dist/podchat-11.4.1.js",
|
|
9
9
|
"publish:snapshot": "npm run version:snapshot && npm publish --tag snapshot",
|
|
10
10
|
"version:snapshot": "npm version prerelease --preid snapshot",
|
|
11
11
|
"publish:release": "npm run version:release && npm publish",
|
|
12
|
-
"version:release": "npm version 11.
|
|
12
|
+
"version:release": "npm version 11.4.1"
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|