Skip to content
Getting started

Quick start

Run BaPlay, resolve your first video, and copy a responsive embed.

Launch the development workspace

The repository includes a Codespaces definition that installs PHP 8.3, Composer, Node.js 22, SQLite, Redis tooling, required extensions, migrations, and production assets. Local PHP installations can use the same commands.

cp .env.example .env
touch database/database.sqlite
composer install
npm ci
php artisan key:generate
php artisan migrate
npm run build
php artisan serve --host=0.0.0.0 --port=8000

Resolve your first video

Open the forwarded port and paste a supported public URL on the homepage, or call the anonymous resolver directly. The response uses BaPlay’s success envelope and includes player, iframe, stream, and API links.

curl -X POST http://localhost:8000/api/v1/embed \
  -H "Content-Type: application/json" \
  -d '{"url":"https://cdn.example.com/video.mp4"}'
Use only public media you are authorized to publish. BaPlay validates every server-side URL against private and reserved networks.

Next steps