Skip to content

jlin3/livekit-vr-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LiveKit VR Streaming Test

Goal: Test LiveKit for VR streaming without disrupting the current Unity Render Streaming setup.

This is a minimal proof-of-concept to validate:

  • ✅ LiveKit works with Unity on Quest
  • ✅ Recording works automatically
  • ✅ Video quality is acceptable
  • ✅ Parent notifications work via webhooks

Quick Start

1. Prerequisites

2. Backend Setup (5 minutes)

cd backend
npm install
cp .env.example .env
# Edit .env with your LiveKit credentials
npm run dev

3. Test Web Viewer (2 minutes)

cd viewer
npm install
npm start
# Open http://localhost:3000

4. Unity Setup (10 minutes)

See unity-setup/README.md for step-by-step Unity integration.


Project Structure

livekit-vr-test/
├── backend/              # Token generation server
│   ├── server.js        # Simple Express server
│   └── package.json
├── viewer/              # React web viewer
│   ├── src/
│   └── package.json
├── unity-setup/         # Unity integration guide
│   └── LiveKitTest.cs   # Simple Unity script
└── README.md

Test Plan

Phase 1: Basic Connection (Day 1)

  • Backend generates tokens successfully
  • Web viewer connects to LiveKit
  • Can see connection status

Phase 2: Unity Streaming (Day 2-3)

  • Unity project connects to LiveKit
  • Video stream appears in web viewer
  • Audio works
  • Quality is acceptable (1080p, 30fps)

Phase 3: Features (Day 4-5)

  • Recording saves to S3 automatically
  • Webhooks trigger on stream start/stop
  • Multiple viewers can watch
  • Works on Quest headset

Comparison with Unity Render Streaming

Feature Unity Render Streaming LiveKit
Setup Complexity Medium Low
Unity Code ~400 lines ~100 lines
Backend Code ~1000 lines ~200 lines
Recording DIY Built-in
TURN Servers Setup required Built-in
Multi-viewer Complex Native
Webhooks DIY Built-in
Cost $200-400/month $299/month

Decision Criteria

After testing, choose based on:

Choose Unity Render Streaming if:

  • ❌ LiveKit doesn't work on Quest
  • ❌ Video quality is worse
  • ❌ Integration is too complex
  • ✅ You want full control

Choose LiveKit if:

  • ✅ Works well on Quest
  • ✅ Video quality is good
  • ✅ Features work (recording, webhooks)
  • ✅ Simpler codebase

Getting LiveKit Credentials

  1. Sign up: https://cloud.livekit.io
  2. Create a project
  3. Copy credentials:
    • LIVEKIT_URL (wss://your-project.livekit.cloud)
    • LIVEKIT_API_KEY
    • LIVEKIT_API_SECRET
  4. Paste into backend/.env

Next Steps

  1. Today: Set up backend and test web viewer
  2. Tomorrow: Add Unity integration
  3. Day 3: Test on Quest headset
  4. Day 4: Test recording and webhooks
  5. Day 5: Make decision (keep or switch)

Support


Notes

This is a parallel test - your current Unity Render Streaming setup remains untouched. You can compare both approaches side-by-side before making a decision.

About

LiveKit proof-of-concept for VR streaming - test alternative to Unity Render Streaming

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors