> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://fastpix.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fastpix.com/docs/_mcp/server.

# Set up filter plugin

The `filter_fastpix` plugin is a Moodle text filter. It looks for FastPix short codes in any rich-text content that Moodle renders, and replaces each short code with a video player. Teachers can drop a video into a forum reply, a course summary, or a Book chapter without creating a separate activity.

`filter_fastpix` is a display-only plugin. It stores nothing, tracks nothing, and grades nothing. For graded, completion-tracked videos, use the **FastPix Video** activity (`mod_fastpix`) instead. `filter_fastpix` builds on two other plugins: `local_fastpix` provides the FastPix credentials, HTTP gateway, and asset metadata, and `mod_fastpix` provides the view capability and player markup that the filter reuses.

The audience for this guide is Moodle site administrators (who install and order the filter) and teachers and content authors (who add the videos). A first-time setup takes about 5 minutes, assuming that `local_fastpix` and `mod_fastpix` are already installed.

\


## Before you begin

Make sure that you have:

* A Moodle site running version 4.5 LTS or later.
* PHP 8.1 or later. The plugin is tested through PHP 8.3.
* Site administrator access to your Moodle dashboard.
* `local_fastpix` 1.0.0 or later, installed and connected to a FastPix account. The **Test connection** button on the FastPix settings page must return a green `Authenticated` result.
* `mod_fastpix` 1.0.0 or later, installed. The filter reuses its view capability and its player.
* At least one public FastPix video to embed for verification. Open the video in the FastPix Dashboard and copy its playback ID.

> **Note:** You can't install `filter_fastpix` standalone. Moodle blocks the install with a dependency error until `local_fastpix` and `mod_fastpix` are present. If you haven't set those up yet, see [Integrate FastPix with Moodle](/docs/moodle/local-plugin) and [Set up the FastPix Video activity](/docs/moodle/mod-plugin) first.

\


## Install the plugin

You can install `filter_fastpix` from the Moodle plugins directory or from a ZIP file.

### Install from the Moodle plugins directory

1. Sign in to Moodle as a site administrator.
2. Go to **Site administration** > **Plugins** > **Install plugins**.
3. Search for **FastPix video embeds** and follow the prompts.

### Install from a ZIP file

