# 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 -->
```

&#x20;2\. The video player will prepend the player into this \<div> tag:

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

&#x20;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>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.uiza.io/sdk-reference/web-player-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
