All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- STREAM-1604 - Replace
uuidwith nativeglobalThis.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 updategenesys-cloud-client-loggerfrom v4.2.18 to v5.
- STREAM-1661 - Expose current alerting leader status rather than exposing a snapshot of the value. The previous property is now deprecated.
- STREAM-1488 - Update
axiosto v1.15.2
- STREAM-1322 - Fix
logLeveloption being ignored. The value was not copied fromIClientOptionsinto the internal config, so the logger always defaulted to'info'.
- STREAM-1155 - Allow clients to become the alerting leader and listen for alerting leader events.
- STREAM-949 - Catch errors and emit them as a
disconnectedevent and include error. - STREAM-1201 - Add ability to track internally-used subscriptions.
- STREAM-1179 - Add a config option to allow a streaming-client instance to be marked as alertable (internal-use only).
- STREAM-1208 - Update axios to 1.13.5 to address vulnerability.
- STREAM-838 - Add API based connectivity check for Auth Token clients
- STREAM-1422 - Update axios to 1.15.0 to address vulnerability.
- STREAM-1271 - Fix unhandled errors during hard reconnect resubscribe in
handleStanzaInstanceChange
- STREAM-995 - Include
missingPermissionson topic subscribe Error.
- STREAM-997 - Updated requestWithApiRetry to retry on network error codes. Added maxAttempts option to requestApiWithRetry.
- STREAM-1006 - Added ECONNRESET to the list of network error codes to retry on.
- STREAM-1026 - Filter out all IP addresses (local, remote, and related) from stats event details before sending to New Relic. See MDN documentation for more details on potential IP address exposure.
- STREAM-941 - Fix an issue where notifications.subscribe() with
enablePartialBulkResubscribewould not resolve/reject based on API result when the requested topic was internally combined with others, e.g. "topic.a" and "topic.b" individually subscribed and bulk resubscribe combines them as "topic?a&b" - STREAM-950 - Update genesys-cloud-client-logger to pick up change moving from
unloadtovisibilitychange. - STREAM-824 - Handle new SDP offer for live screen-monitoring.
- STREAM-643 - Bumped webpack dependency to 5.94.0
- STREAM-865 - Generate a test report in JUnit.xml format.
- STREAM-892 - Add
enablePartialBulkResubscribeclient option to make notifications bulk subscription changes succeed or fail each topic independently rather than a single failed topic causing the whole bulk operation to fail.
- STREAM-865 - Remove the SDP payload from SDP answer logs.
- STREAM-801 - Update genesys-cloud-client-logger and axios to address Snyk vulnerability.
- STREAM-631 - Remove pipeline infra from open-source.
- STREAM-154 - Track StanzaMediaSessions so events can still be processed if streaming-client is disconnected and reconnected.
- STREAM-155 - Calling
disconnectwill now stop any in-progress connection attempts.
- STREAM-653 - Added fields to upgradeMediaPresence stanza definition.
- STREAM-85 - Handle connection transfer (
v2.system.socket_closing) message from Hawk signaling a reconnect is necessary - STREAM-652 - Added GitHub Actions for linting, testing, and building in an effort to make the build process more transparent and reliable.
- STREAM-262 - Set the state of a GenesysCloudMediaSession to
endedwhen aterminateis received (or we determine a hard closure of the PeerConnection is needed) - STREAM-582 - Fix issue where
session-initiatewas not ignored when SDP-over-XMPP was turned on for a session.
- STREAM-534 - Fix issue where sdpOverXmpp flag could be overridden by a subsequent propose.
- STREAM-63 - Added in check to ensure customHeaders is passed in for every API request call
- STREAM-462 - Update Stanza timeout timer to 35 seconds to align with the updated server timeout.
- STREAM-461 - Remove support for conferenceId in JWT auth (not breaking change, never released).
- STREAM-461 - Allow for conferenceId or JID to be used in JWT auth.
- STREAM-523 - Properly emit
connectionStateevent while using SDP over XMPP
- STREAM-357 - Maintain the same JID resource across hard reconnects/websockets/stanza instances so that reinvites can be sent to the new WS/stanza instance.
- STREAM-380 - Including line break for ice candidate SDP to follow the spec
- Lru-cache was upgraded from v6 to v11, which uses newer language features. Depending on your language target version, you may need to configure a transpiler accordingly. For example, we added
plugin-proposal-class-propertiesandplugin-transform-private-methodsto our Babel config for streaming-client. - Support for IE has been removed.
- STREAM-313 - Streaming-client will ignore duplicate reinvite offers.
- PCM-2081 - Set meetingId when initializing GenesysCloudMediaSessions and only delete pending sessions when processed for the right session type.
- STREAM-324 - Support for IE has been removed.
- STREAM-207 - [STREAM-207] handle ice candidates received before the offer (sdpOverXmpp only)
- STREAM-326 - Track SDP over XMPP differently so we can handle Jingle session-initiate and SDP offers in any order.
- The
connnectmethod will now throw a StreamingClientError with a type indicated, rather than the passing through the underlying error. The error that was previously thrown will still be available via thedetailsproperty.
- STREAM-162 - Streaming-client should trigger re-auth for some SASL errors (and 401s) - this will be indicated by a StreamingClientError of type
.invalid-token.
- STREAM-218 - update the conversationId on sessions with reinvites
- STREAM-212 - Log the session id rather than the whole session to prevent logging a large object
- [NO-JIRA] - Bump stats-gatherer and client-logger to pick up fixes
- STREAM-178 - Clean up session with dead peerConnections on them after system wake.
- STREAM-69 - Don't send stats when offline and start sending stats again when online.
- STREAM-146 - Update logging for new JSON-RPC commands.
- STREAM-172 - Update axios to address Snyk vulnerability
- STREAM-153 - Don't stop sending stats when stopping server logging.
- STREAM-134 Isolate streaming client backoff delays by app name
- [no-jira] Fix string interpolation for log message and update docs for
useServerSidePingsdefault
- STREAM-108 Update ws to address Snyk vulnerability
- STREAM-71 - proxy the priv-answer-mode param on the propose to the pendingSession (used for internal purposes)
- STREAM-96 - Forcefully disconnect the WebSocket when missed pings are detected to help reconnect faster
- WEBRTCS-1106 - update client to support renegotiations between persistent connection calls and ice restarts
- PCM-2352 - Use a timeout when using server-side pinging to detect when a connection has dropped
- [NO-JIRA] - Removed Spigot testing from Jenkins build step.
- [NO-JIRA] - Reverted PCM-2321, server-side pinging.
- PCM-2347 - Updated client-logger to fix critical Snyk vulnerability.
- PCM-2344 - Added ability to pass in custom headers for telemetry purposes (internal use only).
- PCM-2191 - add meetingId property to the pendingSession and the mediaSession objects
- PCM-2321 default to server-side pinging, fallback to client side pinging
- PCM-2312 bump logger version
- PCM-2304 Made connection backoff semi-persistent through the sessionStore. Updated stanza to circumvent browser intensive throttling on connection attempts.
- PCM-2314 Fix softphone calls with users' emails beginning with "acd-"
- PCM-2295 New relic stat for when navigator.onLine changes
- [no-jira] Fix snyk vulns: axios and follow-redirects
- The
_eventTimestampon the InsightActionDetails type has been changed to anumberfrom astring. If proxying stats, you should be supplying a number representing ms since epoch, e.g.new Date().getTime().
- PCM-2276 Change to nr timestamp from string to number
- PCM-2276 Added an function to proxy stats to nr from other apps like the webrtc sdk; Fixed some issues with nr stats gathering.
- PCM-2223 Fix unintentional breaking change with types
- PCM-2262 Fixed snyk vulnerability SNYK-JS-AXIOS-6032459
- PCM-2223 - Add broadcast messaging capability between instances of a given user
- PCM-2091 - Be able to handle a duplicate channel message from hawk signaling a mandatory hard reconnect
- PCM-2163 - don't log turn server creds
- PCM-2114 - fix false-positive timeout error for ending reinvited sessions
session.end()now returns aPromise<void>instead ofvoidsession.sidno longer exists. Usesession.idinstead.
- PCM-2114 - proxy the reinvite property through for the offer (sdp over xmpp)
- [PCM-2141]((https://inindca.atlassian.net/browse/PCM-2141) - Sanitize auth token from error responses
- [PCM-2100]((https://inindca.atlassian.net/browse/PCM-2093) - Removed overly noisy data channel message logs.
- PCM-2093 - Fixed error that occurs when connection is disconnected remotely before it has finished connecting
- PCM-2089 - fixed another case for connection fan-out
- PCM-2089 - fixed a case where we timeout the connection attempt then it connects anyway
- PCM-2089 - [CRITICAL FIX] fixed issue where failing the initial service discover request causes connection instance fan out. We now clean up the websocket if an error happens after the socket is connected, but before the rest of the connection setup is completed. We also added a fixed number of attempts a client will reuse a channelId. Adjusted max exponential backoff to 90 seconds now that we have a concrete solution to the spamming connection attempts.
- We deprecated the
StreamingClientConnectOptions.keepTryingOnFailureproperty which is passed intoStreamingClient.connect(...). Please useStreamingClientConnectOptions.maxConnectionAttemptsinstead.
- PCM-2082 - Deprecated the
StreamingClientConnectOptions.keepTryingOnFailure. Changed the default maxConnectionAttempts to 15, and increased the default exponential-backoff delay for connection attempts from 10 seconds to 3 minutes.
- PCM-2042 - add the ability to handle/manage sessions via sdp over xmpp rather than jingle. We will default to jingle unless the propose says to use sdp over xmpp in which case we will spin up a dummy session for jingle (since we can't stop jingle from handling a session-init) and terminate it immediately, silently.
- PCM-2075 - Fix requestApiWithRetry to respect the retry-after response header; retryPromise now allows a number in the retry handler to override the future delay.
- PCM-2058 - bump stats gatherer
- [no-jira] bump stats gatherer
- PCM-2045 - increased timeout for disconnecting
- PCM-2045 - fixed various issues with the latest release. 1) error in the streaming-client bundle when sending stats. This was due to a bad import syntax in webrtc.ts. 2) race condition for setting up spigot tests. This is happening because spigot is trying to setup a session before the ice servers have come back during bootstrap. 3) jid issues in webrtc.ts. We used to rely on the client.config.jid for the jid, but now we will pull it directly from the stanzaInstance, or it will be null.
client.reconnect()no longer exists because it doesn't really make sense. If you need the reconnect functionality for some reason, you'll have to manually calldisconnect()andconnect().- If you are interacting with the stanza instance itself, e.g.
streamingClient._stanzaio, then you will have issues.
- PCM-2031 - Allow specifying response type to fix the "No root element" error when firefox tries to parse empty XHR responses.
- PCM-2024 - Redo connection and reconnection logic
- This shouldn't have any blatantly breaking changes unless you are reaching through the streaming-client to get a hold of the stanza/jingle
instance. Essentially we've changed the connection logic in a way that every single connection attempt is made using a brand new instance
of stanza. The reason for this is now we can guarantee we are not confusing events from old stanza sessions with new stanza sessions. The
major driver of this methodology change is because stanza's
connect()function is not atomic and it is possible to receive a mismatched number ofconnectedanddisconnectedevents from stanza.
- This shouldn't have any blatantly breaking changes unless you are reaching through the streaming-client to get a hold of the stanza/jingle
instance. Essentially we've changed the connection logic in a way that every single connection attempt is made using a brand new instance
of stanza. The reason for this is now we can guarantee we are not confusing events from old stanza sessions with new stanza sessions. The
major driver of this methodology change is because stanza's
- PCM-2020 - Remove data-channel logs to reduce console clutter.
- PCM-1968 - More verbose logging around interruption states
- PCM-1993 - Handled
rejectmessages and treat the corresponding session as handled
- PCM-1988 – Add jidResource support for jwt tokens.
- PCM-1992 – Update to the latest logger so unsent logs get preserved.
- PCM-1972 – Added support for data channel messages if initially offered in the sdp
- PCM-1963 - Added missing error text from switch to Axios from SuperAgent.
- PCM-1944 – Added reconnect options to the
streamingClient.connectso it will continue to try to connect at a given interval. This is separate from the reconnection logic in the case where the client connected but disconnected unexpectedly.
- PCM-1955 – Fix the requestApiWithRetry fn so that it will actually retry
- PCM-1935 – added build, deploy, and publish notifications to the Jenkinsfile
- PCM-1819 Added separate backgroundassistant endpoints that will be used when using a screen recording jwt
- PCM-1926 – make sure that the
data(ie. body) is sent with HTTP post & put requests.
- Added instance level version property. The streaming-client version can now be accessed statically or on constructed instances.
- HttpClient response objects now use
datainstead ofbody. For example, if you make a request like this:
const response = await HttpClient.requestApi('/users/', { method: 'get' })
// old way which is no longer valid:
const users = response.body;
// new way:
const users = response.data;- PCM-1837 – add
setAccessToken(token)function - PCM-1844 – stop sending logs on disconnect:
- add
stopServerLogging()&startServerLogging()functions to allow consumers to stop sending server logs that are sent via the client-logger. - on
client.disconnect(), logs will stop being sent to the server. - on
client.connect(), logs will start being sent to the server again.
- add
- PCM-1842 – migrate to the new pipeline. Also versioning cdn urls with major and exact versions. For example:
/v13.5.0/streaming-client.browser.js(exact version)/v13/streaming-client.browser.js(locked to latest for a specific major version)
- PCM-1842/PCM-1560 – Upgrade to new pipeline
- ACE-2053 – Remove superagent which is no longer maintained in order to get away from the 'formidable' snyke vulnerability.
- PCM-1908 – fixing some
.connect()functionality:autoReconnectno longer default totruebut will be set to true after successfully connecting once- when
connect()times out, it will call through to stop any pending WS connect that stanza my still be attempting connect()will now reject when stanza emits a--transport-disconnectedevent which is what stanza emits when there was a WS connection that failed or terminated. Note that stanza does not surface the error, so we will be rejecting with a generic error.
- Addressed snyk and npm audit issues
- PCM-1862 - remove individual topics from the tracked lists (subscriptions) after their last handlers have been removed. Fixed
_notifications.resubscribe()to not treat individual topics as bulk topics
- PCM-1773 – Added an es bundle for consumers that cannot bundle mixed node_modules.
package.jsonentry point isrollup:bundleas to not coflict with the SDK'ses:bundle. This is effectively not "turning on" this feature. But can still be opt-in. Generally, if this is needed, consumers should be utilizing the SDK's bundled es modules. - PCM-1770 – Converted
SessionTypesto anenumbut still left the union type as to not break consumers' typings. - Renamed
ISessionInfotoIPendingSession(but keptISessionInfofor backwards compatibility).
- PCM-1753 – Add an option for log formatters
- PCM-1760 – GenesysCloudMediaSessions are now passed the correct sessionType
- repeat of 13.3.5
- PCM-1758 – Auto send proceeds after the initial proceed when we get proposes
- PCM-1754 – Added several webrtc related logs
- PCM-1752 - Tag all the messages from the webrtc sessions with conversationId, sessionType, and sessionId.
- PCM-1749 - Streaming client will now automatically update ice servers every 6 hours. Also added some minor logging enhancements.
- PCM-1749 - Periodically refresh the ice servers so the turn creds are up to date.
- Bumped from stanza
^12.13.xto^12.17.x - PCM-1737 – Pulled in GenesysCloudClientLogger.
- Streaming-client will now construct its own logger to send logs to the server. Opt out of this by using
optOutOfWebrtcStatsTelemetry = true. - Added the following options to constructor config:
logLevel,appId, andlogger.appIdshould be a unique identifier of the parent app to be able to tie individual clients to each other in the logs.
- Streaming-client will now construct its own logger to send logs to the server. Opt out of this by using
- PCM-1726 - Removed
package.json#browser(it still gets built and is available atdist/streaming-client.browser.js) since streaming-client is only designed for the web anyway. Keeping the build tocommonJSandES Modules(cjs&esindist/). Also, correctedpackage.json#moduleto point to the built file (previously was pointing at the incorrect file name).
- PCM-1727 – Added optional config options
appNameandappVersionto pass into the constructor. Streaming-client will send these values to the stats pushed to new relic.
- PCM-1715 - Updated to override how
stanzacurrently ends sessions to prevent race condition. Now sendingsession-terminateand if after two seconds the peer connection is still open, manually closing it.
- PCM-1722 - Fixed issue where file path in
package.jsondid not match the actual built file path and where file path formodulepointed to a file that did not exist.
- PCM-1712 - Fixed more cases of browser throttling due to setTimeout
- PCM-1692 - Bump
asyncto3.2.1(dep ofstanza) to fix background tab throttling of WebSocket messages. This is causing webrtc sessions to not connect becausetransport-infos were being throttled. - PCM-1701 - Do not add/use Google STUN servers by default (ie. override
stanza's default behavior of adding these to the config). - PCM-1529 - Soft reconnects will actually attempt to connect a WebSocket
- PCM-1624 - Added logging for failed HTTP requests to console - not sending to Sumo.
- fixed unit tests in later versions of node
- added more logging around webrtc signaling
- PCM-1615 – Fixed Force TURN for Firefox browser
- PCM-1547 - Fixed 1:1 video alert toast hanging after answer timeout and fixed invites hanging when accepting 1:1 video call with two clients open.
- PCM-1561 - Added logging for ICE and connection state changes.
- PCM-1572 – changed http request to
subscriptionsto not retry on failures. - Removed PII logging from failed HTTP requests
- PCM-1552 – reworked ping timer logic to avoid chrome v88 timer throttling (read here: https://developer.chrome.com/blog/timer-throttling-in-chrome-88/)
- PCM-1558 – removed IP addresses from stats sent to New Relic. Removed
fromJidfrom being logged. - PCM-1557 – set
iceTransportPolicyto use force TURN if only TURN servers are received
- PCM-1560 – added spigot tests to replace valve
- PCM-1518 – optimize stats to not send as often
noAuthHeadertoHttpClient.requestApi'sRequestApiOptionsso callers can opt-out of using anauthorizationheader.
- PCM-1540 - formatting http errors from superagent better
- PCM-1516 – hard reconnects were not retried making network losses fatal
- PCM-1525 - fix xml attr for conversationId for upgrademedia stanza
- Added the ability to specific the jid resource as a config option
- fix the main and module references in package.json
- notifications.unsubscribe will clean up all handlers if a handler isn't provided
- Fixed iceTransportPolicy (forced turn) on webrtc-sessions
- Fixed the screenstart and screenstop stanzas
- xmppSubscribe and xmppUnsubscribe now return a promise and no longer take a callback
- most of the methods in webrtcSessions have changed to return promises
- wild-card event listeners are no longer a thing
- For improvement metrics, we now send time series stats data to Genesys Cloud API. Added
optOutOfWebrtcStatsTelemetryproperty to client config
- genesys-cloud-webrtc-sessions is no more. A replacement now exists directly in streaming-client
- upgraded to stanza12
- streaming-client is now in typescript
- update webrtc-session library
- put in a hack to handle to webpack weirdness for angular builds
- modified commonjs webpack build/transpile to a commonjs compatible file
- fixed package.json main field to point to new commonjs built file
- updates some dependencies
- package and library renamed to genesys-cloud-streaming-client
- changed package.json main field to point to es6 source file
- debug level logging on ajax requests
- updated auth failure log to pass channelId into the details object - PR#57
- updated to use genesys-cloud-streaming-client-webrtc-sessions
- version bump of purecloud-streaming-client-webrtc-sessions to 7.2.81
- [ENGAGEUI-3797] add functionality for optionally setting topic priorities and prioritizing topic list
- Limit topic subscriptions and log dropped topics
- Log more info with missed pings/pongs
- version bump of purecloud-streaming-client-webrtc-sessions to 7.2.80
- add logging for explicit actions
- bump genesys-cloud-streaming-client-webrtc-sessions to 7.2.29
- Added a config option to disable reconnecting when receiving a no_longer_subscribed message
- Included channelId in error logs
- Added changelog file
- Fixed an issue with topics not being combined correctly - PR #43
- In previous versions, calling
acceptRtcSessionon thewebrtcsessionsextension would send both a 'proceed' and 'accept' stanza in one call. This caused race a condition when multiple clients using autoAnswer were open. They would callacceptRtcSessionat the same time which sent the other client an 'accept' stanza, resulting in neither client actually handling the incoming session. As a result, we recommend not callingrtcSessionAccepteduntil the session has actually been received.
- Added a new function
rtcSessionAcceptedto send an 'accept' event
- No longer sending 'proceed' and 'accept' in the same call to
acceptRtcSession