Use case: courses
Video hosting for the lessons in your course
Lessons that stream on any connection, play only for the people who enrolled, and tell you who finished them.
Course videos
- Features that fit6
- Video hosting
The problem
A course is a lot of video that only some people should see. Students are on phones and slow connections, so each lesson has to play at a quality their connection can hold. You also want to know who finished a lesson, and captions help every learner.
Doing that yourself means an encoder, storage, a streaming format, a player, and a way to keep non-students out. Platforms that charge by the minute watched make a popular course more expensive the more it is used.
The Fileboy features that fit
Adaptive streaming
Upload the original and Fileboy makes sizes from 240p to 1080p as HLS and DASH. The player picks a quality for each student's connection and switches as it changes.
Lessons only for students
Make the app's reads signed, or a lesson private, and a video only plays with an expiring URL signed on your server. Check enrolment on your own server, then sign and pass it to the player.
Captions, a transcript and chapters
Attach a caption file per language or write the cues in the dashboard. The player shows a captions menu, a transcript panel students can search, and chapters on the seek bar.
Progress from the player
The player fires play, pause, timeupdate and ended events with the current time and duration, so your app can save where a student got to and mark a lesson done.
A course as a playlist
Put the lessons in order and embed them with one iframe that plays each in turn, with a list to pick from.
Where students stop watching
Views, watch time, completions and a retention curve for each video, counted by the Fileboy player with no cookies.
A short code path
import { Fileboy } from "@cd2/fileboy-node"
const fileboy = Fileboy({
publicKey: process.env.FILEBOY_PUBLIC_KEY!,
privateKey: process.env.FILEBOY_PRIVATE_KEY!,
})
app.get("/lessons/:id", async (req, res) => {
const lesson = await findLesson(req.params.id) // your code
if (!(await isEnrolled(req.user, lesson.courseId))) return res.sendStatus(403)
// One signature covers the manifest, segments, poster and captions.
// Make it last longer than the lesson takes to watch.
const signedQuery = fileboy.signVideo(lesson.videoId, { expiresIn: 4 * 3600 })
res.send(`
<script type="module" src="https://cdn.jsdelivr.net/npm/@cd2/fileboy-player@1.20/dist/fileboy-player.js"></script>
<fileboy-player video-id="${lesson.videoId}" signed-query="${signedQuery}"></fileboy-player>
`)
})Turn on signed URLs for the app first (see the privacy docs). In the page, listen for the player's ended event to mark the lesson complete.
What Fileboy does not do here
- Live classes. Fileboy is on-demand video only.
- DRM. A signed URL controls who gets in, not what they do once watching.
- Quizzes, certificates or progress tracking. Your app keeps those; the player tells you what was watched.
Guides, docs and product pages
- Video hosting
- Guide: stream video with HLS without running ffmpeg
- Guide: add captions to a video
- Guide: build a video library page
- Signed URLs
- Upload and process video
Other use cases: Product demos · User-generated clips · SaaS avatars and galleries · Screen recordings for support · Pricing · Compare alternatives
Try it with your own files
Create a free app, paste your public key into the code on this page and upload something of yours. The free plan needs no card.