Skip to main content
Version: 8.5.0

Migrating to THEOplayer Web SDK 8.x

This article will guide your through updating from THEOplayer Web SDK version 8 (from version 7), and the changes needed in your code.

Update THEOplayer

Run the following command to install THEOplayer Web SDK version 8:

npm install theoplayer@8

If you're using the Open Video UI for Web or one of our connectors, make sure to update them to the latest version too to ensure proper support for THEOplayer version 8.

npm update @theoplayer/web-ui
npm update @theoplayer/conviva-connector-web

Replace Conviva pre-integration with Conviva connector

Until version 7, the Web SDK shipped with Conviva support built into the SDK itself. As of version 8, this has moved to a separate Conviva connector.

  1. Follow the getting started guide for the Conviva connector.
  2. Remove any usages of the old source.analytics API with an equivalent ConvivaConfiguration.
  3. Replace any usages of the old player.analytics.conviva API with an equivalent on the ConvivaConnector API.

Replace Yospace pre-integration with Yospace connector

Until version 7, the Web SDK shipped with Yospace SSAI support built into the SDK itself. As of version 8, this has moved to a separate Yospace connector.

  1. Follow the getting started guide for the Yospace connector.
  2. Remove any usages of the old source.ssai API with an equivalent YospaceServerSideAdInsertionConfiguration.
  3. Replace any usages of the old player.yospace API with an equivalent on the YospaceConnector API.

Use csai for client-side ads with default integration

Until version 7, the default integration for client-side VAST and VMAP advertisements was named 'theo'. In version 8, this integration is now called 'csai'. Although the old name will continue working for a while, we still recommend updating your code:

  player.source = {
sources: {
src: 'https://cdn.theoplayer.com/video/big_buck_bunny/big_buck_bunny_metadata.m3u8',
},
ads: [
{
- integration: 'theo',
+ integration: 'csai',
sources: 'https://cdn.theoplayer.com/demos/ads/vast/dfp-preroll-no-skip.xml',
},
],
};

If you're using a different ad integration such as Google IMA, no action is needed.