Upgrade to v2
v2 of the JavaScript client is in beta. This page tracks what you have to change when moving from v1. So far that is a handful of APIs that were deprecated in v1 and are now removed.
Install the beta
v2 publishes to the beta npm tag. v1 keeps latest, so an unpinned install stays on v1.
yarn add @stream-io/video-client@betaRemoved APIs
These were deprecated in v1 and are gone in v2. TypeScript flags every one of them.
| Removed | Replacement |
|---|---|
logger and logLevel client options |
logOptions: { default: { level, sink } } |
call.publishVideoStream(), call.publishAudioStream(), call.publishScreenShareStream() |
call.publish(stream, TrackType.VIDEO) (or TrackType.AUDIO, TrackType.SCREEN_SHARE) |
secret and allowServerSideConnect client options |
Use @stream-io/node-sdk for server-side work |
const client = new StreamVideoClient({
apiKey,
user,
token,
options: {
logOptions: { default: { level: "debug" } },
},
});The client and authentication guide covers logging in full.
What to expect during the beta
Breaking changes land incrementally rather than all at once, so treat this page as the running list and re-read it when you bump. Each entry will name the version it landed in and the change you have to make.
If you hit something that behaves differently and is not listed here, that is worth reporting: an unlisted break is a bug in this page as much as in the SDK.
Staying on v1
v1 is maintained on its own release line and stays on the latest tag. If you are not
ready to move, pin @stream-io/video-client@latest and switch this page to v1 with the
version picker above.