genesys-cloud-streaming-client 19.8.0 → 20.0.0-release.2
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/dist/cjs/client.js +2 -3
- package/dist/cjs/connection-manager.js +1 -2
- package/dist/cjs/messenger.js +1 -2
- package/dist/cjs/types/genesys-cloud-media-session.js +1 -2
- package/dist/cjs/utils.js +1 -2
- package/dist/cjs/webrtc.js +2 -3
- package/dist/deploy-info.json +7 -7
- package/dist/es/client.js +2 -3
- package/dist/es/connection-manager.js +1 -2
- package/dist/es/index.bundle.js +10 -490
- package/dist/es/messenger.js +1 -2
- package/dist/es/types/genesys-cloud-media-session.js +1 -2
- package/dist/es/utils.js +1 -2
- package/dist/es/webrtc.js +2 -3
- package/dist/manifest.json +7 -7
- package/dist/npm/CHANGELOG.md +5 -1
- package/dist/npm/client.js +2 -3
- package/dist/npm/connection-manager.js +1 -2
- package/dist/npm/messenger.js +1 -2
- package/dist/npm/types/genesys-cloud-media-session.js +1 -2
- package/dist/npm/utils.js +1 -2
- package/dist/npm/webrtc.js +2 -3
- package/dist/streaming-client.browser.js +1 -1
- package/dist/v20/streaming-client.browser.js +2 -0
- package/dist/v20.0.0/streaming-client.browser.js +2 -0
- package/package.json +2 -4
- package/dist/v19/streaming-client.browser.js +0 -2
- package/dist/v19.8.0/streaming-client.browser.js +0 -2
- /package/dist/{v19 → v20}/streaming-client.browser.js.LICENSE.txt +0 -0
- /package/dist/{v19.8.0 → v20.0.0}/streaming-client.browser.js.LICENSE.txt +0 -0
package/dist/es/index.bundle.js
CHANGED
|
@@ -1482,486 +1482,6 @@ var _polyfillNode_events = /*#__PURE__*/Object.freeze({
|
|
|
1482
1482
|
EventEmitter: EventEmitter
|
|
1483
1483
|
});
|
|
1484
1484
|
|
|
1485
|
-
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
1486
|
-
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
1487
|
-
// generators (like Math.random()).
|
|
1488
|
-
let getRandomValues;
|
|
1489
|
-
const rnds8 = new Uint8Array(16);
|
|
1490
|
-
function rng() {
|
|
1491
|
-
// lazy load so that environments that need to polyfill have a chance to do so
|
|
1492
|
-
if (!getRandomValues) {
|
|
1493
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
|
1494
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
1495
|
-
|
|
1496
|
-
if (!getRandomValues) {
|
|
1497
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
1498
|
-
}
|
|
1499
|
-
}
|
|
1500
|
-
|
|
1501
|
-
return getRandomValues(rnds8);
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
var REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
1505
|
-
|
|
1506
|
-
function validate(uuid) {
|
|
1507
|
-
return typeof uuid === 'string' && REGEX.test(uuid);
|
|
1508
|
-
}
|
|
1509
|
-
|
|
1510
|
-
/**
|
|
1511
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
|
1512
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
1513
|
-
*/
|
|
1514
|
-
|
|
1515
|
-
const byteToHex = [];
|
|
1516
|
-
|
|
1517
|
-
for (let i = 0; i < 256; ++i) {
|
|
1518
|
-
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
1519
|
-
}
|
|
1520
|
-
|
|
1521
|
-
function unsafeStringify(arr, offset = 0) {
|
|
1522
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
|
1523
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
1524
|
-
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
1525
|
-
}
|
|
1526
|
-
|
|
1527
|
-
function parse$3(uuid) {
|
|
1528
|
-
if (!validate(uuid)) {
|
|
1529
|
-
throw TypeError('Invalid UUID');
|
|
1530
|
-
}
|
|
1531
|
-
|
|
1532
|
-
let v;
|
|
1533
|
-
const arr = new Uint8Array(16); // Parse ########-....-....-....-............
|
|
1534
|
-
|
|
1535
|
-
arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
|
|
1536
|
-
arr[1] = v >>> 16 & 0xff;
|
|
1537
|
-
arr[2] = v >>> 8 & 0xff;
|
|
1538
|
-
arr[3] = v & 0xff; // Parse ........-####-....-....-............
|
|
1539
|
-
|
|
1540
|
-
arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
|
|
1541
|
-
arr[5] = v & 0xff; // Parse ........-....-####-....-............
|
|
1542
|
-
|
|
1543
|
-
arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
|
|
1544
|
-
arr[7] = v & 0xff; // Parse ........-....-....-####-............
|
|
1545
|
-
|
|
1546
|
-
arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
|
|
1547
|
-
arr[9] = v & 0xff; // Parse ........-....-....-....-############
|
|
1548
|
-
// (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
|
|
1549
|
-
|
|
1550
|
-
arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
|
|
1551
|
-
arr[11] = v / 0x100000000 & 0xff;
|
|
1552
|
-
arr[12] = v >>> 24 & 0xff;
|
|
1553
|
-
arr[13] = v >>> 16 & 0xff;
|
|
1554
|
-
arr[14] = v >>> 8 & 0xff;
|
|
1555
|
-
arr[15] = v & 0xff;
|
|
1556
|
-
return arr;
|
|
1557
|
-
}
|
|
1558
|
-
|
|
1559
|
-
function stringToBytes(str) {
|
|
1560
|
-
str = unescape(encodeURIComponent(str)); // UTF8 escape
|
|
1561
|
-
|
|
1562
|
-
const bytes = [];
|
|
1563
|
-
|
|
1564
|
-
for (let i = 0; i < str.length; ++i) {
|
|
1565
|
-
bytes.push(str.charCodeAt(i));
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
return bytes;
|
|
1569
|
-
}
|
|
1570
|
-
|
|
1571
|
-
const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
|
|
1572
|
-
const URL$1 = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
|
|
1573
|
-
function v35(name, version, hashfunc) {
|
|
1574
|
-
function generateUUID(value, namespace, buf, offset) {
|
|
1575
|
-
var _namespace;
|
|
1576
|
-
|
|
1577
|
-
if (typeof value === 'string') {
|
|
1578
|
-
value = stringToBytes(value);
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
|
-
if (typeof namespace === 'string') {
|
|
1582
|
-
namespace = parse$3(namespace);
|
|
1583
|
-
}
|
|
1584
|
-
|
|
1585
|
-
if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {
|
|
1586
|
-
throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
|
|
1587
|
-
} // Compute hash of namespace and value, Per 4.3
|
|
1588
|
-
// Future: Use spread syntax when supported on all platforms, e.g. `bytes =
|
|
1589
|
-
// hashfunc([...namespace, ... value])`
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
let bytes = new Uint8Array(16 + value.length);
|
|
1593
|
-
bytes.set(namespace);
|
|
1594
|
-
bytes.set(value, namespace.length);
|
|
1595
|
-
bytes = hashfunc(bytes);
|
|
1596
|
-
bytes[6] = bytes[6] & 0x0f | version;
|
|
1597
|
-
bytes[8] = bytes[8] & 0x3f | 0x80;
|
|
1598
|
-
|
|
1599
|
-
if (buf) {
|
|
1600
|
-
offset = offset || 0;
|
|
1601
|
-
|
|
1602
|
-
for (let i = 0; i < 16; ++i) {
|
|
1603
|
-
buf[offset + i] = bytes[i];
|
|
1604
|
-
}
|
|
1605
|
-
|
|
1606
|
-
return buf;
|
|
1607
|
-
}
|
|
1608
|
-
|
|
1609
|
-
return unsafeStringify(bytes);
|
|
1610
|
-
} // Function#name is not settable on some platforms (#270)
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
try {
|
|
1614
|
-
generateUUID.name = name; // eslint-disable-next-line no-empty
|
|
1615
|
-
} catch (err) {} // For CommonJS default export support
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
generateUUID.DNS = DNS;
|
|
1619
|
-
generateUUID.URL = URL$1;
|
|
1620
|
-
return generateUUID;
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
|
-
/*
|
|
1624
|
-
* Browser-compatible JavaScript MD5
|
|
1625
|
-
*
|
|
1626
|
-
* Modification of JavaScript MD5
|
|
1627
|
-
* https://github.com/blueimp/JavaScript-MD5
|
|
1628
|
-
*
|
|
1629
|
-
* Copyright 2011, Sebastian Tschan
|
|
1630
|
-
* https://blueimp.net
|
|
1631
|
-
*
|
|
1632
|
-
* Licensed under the MIT license:
|
|
1633
|
-
* https://opensource.org/licenses/MIT
|
|
1634
|
-
*
|
|
1635
|
-
* Based on
|
|
1636
|
-
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
|
|
1637
|
-
* Digest Algorithm, as defined in RFC 1321.
|
|
1638
|
-
* Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
|
|
1639
|
-
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
|
|
1640
|
-
* Distributed under the BSD License
|
|
1641
|
-
* See http://pajhome.org.uk/crypt/md5 for more info.
|
|
1642
|
-
*/
|
|
1643
|
-
function md5(bytes) {
|
|
1644
|
-
if (typeof bytes === 'string') {
|
|
1645
|
-
const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
|
|
1646
|
-
|
|
1647
|
-
bytes = new Uint8Array(msg.length);
|
|
1648
|
-
|
|
1649
|
-
for (let i = 0; i < msg.length; ++i) {
|
|
1650
|
-
bytes[i] = msg.charCodeAt(i);
|
|
1651
|
-
}
|
|
1652
|
-
}
|
|
1653
|
-
|
|
1654
|
-
return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));
|
|
1655
|
-
}
|
|
1656
|
-
/*
|
|
1657
|
-
* Convert an array of little-endian words to an array of bytes
|
|
1658
|
-
*/
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
function md5ToHexEncodedArray(input) {
|
|
1662
|
-
const output = [];
|
|
1663
|
-
const length32 = input.length * 32;
|
|
1664
|
-
const hexTab = '0123456789abcdef';
|
|
1665
|
-
|
|
1666
|
-
for (let i = 0; i < length32; i += 8) {
|
|
1667
|
-
const x = input[i >> 5] >>> i % 32 & 0xff;
|
|
1668
|
-
const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);
|
|
1669
|
-
output.push(hex);
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
|
-
return output;
|
|
1673
|
-
}
|
|
1674
|
-
/**
|
|
1675
|
-
* Calculate output length with padding and bit length
|
|
1676
|
-
*/
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
function getOutputLength(inputLength8) {
|
|
1680
|
-
return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;
|
|
1681
|
-
}
|
|
1682
|
-
/*
|
|
1683
|
-
* Calculate the MD5 of an array of little-endian words, and a bit length.
|
|
1684
|
-
*/
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
function wordsToMd5(x, len) {
|
|
1688
|
-
/* append padding */
|
|
1689
|
-
x[len >> 5] |= 0x80 << len % 32;
|
|
1690
|
-
x[getOutputLength(len) - 1] = len;
|
|
1691
|
-
let a = 1732584193;
|
|
1692
|
-
let b = -271733879;
|
|
1693
|
-
let c = -1732584194;
|
|
1694
|
-
let d = 271733878;
|
|
1695
|
-
|
|
1696
|
-
for (let i = 0; i < x.length; i += 16) {
|
|
1697
|
-
const olda = a;
|
|
1698
|
-
const oldb = b;
|
|
1699
|
-
const oldc = c;
|
|
1700
|
-
const oldd = d;
|
|
1701
|
-
a = md5ff(a, b, c, d, x[i], 7, -680876936);
|
|
1702
|
-
d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
|
|
1703
|
-
c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
|
|
1704
|
-
b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
|
|
1705
|
-
a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
|
|
1706
|
-
d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
|
|
1707
|
-
c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
|
|
1708
|
-
b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
|
|
1709
|
-
a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
|
|
1710
|
-
d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
|
|
1711
|
-
c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
|
|
1712
|
-
b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
|
|
1713
|
-
a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
|
|
1714
|
-
d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
|
|
1715
|
-
c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
|
|
1716
|
-
b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
|
|
1717
|
-
a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
|
|
1718
|
-
d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
|
|
1719
|
-
c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
|
|
1720
|
-
b = md5gg(b, c, d, a, x[i], 20, -373897302);
|
|
1721
|
-
a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
|
|
1722
|
-
d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
|
|
1723
|
-
c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
|
|
1724
|
-
b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
|
|
1725
|
-
a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
|
|
1726
|
-
d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
|
|
1727
|
-
c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
|
|
1728
|
-
b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
|
|
1729
|
-
a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
|
|
1730
|
-
d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
|
|
1731
|
-
c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
|
|
1732
|
-
b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
|
|
1733
|
-
a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
|
|
1734
|
-
d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
|
|
1735
|
-
c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
|
|
1736
|
-
b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
|
|
1737
|
-
a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
|
|
1738
|
-
d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
|
|
1739
|
-
c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
|
|
1740
|
-
b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
|
|
1741
|
-
a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
|
|
1742
|
-
d = md5hh(d, a, b, c, x[i], 11, -358537222);
|
|
1743
|
-
c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
|
|
1744
|
-
b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
|
|
1745
|
-
a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
|
|
1746
|
-
d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
|
|
1747
|
-
c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
|
|
1748
|
-
b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
|
|
1749
|
-
a = md5ii(a, b, c, d, x[i], 6, -198630844);
|
|
1750
|
-
d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
|
|
1751
|
-
c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
|
|
1752
|
-
b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
|
|
1753
|
-
a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
|
|
1754
|
-
d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
|
|
1755
|
-
c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
|
|
1756
|
-
b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
|
|
1757
|
-
a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
|
|
1758
|
-
d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
|
|
1759
|
-
c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
|
|
1760
|
-
b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
|
|
1761
|
-
a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
|
|
1762
|
-
d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
|
|
1763
|
-
c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
|
|
1764
|
-
b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
|
|
1765
|
-
a = safeAdd(a, olda);
|
|
1766
|
-
b = safeAdd(b, oldb);
|
|
1767
|
-
c = safeAdd(c, oldc);
|
|
1768
|
-
d = safeAdd(d, oldd);
|
|
1769
|
-
}
|
|
1770
|
-
|
|
1771
|
-
return [a, b, c, d];
|
|
1772
|
-
}
|
|
1773
|
-
/*
|
|
1774
|
-
* Convert an array bytes to an array of little-endian words
|
|
1775
|
-
* Characters >255 have their high-byte silently ignored.
|
|
1776
|
-
*/
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
function bytesToWords(input) {
|
|
1780
|
-
if (input.length === 0) {
|
|
1781
|
-
return [];
|
|
1782
|
-
}
|
|
1783
|
-
|
|
1784
|
-
const length8 = input.length * 8;
|
|
1785
|
-
const output = new Uint32Array(getOutputLength(length8));
|
|
1786
|
-
|
|
1787
|
-
for (let i = 0; i < length8; i += 8) {
|
|
1788
|
-
output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;
|
|
1789
|
-
}
|
|
1790
|
-
|
|
1791
|
-
return output;
|
|
1792
|
-
}
|
|
1793
|
-
/*
|
|
1794
|
-
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
|
|
1795
|
-
* to work around bugs in some JS interpreters.
|
|
1796
|
-
*/
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
function safeAdd(x, y) {
|
|
1800
|
-
const lsw = (x & 0xffff) + (y & 0xffff);
|
|
1801
|
-
const msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
|
1802
|
-
return msw << 16 | lsw & 0xffff;
|
|
1803
|
-
}
|
|
1804
|
-
/*
|
|
1805
|
-
* Bitwise rotate a 32-bit number to the left.
|
|
1806
|
-
*/
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
function bitRotateLeft(num, cnt) {
|
|
1810
|
-
return num << cnt | num >>> 32 - cnt;
|
|
1811
|
-
}
|
|
1812
|
-
/*
|
|
1813
|
-
* These functions implement the four basic operations the algorithm uses.
|
|
1814
|
-
*/
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
function md5cmn(q, a, b, x, s, t) {
|
|
1818
|
-
return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
|
|
1819
|
-
}
|
|
1820
|
-
|
|
1821
|
-
function md5ff(a, b, c, d, x, s, t) {
|
|
1822
|
-
return md5cmn(b & c | ~b & d, a, b, x, s, t);
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
|
-
function md5gg(a, b, c, d, x, s, t) {
|
|
1826
|
-
return md5cmn(b & d | c & ~d, a, b, x, s, t);
|
|
1827
|
-
}
|
|
1828
|
-
|
|
1829
|
-
function md5hh(a, b, c, d, x, s, t) {
|
|
1830
|
-
return md5cmn(b ^ c ^ d, a, b, x, s, t);
|
|
1831
|
-
}
|
|
1832
|
-
|
|
1833
|
-
function md5ii(a, b, c, d, x, s, t) {
|
|
1834
|
-
return md5cmn(c ^ (b | ~d), a, b, x, s, t);
|
|
1835
|
-
}
|
|
1836
|
-
|
|
1837
|
-
v35('v3', 0x30, md5);
|
|
1838
|
-
|
|
1839
|
-
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
1840
|
-
var native = {
|
|
1841
|
-
randomUUID
|
|
1842
|
-
};
|
|
1843
|
-
|
|
1844
|
-
function v4(options, buf, offset) {
|
|
1845
|
-
if (native.randomUUID && !buf && !options) {
|
|
1846
|
-
return native.randomUUID();
|
|
1847
|
-
}
|
|
1848
|
-
|
|
1849
|
-
options = options || {};
|
|
1850
|
-
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
1851
|
-
|
|
1852
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
1853
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
1854
|
-
|
|
1855
|
-
if (buf) {
|
|
1856
|
-
offset = offset || 0;
|
|
1857
|
-
|
|
1858
|
-
for (let i = 0; i < 16; ++i) {
|
|
1859
|
-
buf[offset + i] = rnds[i];
|
|
1860
|
-
}
|
|
1861
|
-
|
|
1862
|
-
return buf;
|
|
1863
|
-
}
|
|
1864
|
-
|
|
1865
|
-
return unsafeStringify(rnds);
|
|
1866
|
-
}
|
|
1867
|
-
|
|
1868
|
-
// Adapted from Chris Veness' SHA1 code at
|
|
1869
|
-
// http://www.movable-type.co.uk/scripts/sha1.html
|
|
1870
|
-
function f(s, x, y, z) {
|
|
1871
|
-
switch (s) {
|
|
1872
|
-
case 0:
|
|
1873
|
-
return x & y ^ ~x & z;
|
|
1874
|
-
|
|
1875
|
-
case 1:
|
|
1876
|
-
return x ^ y ^ z;
|
|
1877
|
-
|
|
1878
|
-
case 2:
|
|
1879
|
-
return x & y ^ x & z ^ y & z;
|
|
1880
|
-
|
|
1881
|
-
case 3:
|
|
1882
|
-
return x ^ y ^ z;
|
|
1883
|
-
}
|
|
1884
|
-
}
|
|
1885
|
-
|
|
1886
|
-
function ROTL(x, n) {
|
|
1887
|
-
return x << n | x >>> 32 - n;
|
|
1888
|
-
}
|
|
1889
|
-
|
|
1890
|
-
function sha1(bytes) {
|
|
1891
|
-
const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];
|
|
1892
|
-
const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];
|
|
1893
|
-
|
|
1894
|
-
if (typeof bytes === 'string') {
|
|
1895
|
-
const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
|
|
1896
|
-
|
|
1897
|
-
bytes = [];
|
|
1898
|
-
|
|
1899
|
-
for (let i = 0; i < msg.length; ++i) {
|
|
1900
|
-
bytes.push(msg.charCodeAt(i));
|
|
1901
|
-
}
|
|
1902
|
-
} else if (!Array.isArray(bytes)) {
|
|
1903
|
-
// Convert Array-like to Array
|
|
1904
|
-
bytes = Array.prototype.slice.call(bytes);
|
|
1905
|
-
}
|
|
1906
|
-
|
|
1907
|
-
bytes.push(0x80);
|
|
1908
|
-
const l = bytes.length / 4 + 2;
|
|
1909
|
-
const N = Math.ceil(l / 16);
|
|
1910
|
-
const M = new Array(N);
|
|
1911
|
-
|
|
1912
|
-
for (let i = 0; i < N; ++i) {
|
|
1913
|
-
const arr = new Uint32Array(16);
|
|
1914
|
-
|
|
1915
|
-
for (let j = 0; j < 16; ++j) {
|
|
1916
|
-
arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];
|
|
1917
|
-
}
|
|
1918
|
-
|
|
1919
|
-
M[i] = arr;
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
|
-
M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);
|
|
1923
|
-
M[N - 1][14] = Math.floor(M[N - 1][14]);
|
|
1924
|
-
M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;
|
|
1925
|
-
|
|
1926
|
-
for (let i = 0; i < N; ++i) {
|
|
1927
|
-
const W = new Uint32Array(80);
|
|
1928
|
-
|
|
1929
|
-
for (let t = 0; t < 16; ++t) {
|
|
1930
|
-
W[t] = M[i][t];
|
|
1931
|
-
}
|
|
1932
|
-
|
|
1933
|
-
for (let t = 16; t < 80; ++t) {
|
|
1934
|
-
W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);
|
|
1935
|
-
}
|
|
1936
|
-
|
|
1937
|
-
let a = H[0];
|
|
1938
|
-
let b = H[1];
|
|
1939
|
-
let c = H[2];
|
|
1940
|
-
let d = H[3];
|
|
1941
|
-
let e = H[4];
|
|
1942
|
-
|
|
1943
|
-
for (let t = 0; t < 80; ++t) {
|
|
1944
|
-
const s = Math.floor(t / 20);
|
|
1945
|
-
const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;
|
|
1946
|
-
e = d;
|
|
1947
|
-
d = c;
|
|
1948
|
-
c = ROTL(b, 30) >>> 0;
|
|
1949
|
-
b = a;
|
|
1950
|
-
a = T;
|
|
1951
|
-
}
|
|
1952
|
-
|
|
1953
|
-
H[0] = H[0] + a >>> 0;
|
|
1954
|
-
H[1] = H[1] + b >>> 0;
|
|
1955
|
-
H[2] = H[2] + c >>> 0;
|
|
1956
|
-
H[3] = H[3] + d >>> 0;
|
|
1957
|
-
H[4] = H[4] + e >>> 0;
|
|
1958
|
-
}
|
|
1959
|
-
|
|
1960
|
-
return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];
|
|
1961
|
-
}
|
|
1962
|
-
|
|
1963
|
-
v35('v5', 0x50, sha1);
|
|
1964
|
-
|
|
1965
1485
|
var safeJsonStringify = {exports: {}};
|
|
1966
1486
|
|
|
1967
1487
|
var hasProp = Object.prototype.hasOwnProperty;
|
|
@@ -11940,7 +11460,7 @@ class Logger extends EventEmitter {
|
|
|
11940
11460
|
}
|
|
11941
11461
|
};
|
|
11942
11462
|
Object.defineProperty(this, 'clientId', {
|
|
11943
|
-
value:
|
|
11463
|
+
value: globalThis.crypto.randomUUID(),
|
|
11944
11464
|
writable: false
|
|
11945
11465
|
});
|
|
11946
11466
|
this.config = Object.assign({}, config);
|
|
@@ -12070,7 +11590,7 @@ class Logger extends EventEmitter {
|
|
|
12070
11590
|
}
|
|
12071
11591
|
}
|
|
12072
11592
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
12073
|
-
Logger.VERSION = '
|
|
11593
|
+
Logger.VERSION = '5.0.0';
|
|
12074
11594
|
|
|
12075
11595
|
/* istanbul ignore file */
|
|
12076
11596
|
if (!commonjsGlobal) {
|
|
@@ -12230,7 +11750,7 @@ retryFn, retryInterval = 15000, logger = console) {
|
|
|
12230
11750
|
promise,
|
|
12231
11751
|
cancel,
|
|
12232
11752
|
complete,
|
|
12233
|
-
_id:
|
|
11753
|
+
_id: globalThis.crypto.randomUUID(),
|
|
12234
11754
|
hasCompleted: () => _hasCompleted
|
|
12235
11755
|
};
|
|
12236
11756
|
}
|
|
@@ -35342,7 +34862,7 @@ class GenesysCloudMediaSession {
|
|
|
35342
34862
|
}
|
|
35343
34863
|
sendGenesysWebrtc(info) {
|
|
35344
34864
|
return __awaiter$4(this, void 0, void 0, function* () {
|
|
35345
|
-
info.id = info.id ||
|
|
34865
|
+
info.id = info.id || globalThis.crypto.randomUUID();
|
|
35346
34866
|
info.jsonrpc = info.jsonrpc || '2.0';
|
|
35347
34867
|
const iq = {
|
|
35348
34868
|
type: 'set',
|
|
@@ -36380,7 +35900,7 @@ class WebrtcExtension extends EventEmitter {
|
|
|
36380
35900
|
const session = {
|
|
36381
35901
|
to: opts.jid,
|
|
36382
35902
|
propose: {
|
|
36383
|
-
id:
|
|
35903
|
+
id: globalThis.crypto.randomUUID(),
|
|
36384
35904
|
descriptions: []
|
|
36385
35905
|
}
|
|
36386
35906
|
};
|
|
@@ -36412,7 +35932,7 @@ class WebrtcExtension extends EventEmitter {
|
|
|
36412
35932
|
const mediaPresence = {
|
|
36413
35933
|
type: 'upgradeMedia',
|
|
36414
35934
|
to: opts.jid,
|
|
36415
|
-
id:
|
|
35935
|
+
id: globalThis.crypto.randomUUID(),
|
|
36416
35936
|
from: this.jid,
|
|
36417
35937
|
media: {
|
|
36418
35938
|
conversationId: opts.conversationId,
|
|
@@ -46479,7 +45999,7 @@ class ConnectionManager {
|
|
|
46479
45999
|
stanza$1.sasl.mechanisms.find(mech => mech.name === 'ANONYMOUS').priority = 0;
|
|
46480
46000
|
stanza$1.sasl.mechanisms = stanza$1.sasl.mechanisms.sort((a, b) => b.priority - a.priority);
|
|
46481
46001
|
// we are going to give the stanza instance an id for tracking and logging purposes
|
|
46482
|
-
stanza$1.id =
|
|
46002
|
+
stanza$1.id = globalThis.crypto.randomUUID();
|
|
46483
46003
|
const channelId = stanza$1.channelId = this.config.channelId;
|
|
46484
46004
|
let boundCheckForErrorStanza;
|
|
46485
46005
|
let boundSessionStarted;
|
|
@@ -46763,7 +46283,7 @@ class MessengerExtension extends Emitter {
|
|
|
46763
46283
|
*/
|
|
46764
46284
|
broadcastMessage(msg) {
|
|
46765
46285
|
return __awaiter$4(this, void 0, void 0, function* () {
|
|
46766
|
-
const id =
|
|
46286
|
+
const id = globalThis.crypto.randomUUID();
|
|
46767
46287
|
msg.id = id;
|
|
46768
46288
|
msg.from = this.stanzaInstance.jid;
|
|
46769
46289
|
if (!msg.to) {
|
|
@@ -47451,7 +46971,7 @@ class Client extends EventEmitter {
|
|
|
47451
46971
|
});
|
|
47452
46972
|
}
|
|
47453
46973
|
// If no jidResource is provided, generate a random one to maintain ourselves.
|
|
47454
|
-
this.jidResource = this.config.jidResource ||
|
|
46974
|
+
this.jidResource = this.config.jidResource || globalThis.crypto.randomUUID();
|
|
47455
46975
|
const channelRequestOpts = {
|
|
47456
46976
|
method: 'post',
|
|
47457
46977
|
host: this.config.apiHost,
|
|
@@ -47494,7 +47014,7 @@ class Client extends EventEmitter {
|
|
|
47494
47014
|
return Client.version;
|
|
47495
47015
|
}
|
|
47496
47016
|
static get version() {
|
|
47497
|
-
return '
|
|
47017
|
+
return '20.0.0';
|
|
47498
47018
|
}
|
|
47499
47019
|
}
|
|
47500
47020
|
|
package/dist/es/messenger.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { __awaiter } from "tslib";
|
|
3
3
|
import { Emitter } from 'strict-event-emitter';
|
|
4
4
|
import { toBare } from 'stanza/JID';
|
|
5
|
-
import { v4 } from 'uuid';
|
|
6
5
|
export class MessengerExtension extends Emitter {
|
|
7
6
|
constructor(client, stanzaInstance) {
|
|
8
7
|
super();
|
|
@@ -32,7 +31,7 @@ export class MessengerExtension extends Emitter {
|
|
|
32
31
|
*/
|
|
33
32
|
broadcastMessage(msg) {
|
|
34
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
const id =
|
|
34
|
+
const id = globalThis.crypto.randomUUID();
|
|
36
35
|
msg.id = id;
|
|
37
36
|
msg.from = this.stanzaInstance.jid;
|
|
38
37
|
if (!msg.to) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
2
|
import StatsGatherer from 'webrtc-stats-gatherer';
|
|
3
3
|
import { EventEmitter } from 'events';
|
|
4
|
-
import { v4 } from 'uuid';
|
|
5
4
|
import { timeoutPromise } from '../utils';
|
|
6
5
|
import { SessionTypes } from './interfaces';
|
|
7
6
|
const loggingOverrides = {
|
|
@@ -92,7 +91,7 @@ export class GenesysCloudMediaSession {
|
|
|
92
91
|
}
|
|
93
92
|
sendGenesysWebrtc(info) {
|
|
94
93
|
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
-
info.id = info.id ||
|
|
94
|
+
info.id = info.id || globalThis.crypto.randomUUID();
|
|
96
95
|
info.jsonrpc = info.jsonrpc || '2.0';
|
|
97
96
|
const iq = {
|
|
98
97
|
type: 'set',
|
package/dist/es/utils.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
-
import { v4 } from 'uuid';
|
|
3
2
|
import { TimeoutError } from './types/timeout-error';
|
|
4
3
|
import { StreamingClientErrorTypes } from './types/interfaces';
|
|
5
4
|
export class StreamingClientError extends Error {
|
|
@@ -128,7 +127,7 @@ retryFn, retryInterval = 15000, logger = console) {
|
|
|
128
127
|
promise,
|
|
129
128
|
cancel,
|
|
130
129
|
complete,
|
|
131
|
-
_id:
|
|
130
|
+
_id: globalThis.crypto.randomUUID(),
|
|
132
131
|
hasCompleted: () => _hasCompleted
|
|
133
132
|
};
|
|
134
133
|
}
|
package/dist/es/webrtc.js
CHANGED
|
@@ -3,7 +3,6 @@ import { EventEmitter } from 'events';
|
|
|
3
3
|
import { toBare } from 'stanza/JID';
|
|
4
4
|
import { LRUCache } from 'lru-cache';
|
|
5
5
|
import { JingleAction } from 'stanza/Constants';
|
|
6
|
-
import { v4 } from 'uuid';
|
|
7
6
|
import throttle from 'lodash.throttle';
|
|
8
7
|
import { isFirefox } from 'browserama';
|
|
9
8
|
import { definitions } from './stanza-definitions/webrtc-signaling';
|
|
@@ -580,7 +579,7 @@ export class WebrtcExtension extends EventEmitter {
|
|
|
580
579
|
const session = {
|
|
581
580
|
to: opts.jid,
|
|
582
581
|
propose: {
|
|
583
|
-
id:
|
|
582
|
+
id: globalThis.crypto.randomUUID(),
|
|
584
583
|
descriptions: []
|
|
585
584
|
}
|
|
586
585
|
};
|
|
@@ -612,7 +611,7 @@ export class WebrtcExtension extends EventEmitter {
|
|
|
612
611
|
const mediaPresence = {
|
|
613
612
|
type: 'upgradeMedia',
|
|
614
613
|
to: opts.jid,
|
|
615
|
-
id:
|
|
614
|
+
id: globalThis.crypto.randomUUID(),
|
|
616
615
|
from: this.jid,
|
|
617
616
|
media: {
|
|
618
617
|
conversationId: opts.conversationId,
|
package/dist/manifest.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
3
|
-
"build": "
|
|
4
|
-
"buildDate": "2026-
|
|
2
|
+
"version": "release/v19.8.1",
|
|
3
|
+
"build": "2",
|
|
4
|
+
"buildDate": "2026-06-03T10:01:33.427Z",
|
|
5
5
|
"indexFiles": [
|
|
6
6
|
{
|
|
7
|
-
"file": "
|
|
7
|
+
"file": "v20.0.0/streaming-client.browser.js"
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
|
-
"file": "
|
|
10
|
+
"file": "v20.0.0/streaming-client.browser.js.LICENSE.txt"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
|
-
"file": "
|
|
13
|
+
"file": "v20/streaming-client.browser.js"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
|
-
"file": "
|
|
16
|
+
"file": "v20/streaming-client.browser.js.LICENSE.txt"
|
|
17
17
|
}
|
|
18
18
|
]
|
|
19
19
|
}
|
package/dist/npm/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
-
# [Unreleased](https://github.com/purecloudlabs/genesys-cloud-streaming-client/compare/
|
|
7
|
+
# [Unreleased](https://github.com/purecloudlabs/genesys-cloud-streaming-client/compare/v20.0.0...HEAD)
|
|
8
|
+
|
|
9
|
+
# [v20.0.0](https://github.com/purecloudlabs/genesys-cloud-streaming-client/compare/v19.8.0...v20.0.0)
|
|
10
|
+
### Breaking Changes
|
|
11
|
+
* [STREAM-1604](https://inindca.atlassian.net/browse/STREAM-1604) - Replace `uuid` with native `globalThis.crypto.randomUUID()`. `randomUUID()` has been widely available in browsers since 2022, so this should only affect you if you use streaming-client in an older browser. Also update `genesys-cloud-client-logger` from v4.2.18 to v5. Bump genesys-cloud-client-logger to v5.0.0.
|
|
8
12
|
|
|
9
13
|
# [v19.8.0](https://github.com/purecloudlabs/genesys-cloud-streaming-client/compare/v19.7.1...v19.8.0)
|
|
10
14
|
### Added
|