Play Loom videos inside Moodle pages
Moodle turns YouTube and Vimeo links into players, but a Loom link stays a plain link. Our free media_loom plays Loom videos in place.
Short answer: many teachers record short screen videos with Loom. Paste a YouTube or Vimeo link into a Moodle page and learners get a player, but a Loom link stays a link that opens another tab. Our free plugin, media_loom, makes Moodle play Loom videos in place.
This is the eleventh plugin in our series: one plugin for each Moodle plugin type, each one teaching DevLMS Studio, our AI plugin builder, how that type works.
How to use it
- Enable it under Site administration > Plugins > Media players > Manage media players.
- Paste a Loom share link (
https://www.loom.com/share/...) into a page, a label, a forum post or any other text.
The link becomes Loom’s player. Nothing is stored in Moodle: the viewer’s browser loads the player from loom.com, so Loom’s own sharing settings still decide who can watch. Links that only look like Loom (another domain, a pricing page, a broken id) are left as links. It supports Moodle 4.5 LTS to 5.3. The code is on GitHub.
How a media player plugin works
From Moodle 5.3’s built-in Vimeo player:
- A media player is one class that recognises a kind of link with a regular expression, and draws a player for it.
- The “Multimedia plugins” filter, on by default, finds links in any formatted text and asks each enabled player whether it can play them. Players are tried in order of rank.
- A quick text check runs before the regular expression, so pages without Loom links cost almost nothing.
- The regular expression has to pin the domain exactly. Otherwise a link such as
loom.com.example.org/share/...would put someone else’s page inside your course.
We tested it with PHPUnit: a share link becomes the player, a link inside page text is turned into the player by Moodle’s filter, and look-alike links are left alone.
Need a plugin like this for your own Moodle?
Describe it in DevLMS Studio and watch it built and tested in a real Moodle, or ask our team for a fixed price.
Open DevLMS Studio