7c33de810f6397f191b24f546c667a5165761dad
TyClifford.com — Media Player
A self-hosted multimedia player website built with PHP + SQLite + Video.js.
Styled to match the existing gate.php / index.php dark theme exactly.
Requirements
- PHP 8.0+ with
pdo_sqlite,fileinfoextensions - Write permissions on the
data/andmedia/directories
Installation
-
Upload all files to your web server (e.g.
/live/or wherever/index.phplives). -
Set permissions so PHP can write to these directories:
mkdir -p data media/videos media/thumbs chmod 755 data media media/videos media/thumbs -
Visit
index.php— the SQLite database is created automatically on first load. -
Log into admin at
admin/login.php- Default password:
admin - ⚠️ Change it immediately in Admin → Settings → Change Password
- Default password:
File Structure
/ ← web root (deploy here)
├── index.php ← Main player + catalogue (home page)
├── catalogue.php ← Full video catalogue browse page
├── includes/
│ ├── db.php ← SQLite bootstrap + helper functions
│ └── layout.php ← Shared HTML head, topbar, footer, pagination
├── admin/
│ ├── index.php ← Video list with search + pagination
│ ├── add.php ← Add new video with multi-format sources
│ ├── edit.php ← Edit video metadata + manage sources
│ ├── settings.php ← Site settings, per-page count, password
│ ├── login.php ← Admin login
│ ├── logout.php ← Session destroy + redirect
│ └── auth.php ← Session auth helpers
├── media/ ← All media files (created automatically)
│ ├── videos/ ← Uploaded video files
│ └── thumbs/ ← Uploaded thumbnail images
└── data/
└── media.db ← SQLite database (auto-created)
Usage
Adding Videos (Admin)
- Go to
admin/add.php - Fill in title, description, duration, sort order
- Upload a thumbnail (JPG/PNG/WebP)
- Upload one or more video files — each can be a different format or quality:
- MP4 (H.264) — widest compatibility
- WebM (VP9) — smaller size, modern browsers
- OGV — Firefox fallback (legacy)
- Set quality labels (1080p, 720p, 480p, etc.)
- Save — Video.js will auto-select the best format the browser supports
Catalogue Per-Page
Configurable in Admin → Settings → Videos per page (1–50). The home page catalogue and the full catalogue page both respect this setting.
Publishing
Videos can be toggled between Published and Draft from the admin list. Only published videos appear on the public-facing pages.
Sorting
Use the Sort Order field — lower numbers appear first. Default is 0.
Player Features
- Video.js 8.x — responsive, accessible HTML5 player
- Custom skin matching the site's dark purple/green theme
- Playback rate controls: 0.5×, 1×, 1.25×, 1.5×, 2×
- Multiple source fallback — browser picks best format automatically
- Thumbnail posters
- Keyboard accessible
Security Notes
- Change the default admin password (
admin) immediately after setup - Consider adding
.htaccessHTTP auth or IP restriction to/admin/ - The
data/directory should not be web-accessible; add to.htaccess:<Directory data> Require all denied </Directory> - For production, consider adding CSRF tokens to admin forms
Customisation
- Branding: Edit site title/subtitle in Admin → Settings
- Theme colours: All CSS variables are in
includes/layout.php:root {} - Social links: Edit the About/Links cards in
index.php
Description
Media player built for TyClifford.com. Uses VideoJS, with capabilities of embedding direct URLs among other video embeds from other platforms.
https://play.tyclifford.com
Languages
PHP
100%