GitHub
Static CDN • Zero Backend

Modern Video CDN
via GitHub Pages

Host vertical videos with JSON API endpoints, auto-generated thumbnails, and real metadata extraction. No backend required.

10
Videos
180MB
Total Size
3
API Endpoints
5
Playlists

Why Fox CDN?

Zero Backend

Pure static files served via GitHub Pages. No server setup, no infrastructure costs.

🎬

Auto Thumbnails

Thumbnails automatically generated from video frames using ffmpeg.

📊

Real Metadata

Accurate video data extracted via ffprobe: duration, bitrate, FPS, dimensions.

📱

Mobile Optimized

Vertical videos (1080x1920) perfect for mobile and social media.

🔌

JSON API

RESTful-style API endpoints for videos, feeds, and playlists.

🌐

CORS Friendly

Public CDN with CORS enabled for easy cross-origin requests.

API Reference

Simple JSON endpoints for accessing video data

GET /api/videos.json View API →

Returns complete catalog with video metadata, sources, and thumbnails.

Response
{
  "version": 1,
  "updated_at": "2025-12-09T15:00:00Z",
  "videos": [
    {
      "id": "4761249",
      "slug": "mobile-short-01",
      "title": "Mobile Portrait Short 01",
      "duration_seconds": 5.91,
      "fps": 30,
      "size_bytes": 3786660,
      "tags": ["vertical", "mobile", "short"],
      "sources": [{
        "quality": "1080p",
        "codec": "h264",
        "url": "https://trebla-io.github.io/fox-cdn/videos/mobile-short-01/video.mp4"
      }],
      "thumbnail": {
        "url": "https://trebla-io.github.io/fox-cdn/videos/mobile-short-01/thumbnail.jpg"
      }
    }
  ]
}
GET /api/feed.json View API →

Returns ordered feed of video IDs for sequential playback.

Response
{
  "version": 1,
  "feed": [
    { "video_id": "mobile-short-01", "position": 1 },
    { "video_id": "mobile-short-02", "position": 2 },
    { "video_id": "mobile-short-03", "position": 3 }
  ]
}
GET /api/playlists.json View API →

Returns curated playlists organized by video length and characteristics.

Response
{
  "playlists": [
    {
      "id": "short-videos",
      "title": "Short Videos",
      "description": "Quick clips under 10 seconds",
      "videos": ["mobile-short-01", "mobile-short-02"]
    }
  ]
}

Code Examples

Get started in minutes with these examples

TypeScript
async function fetchVideos() {
  const res = await fetch(
    "https://trebla-io.github.io/fox-cdn/api/videos.json"
  );
  
  if (!res.ok) {
    throw new Error("Failed to fetch videos");
  }
  
  const data = await res.json();
  return data.videos;
}

// Usage
const videos = await fetchVideos();
console.log(`Found ${videos.length} videos`);
TypeScript
async function playVideo(slug: string) {
  const videos = await fetchVideos();
  const video = videos.find(v => v.slug === slug);
  
  if (!video) {
    throw new Error(`Video not found: ${slug}`);
  }
  
  const videoElement = document.createElement('video');
  videoElement.src = video.sources[0].url;
  videoElement.poster = video.thumbnail.url;
  videoElement.autoplay = true;
  videoElement.loop = video.meta.loop;
  videoElement.muted = video.meta.mute_default;
  
  document.body.appendChild(videoElement);
  return videoElement;
}

// Play a short video
playVideo('mobile-short-01');
TypeScript
async function loadPlaylist(playlistId: string) {
  const [playlists, videos] = await Promise.all([
    fetch("https://trebla-io.github.io/fox-cdn/api/playlists.json")
      .then(r => r.json()),
    fetchVideos()
  ]);
  
  const playlist = playlists.playlists.find(
    p => p.id === playlistId
  );
  
  if (!playlist) {
    throw new Error(`Playlist not found: ${playlistId}`);
  }
  
  return playlist.videos.map(slug => 
    videos.find(v => v.slug === slug)
  );
}

// Load short videos playlist
const shortVideos = await loadPlaylist('short-videos');

Video Library

10 vertical videos organized by length

Professional Video Streaming

Stream-ready CDN with embeddable player and direct video access

Select a video to start streaming

Status: Ready
Quality: 1080p
Codec: H.264

Stream Options

<!-- Select a video to generate embed code -->
🎬
--
Duration
📊
--
File Size
--
FPS