DRM-X 6.0 dove and olive branch logoDRM-X 6.0Docs
◎ English

Moodle protected-video activities

Install the Moodle activity, add protected content to a course, and reuse native enrollment and availability rules.

View MarkdownLive examplesUpdated 2026-09-25

Your setup at a glance#

Current download: 1.3.0-preview.6 · optional filter 1.3.0-preview.2.

You normally configure the plugin in your administration screens. Keep your existing users, purchases and enrollments; no separate access-grant records are needed.

  1. 1. Connect onceSite administration → Plugins

    Install the activity and enter your server credentials in its settings.

  2. 2. Choose the videoCourse → Add an activity

    Add DRM-X Protected Video; enter Content ID, VOD/Live and policy.

  3. 3. Keep course rulesActivity → Restrict access

    Use Moodle enrollment, availability and role permissions.

This is a field-location map, not a screenshot. Moodle labels and layout can vary by version and theme.

Install the activity module#

Install mod_drmx in Moodle through Site administration → Plugins → Install plugins. The plugin directory is mod/drmx. Complete the Moodle database upgrade, then open the DRM-X protected video activity settings.

Enter Site ID, Site Key, Access Key and the default license policy. For managed deployments, use Moodle forced_plugin_settings to inject these settings from protected host configuration.

Download the Moodle activity module

Create a protected-video activity#

Turn editing on in a course and add DRM-X Protected Video. In the DRM-X 6.0 Universal Player section, paste the published Content ID, select VOD or Live and choose a protection policy. The question-mark help explains each field; policy names include their API identifiers. Save and display, then test as a learner. Configure availability and completion using Moodle activity settings.

Every playback request checks the signed-in account, course enrollment, mod/drmx:view capability, and the visibility of this activity to that user. The requested Content ID must match the saved activity. Guests, suspended enrollments and unavailable activities are denied.

Completion tracking records that the activity was viewed. It does not prove that the learner watched the entire video.

Embed an existing activity with the filter#

Install filter_drmx after mod_drmx, then enable it in Manage filters. Use the course-module ID from the activity URL, not the internal video record ID.

{drmx activityid="123"}

Older contentid markup resolves only when exactly one DRM-X activity in the current course has that Content ID and content type. Copy credentials from the old filter settings into the activity settings; the old filter credential fields are no longer used.

Download the optional Moodle filter

Backups, restoration and testing#

The activity includes Moodle backup and restore handlers. Restoring an activity clears Content ID so an administrator must confirm the destination mapping before playback is enabled. Do not restore server credentials through course backups.

Moodle 5.2.2+ was installed locally and tested for activity binding, an altered Content ID, hidden activities and suspended enrollment. Test your own role overrides, group/date restrictions, backup restoration and actual DRM playback before rollout.

Player loading and HTTPS#

Upgrade mod_drmx to 1.3.0-preview.6. If you use the optional text filter, upgrade filter_drmx to 1.3.0-preview.2 as well. Complete the Moodle upgrade, purge all Moodle caches, then reload the page. The activity package includes the qualified Shaka runtime and DRM-X SDK in the required order and avoids the RequireJS anonymous-module conflict.

Use the DRM-X activity or its text filter to embed the player. Remove old, manually pasted Shaka and DRM-X script tags from the same page; mixing them with the plugin can restore the loading conflict. Do not disable Moodle’s RequireJS loader.

Open the learning site through HTTPS with a valid certificate. An HTTP LAN address such as http://192.168.31.98:8080 is not a secure browser context and may hide Encrypted Media Extensions (EME), which DRM playback needs. HTTP localhost is an exception for testing on the same computer. If HTTPS still reports EME unavailable, check that the browser supports DRM and that protected-content playback is allowed; embedded frames also need permission to use encrypted media.

Integration source downloads · ASP.NET Core integration · Node.js + Express integration

Upgrade the activity and verify access#

Back up Moodle, replace mod_drmx with preview.6 and complete Site administration → Notifications. Keep filter_drmx at preview.2 when you use the optional filter, then purge all Moodle caches. Existing activity mappings remain in place during a normal upgrade.

The activity rejects non-JSON requests, requests larger than 16 KiB and a returned session for a different Content ID. Use the bundled player and endpoint. Test enrolled and suspended users, hidden activities, date/group restrictions, altered Content IDs and actual playback. Backup restoration still requires an administrator to re-enter Content ID.