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.
- The
connnect
method 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 thedetails
property.
- STREAM-207 - [STREAM-207] handle ice candidates received before the offer (sdpOverXmpp only)
- 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
useServerSidePings
default
- 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
_eventTimestamp
on the InsightActionDetails type has been changed to anumber
from 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 ofvoid
session.sid
no longer exists. Usesession.id
instead.
- 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.keepTryingOnFailure
property which is passed intoStreamingClient.connect(...)
. Please useStreamingClientConnectOptions.maxConnectionAttempts
instead.
- 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 ofconnected
anddisconnected
events 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
reject
messages 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.connect
so 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
data
instead 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:autoReconnect
no longer default totrue
but 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-disconnected
event 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.json
entry point isrollup:bundle
as 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
SessionTypes
to anenum
but still left the union type as to not break consumers' typings. - Renamed
ISessionInfo
toIPendingSession
(but keptISessionInfo
for 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.x
to^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
.appId
should 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 tocommonJS
andES Modules
(cjs
&es
indist/
). Also, correctedpackage.json#module
to point to the built file (previously was pointing at the incorrect file name).
- PCM-1727 – Added optional config options
appName
andappVersion
to pass into the constructor. Streaming-client will send these values to the stats pushed to new relic.
- PCM-1715 - Updated to override how
stanza
currently ends sessions to prevent race condition. Now sendingsession-terminate
and if after two seconds the peer connection is still open, manually closing it.
- PCM-1722 - Fixed issue where file path in
package.json
did not match the actual built file path and where file path formodule
pointed to a file that did not exist.
- PCM-1712 - Fixed more cases of browser throttling due to setTimeout
- PCM-1692 - Bump
async
to3.2.1
(dep ofstanza
) to fix background tab throttling of WebSocket messages. This is causing webrtc sessions to not connect becausetransport-info
s 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
subscriptions
to 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
fromJid
from being logged. - PCM-1557 – set
iceTransportPolicy
to 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
noAuthHeader
toHttpClient.requestApi
'sRequestApiOptions
so callers can opt-out of using anauthorization
header.
- 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
optOutOfWebrtcStatsTelemetry
property 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
acceptRtcSession
on thewebrtcsessions
extension 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 callacceptRtcSession
at 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 callingrtcSessionAccepted
until the session has actually been received.
- Added a new function
rtcSessionAccepted
to send an 'accept' event
- No longer sending 'proceed' and 'accept' in the same call to
acceptRtcSession