Migrating from v3.x.x to v4.x.x
Version 4.0.0 is a major release that brings new improved bundling to reduce the bundle size for most users.
Improved bundling
v4.x.x no longer exports everything under @vindral/web-sdk
. Instead, specific functionality has been moved to sub paths. The new exports have dynamic imports to reduce the amount of javascript end-users need to download.
@vindral/web-sdk
contains the Vindral class and related types.@vindral/web-sdk/api-client
exports the ApiClient.@vindral/web-sdk/cast-sender
exports the CastSender.@vindral/web-sdk/player
exports related functionality for our new web components based player.@vindral/web-sdk/legacy
is a fallback export to the old behaviour. Only use this if the new exports do not work for you.
Legacy support
Not interested in the improved bundle size or blocked by your bundler? You can import from @vindral/web-sdk/legacy
to keep thing working the same way as it did on version 3.x.x.
Testing
After completing the migration to v4.x.x and the improved bundling, its important to test that everything is working as expected. Most bundlers (Vite, Webpack v5, etc) will automatically handle dynamic imports and create split chunks, but in some cases if there are custom configurations this might not work out of the box.
Most of the bundle size savings comes from moving support for iOS <17 into split chunks, which means all other devices won't have to download that code. Because of this its important to test that the application has been correctly bundled for iOS <17. The expected behavior is that old iOS versions will download two extra chunks when connecting.
Player SDK
Deprecated: The Player SDK is deprecated and has been replaced with the Vindral Player. It can still be used with
@vindral/web-sdk/legacy
.