Secure video player for Moodle
Universities and academies on Moodle can play lesson video to enrolled students only, with each student’s name on the picture and no way to download it.
Why XAPlayer for Moodle
Enrolled students only
Access is checked with Moodle’s own login and enrolment; anyone not in the course never sees the player.
Student name on the picture
The Moodle user’s full name moves across the video, so any leak is traceable.
Every lesson encrypted
Videos stream encrypted in three qualities; downloaders get nothing playable.
No load on your Moodle server
Video streams from XAPlayer, not your Moodle server, so bandwidth and storage aren’t your problem.
Three steps to secure playback
- Upload the videos in XAPlayer and create a course for each Moodle course.
- Add the three-file local/xaplayer plugin from the tutorial.
- Link the watch page from your Moodle course.
Tutorials and docs
A taste of the code
The full code, where it goes and how to test it are in the tutorial.
require_once(__DIR__ . '/../../config.php');
require_login($course); // only enrolled students
$res = (new curl())->post(XAPLAYER_API . '/embed-tokens', json_encode([
'courseId' => $xapcourse,
'viewer' => ['id' => (string) $USER->id, 'name' => fullname($USER)],
]), ['CURLOPT_HTTPHEADER' => ['Authorization: Bearer ' . XAPLAYER_KEY,
'Content-Type: application/json']]);
Questions
The tutorial targets Moodle 4 and uses Moodle’s standard tools (require_login and curl).
No. A three-file local plugin, given in full in the tutorial, is enough.
No. They sign in to Moodle and the video plays with their own name.
On XAPlayer, encrypted. Moodle only shows the watch page.
Other platforms
Protect your course today
Signing up takes two minutes. 14 days free, with 10 licenses on us.
Start your 14-day free trial