Uiza Documentation
2022-06-22
2022-06-22
  • Hola! 👋
  • Getting Started
    • Introduction
    • Authentication
    • Errors
    • Quick Starts
      • Live Streaming
      • Video Streaming
    • Pagination
    • Recommended Specifications
    • Sample Streaming Apps
      • NodeJS Live Streaming App
      • Java Live Streaming App
      • Python Live Streaming App
      • How to integrate live streaming into an Android App using Uiza’s Live API
    • Versioning
  • API Reference
    • Live Entities
      • Create a live entity
      • Retrieve a live entity
      • Update a live entity
      • Delete a live entity
      • List all live entities
      • Create a live relay
      • Update a live relay
      • Delete a live relay
    • Video Entities
      • Create a video entity
      • Retrieve a video entity
      • Update a video entity
      • Delete a video entity
      • List all video entities
    • Events
      • Event Types
    • Webhook Endpoints
      • Verifying signatures
      • Create a webhook endpoint
      • Update a webhook endpoint
      • Get a webhook endpoint
      • List all webhook endpoint
  • SDK REFERENCE
    • Introduction
    • Android SDK
      • Android Player SDK
      • Android Broadcast SDK
    • iOS SDK
      • iOS Player SDK
      • iOS Broadcast SDK
    • Web Player SDK
    • Flutter SDK
  • API UPGRADES
    • Release Notes
    • API Changelog
Powered by GitBook
On this page

Was this helpful?

  1. SDK REFERENCE

Web Player SDK

How to use Uiza's webSDK

  1. Include css, js into html:

<!-- 1. Include UIZA library. -->
<link href='https://cdn.jsdelivr.net/npm/@uizaio/playerjs@5.20.7-rc8/dist/uiza.css' rel='stylesheet' crossorigin='anonymous'> <!-- route to uiza.css -->
<script src='https://cdn.jsdelivr.net/npm/@uizaio/playerjs@5.20.7-rc8/dist/uiza.min.js' crossorigin='anonymous'></script> <!-- route to uiza.min.js -->

2. The video player will prepend the player into this <div> tag:

<video id='playerUiza' crossorigin playsinline autoplay muted></video>

3. This code creates an UIZA player:

<script>
  var videoSrc = "UIZA_PLAY_BACK_LINK"; // This may be PLAY_BACK_LINK (hls or dash)
  window.UZPlayer = new Uiza(document.getElementById("playerUiza"), {
    src: videoSrc,
  });
</script> 

4. Full code example:

<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8" />
    <title></title>
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <style>
      body {
        margin: 0;
        padding: 0;
      }
    </style>
    <link
      href="https://cdn.jsdelivr.net/npm/@uizaio/playerjs@5.20.7-rc8/dist/uiza.css"
      rel="stylesheet"
      crossorigin="anonymous"
    />
    <script
      src="https://cdn.jsdelivr.net/npm/@uizaio/playerjs@5.20.7-rc8/dist/uiza.min.js"
      crossorigin="anonymous"
    ></script>
  </head>
  <body>
    <video id="playerUiza" crossorigin playsinline autoplay muted></video>
    <script>
      var videoSrc = "UIZA_PLAY_BACK_LINK"; // This may be PLAY_BACK_LINK (hls or dash)
      window.UZPlayer = new Uiza(document.getElementById("playerUiza"), {
        src: videoSrc,
      });
    </script>
  </body>
</html>
PreviousiOS Broadcast SDKNextFlutter SDK

Last updated 2 years ago

Was this helpful?