1. Download the latest release from the [GitHub Releases page](https://github.com/FastPix/moodle-filter_fastpix/releases).
2. Sign in to Moodle as a site administrator.
3. Go to **Site administration** > **Plugins** > **Install plugins**.
4. Drag the ZIP onto the drop zone, or select **Choose a file** to upload it. Don't unzip the file first; Moodle installs the package directly from the ZIP.
5. Select **Install plugin from the ZIP file**, then continue through the validation screen.
6. On the **Plugins requiring attention** screen, select **Upgrade Moodle database now**.
7. When the upgrade finishes, select **Continue**.

\


### Enable the filter

Filters are inactive until you switch them on.

1. Go to **Site administration** > **Plugins** > **Filters** > **Manage filters**.
2. Find **FastPix video embeds** in the list.
3. In the **Active?** column, select **On**.

### Set the filter order

Place **FastPix video embeds** above the **Multimedia plugins** filter in the order list. On the same **Manage filters** page, use the up arrow next to **FastPix video embeds** until it sits above **Multimedia plugins**.

This ordering matters because some HTML-rewriting filters can transform the short code before `filter_fastpix` reaches it, which breaks the match. Running FastPix first guarantees that the short code is recognized.

\


## Add a video to a Moodle page

After the filter is enabled, you can embed a video by inserting a short code into any rich-text field. Both methods produce the same result; choose whichever fits your editor and workflow.

### Use the editor button

If the `tiny_fastpix` editor plugin is installed, the Atto or TinyMCE toolbar shows an **Insert FastPix video** button.

1. Place your cursor where you want the video.
2. Select **Insert FastPix video**.
3. Pick a video from the picker. Videos are listed by name.
4. Save the form. When the page is viewed, the filter renders the player in place of the short code.

\


### Paste a short code

You can also paste a short code directly into any rich-text field.

1. In the FastPix Dashboard, open the video and copy its **playback ID**.

2. In your Moodle rich-text editor, type or paste the short code, replacing `YOUR_PLAYBACK_ID` with the value you copied:

   ```
   {fastpix:pb_YOUR_PLAYBACK_ID}
   ```

3. Save the form. When the page is viewed, the filter renders the player in place of the short code.

Example:

```
{fastpix:pb_a1c229cb-fb6f-41b1-b4cd-d676585077d5}
```

### Short code syntax

The short code has three parts:

| Part               | Meaning                                                                         |
| ------------------ | ------------------------------------------------------------------------------- |
| `{fastpix:` … `}`  | Marks the text as a FastPix short code.                                         |
| `pb_`              | Declares that what follows is a playback ID.                                    |
| `YOUR_PLAYBACK_ID` | The video's playback ID. Letters, digits, hyphens (`-`), and underscores (`_`). |

You can put as many short codes as you want on a single page. Each one becomes its own player, and the surrounding text is left untouched.

\


## Verify the embed works

1. Save the page or post that contains your short code.
2. Reload the page as a student or other enrolled user. The short code should be replaced with a working video player.
3. Select **Play**. The video should stream from FastPix.

If the player doesn't appear, see [Troubleshooting](#troubleshooting).

\


## What each viewer sees

The filter renders a different result depending on the viewer's permissions and the state of the video.

| Situation                                                                               | What the viewer sees                                                                    |
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| The viewer has the `mod/fastpix:view` capability and the video is **public** and ready. | The video player.                                                                       |
| The viewer doesn't have the `mod/fastpix:view` capability.                              | The plain short-code text. No player, no error message.                                 |
| The video isn't found - wrong ID, deleted, or in a different FastPix account.           | "This video is unavailable."                                                            |
| The video exists but is still being processed.                                          | "This video is unavailable." The player appears automatically when processing finishes. |
| The video is private but not DRM-protected.                                             | A short notice pointing the viewer to the FastPix activity that hosts the video.        |
| The video is DRM-protected.                                                             | A short notice pointing the viewer to the FastPix activity that hosts the video.        |

The capability check runs per short code, in the place where the text appears. A viewer without permission sees the bare short code rather than an error or a broken player.

\


## Limitations

The filter is intentionally narrow. It handles casual embedding; the activity plugin handles graded viewing. Three things the filter doesn't do:

* **Embed private or DRM videos.** Both require short-lived playback tokens that are refreshed during the viewing session. A forum post or course summary doesn't have a session bound to it, so any token baked into the page would go stale within an hour. Use the FastPix activity for private and DRM videos.
* **Track viewing.** Watch progress, completion, and grades aren't recorded for embedded videos. Use the FastPix activity when you need any of those.
* **Upload videos.** The filter only renders videos that already exist in FastPix. Uploads happen in the FastPix activity or through the `tiny_fastpix` editor button.

\


## Filter ordering and other filters

Several Moodle filters rewrite content as it renders. Place **FastPix video embeds** above any filter that touches HTML, so that FastPix can match its short code before the text is rewritten. The recommended order, from highest to lowest:

```
FastPix video embeds        ← place here
Multimedia plugins
Activity names auto-linking
…
```

If you've already enabled `filter_fastpix` but short codes are appearing as plain text instead of players, the most common cause is filter ordering. Go back to **Manage filters** and confirm that **FastPix video embeds** sits above **Multimedia plugins**.

\


## Privacy

`filter_fastpix` doesn't store any personal data. It declares a `null_provider` under Moodle's Privacy API and delegates all video operations to `local_fastpix`. For full privacy details, see the documentation for [`local_fastpix`](/docs/moodle/local-plugin#privacy).

\


## Troubleshooting

### The short code appears as plain text instead of a player

The filter isn't matching the short code. Try the following:

* Confirm that **FastPix video embeds** is set to **On** at **Site administration** > **Plugins** > **Filters** > **Manage filters**.
* Confirm that the filter sits above **Multimedia plugins** in the filter order.
* Confirm that the short code is well-formed: `{fastpix:pb_<id>}` with the `pb_` prefix, and no spaces inside the braces.
* Confirm that the rich-text format isn't **Plain text**. The filter only runs against rich-text content.

### The player loads but shows "This video is unavailable"

The playback ID can't be resolved. Common causes:

* The ID is mistyped. Re-copy the playback ID from the FastPix Dashboard.
* The video was deleted in FastPix.
* The video is still processing. Wait a minute and reload the page.

### The player loads but shows a "watch in FastPix activity" notice

The video is private or DRM-protected, so the filter can't embed it. Open the FastPix activity that hosts the video, or change the video's access policy to **Public** in the FastPix Dashboard if it doesn't need protection.

### Some viewers see a player and others see the short code

This is expected. The filter checks the `mod/fastpix:view` capability per short code, in the context where the text appears. A viewer without that capability sees the raw short code instead of the player. Confirm the viewer's role in the course or system where the content lives, and grant `mod/fastpix:view` if appropriate.

### The player is a blank box

The player web component didn't load. This is usually a transient asset-loading issue. Reload the page. If the problem persists, confirm that the page is served over HTTPS, the player needs a secure context.

\


## What's next

* Set up the foundation plugin: [Integrate FastPix with Moodle](/docs/moodle/local-plugin).
* Add graded video activities: [Set up the FastPix Video activity](/docs/moodle/mod-plugin).
* Read the release notes: [`CHANGELOG.md`](https://github.com/FastPix/moodle-filter_fastpix/blob/main/CHANGELOG.md).