Legacy compatibility

V1 compatibility demo

Keep older Video.js-shaped integrations running while your new code moves to the modern Sopplayer API.

Legacy integrationvideojs() compatibility

Legacy setup

Load the bundle and keep calling videojs() plus familiar methods.

<video id="legacy-player" class="video-js" poster="poster.jpg">
  <source src="video.mp4" type="video/mp4">
</video>

<script src="sopplayer.min.js"></script>
<script>
  const player = videojs('legacy-player', {
    theme: 'duolingo'
  });

  player.ready(function () {
    player.play();
    console.log(player.duration());
  });
</script>