Documentation

Migration guide

Move legacy Sopplayer or Video.js-shaped integrations toward Sopplayer v2 with minimal disruption.

Keep the legacy API

const player = videojs('my-video', {
  theme: 'default'
});

player.ready(function () {
  player.play();
  console.log(player.currentTime());
});

The compatibility adapter is exposed by the regular bundle, so older code can continue using familiar method names.

Prefer the modern API for new work

const player = new Sopplayer('#my-video', {
  theme: 'duolingo'
});

player.play();
console.log(player.currentTime);

Practical migration checklist

  • Keep your native <video> markup and media sources.
  • Use the versioned CDN or npm package.
  • Switch newly written code to the v2 constructor and API.
  • Use the V1 compatibility demo as a visual regression checkpoint.