Skip to main content

Token-gated video combines Lit Protocol’s decentralised access control with Livepeer’s JWT playback policy. A viewer proves NFT ownership to Lit; Lit returns a signed JWT; the Livepeer Player presents the JWT to the CDN edge for access. What you will build: A React application where only holders of a specific NFT contract can play a Livepeer-hosted video.

How it works

Viewer wallet → Lit Network (ownership check) → Signed JWT → Livepeer CDN (JWT verified) → Video playback
Three systems interact:
  • Lit Protocol — verifies on-chain conditions (NFT ownership) and issues access control conditions (ACCs) that gate a symmetric encryption key or a signed payload
  • Livepeer Studio — creates a JWT-protected asset and provides a signing key
  • Livepeer CDN — validates the JWT on every playback request at the edge

Prerequisites

  • Node.js 18 or later
  • A deployed NFT contract (ERC-721) on Ethereum mainnet or any supported chain
  • A Livepeer Studio API key with a JWT-protected asset already created
  • Familiarity with React and ethers.js or wagmi
npm install livepeer @livepeer/react @lit-protocol/lit-node-client ethers

Build the gate

Extending the gate

The access control conditions accept any Lit-supported chain and condition type:

Access Control

JWT and webhook-based access control without Lit Protocol.

IPFS Video Integration

Store video on IPFS and deliver via Livepeer.
Last modified on April 7, 2026