> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blindcast.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Player Overview

> Drop-in encrypted HLS playback for any web app. Single import, attach to a video element, point at your key server — 10 lines of code.

`@blindcast/player` adds zero-knowledge encrypted HLS playback to any web application. It plugs into [hls.js](https://github.com/video-dev/hls.js) via custom loaders that intercept key fetches and decrypt segments locally in the browser — plaintext video never leaves the viewer's device.

**Browser-only.** This package requires MSE (Media Source Extensions) and the Web Crypto API. It does not support Node.js.

## Install

```bash theme={null}
pnpm add @blindcast/player hls.js
```

`hls.js` is a peer dependency — install it separately.

## Browser support

Always call `isPlayerSupported()` before creating a player:

```typescript theme={null}
import { isPlayerSupported } from "@blindcast/player"

if (!isPlayerSupported()) {
  // Show a fallback message — browser lacks MSE or Web Crypto API
}
```

### Supported browsers

| Browser | Minimum version |
| ------- | --------------- |
| Chrome  | 37+             |
| Firefox | 34+             |
| Safari  | 11+             |
| Edge    | 79+             |

`isPlayerSupported()` returns `false` if either MSE or `crypto.subtle` is unavailable. This covers all modern browsers, including mobile.

## 10-line integration

```typescript theme={null}
import { createPlayer, isPlayerSupported } from "@blindcast/player"

if (!isPlayerSupported()) throw new Error("Unsupported browser")

const videoEl = document.getElementById("video") as HTMLVideoElement

const result = createPlayer(videoEl, {
  keyServerUrl: "https://keys.example.com/keys",
})
if (!result.ok) throw new Error(result.error.message)

result.value.load("https://cdn.example.com/content/my-video/manifest.m3u8")
```

That's it. The player fetches the manifest, gets the content key from your key server, and decrypts each segment as it downloads.

## Next steps

* [Basic Usage](/player/basic-usage) — events, metrics, and destroy
* [Authentication](/player/authentication) — add auth tokens to key requests
* [Leases](/player/leases) — revoke access without re-encrypting
* [API Reference](/player/api-reference) — full options, events, and error codes
