Developer Docs

CDN Integration

Use directly in the browser without a build setup.

Install (CDN)

<!-- CDN script options: include only one -->

    <!-- jsDelivr -->
    <script src="https://cdn.jsdelivr.net/npm/@pentaio/pentio-player/dist/index.global.js"></script>

    <!-- or unpkg -->
    <script src="https://unpkg.com/@pentaio/pentio-player/dist/index.global.js"></script>

Usage (Vanilla JS)

<!-- Render container -->
<div id="pentio-player" style="width: 800px; height: 450px;"></div>

<script>
  const PlayerCtor = window.PentioPlayer?.PentioPlayer || window.PentioPlayer;

  // Source can be either:
  // 1) Remote URL: "https://.../pentio.pto"
  // 2) Local asset/path: "./pentio.pto"
  const source = "https://.../pentio.pto";

  const player = new PlayerCtor({
    container: document.getElementById("pentio-player"),
    src: source,
    autoplay: true
  });

  // Controller API
  player.play();
  player.pause();
  player.resume();
  player.stop();
  player.setParam("Param_0", true);
</script>