diff --git a/README.md b/README.md index 28fd0ce..3568747 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ Styled to match the existing `gate.php` / `index.php` dark theme exactly. 3. Upload a thumbnail (JPG/PNG/WebP) 4. Add one or more video sources. Each source can be either: - an uploaded local video file, stored under `media/videos/` - - an external video URL, stored in SQLite and played directly by URL + - an external URL, stored in SQLite and played as a direct media source or provider embed 5. For uploaded files, supported formats include: - **MP4** (H.264) — widest compatibility - **WebM** (VP9) — smaller size, modern browsers @@ -73,7 +73,7 @@ Styled to match the existing `gate.php` / `index.php` dark theme exactly. 6. Set quality labels (1080p, 720p, 480p, etc.) 7. Save — Video.js will use the stored source location and auto-select the best format the browser supports -External URLs must use `http://` or `https://`. Uploaded files and remote URLs can be mixed on the same video. +External URLs must use `http://` or `https://`. Uploaded files and remote URLs can be mixed on the same video. Recognized provider URLs such as YouTube, Vimeo, Dailymotion, Twitch, Facebook, TikTok, Instagram, X/Twitter, SoundCloud, Spotify, Google Drive, Wistia, Streamable, and Loom render through their embed players. ### Public Search @@ -102,6 +102,7 @@ Use the **Sort Order** field — lower numbers appear first. Default is 0. - Playback rate controls: 0.5×, 1×, 1.25×, 1.5×, 2× - Multiple source fallback — browser picks best format automatically - Local uploaded sources and remote URL sources +- Provider embeds for popular video and audio platforms - Thumbnail posters - Keyboard accessible diff --git a/admin/add.php b/admin/add.php index 2f402b3..d8eb502 100644 --- a/admin/add.php +++ b/admin/add.php @@ -83,7 +83,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $db->prepare(" INSERT INTO video_sources (video_id, label, source_type, file_path, source_url, mime_type, quality, sort_order) VALUES (?,?,?,?,?,?,?,?) - ")->execute([$video_id, $label, 'remote', '', $url, mime_from_ext($url), $quality, $sort]); + ")->execute([$video_id, $label, 'remote', '', $url, source_storage_mime_from_url($url), $quality, $sort]); $inserted_sources++; continue; } @@ -259,7 +259,7 @@ render_head('Add Video — Admin', '
Video Sources
- Upload a video file or link to an external video URL. The database stores where each source lives, and the player uses that location at playback time. + Upload a video file, link a direct media file, or paste a provider page URL such as YouTube or Vimeo. The player will use a provider embed when the URL supports it. Uploaded files: MP4, WebM, OGV, MOV, MKV, AVI. Remote URLs must use http:// or https://.
@@ -270,7 +270,7 @@ render_head('Add Video — Admin', 'Add New Sources
-Upload another file or link an external URL. Remote URLs must use http:// or https://.
+Upload another file, link a direct media file, or paste a provider page URL such as YouTube or Vimeo.