WP Manifestindependent plugin directory
manifest / media / wp-mux-livestream

WP Mux Livestream

Provides a Wordpress block to embed a Mux livestream on your Wordpress site.

by Steffen Müller · github.com/steff-mueller/wp-mux-livestream

0stars
1forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/steff-mueller/wp-mux-livestream/archive/refs/heads/main.zip

Provides a Mux Livestream block to embed a livestream on your Wordpress site. If the livestream is not active, it displays the last recording.

This plugin requires a https://www.mux.com account.

Installation

  1. Download the latest plugin zip file from releases and install the plugin.
  2. In Wordpress, go to "Settings > Mux Livestream" and note the webhook url (should be something like <your-site-url>/?rest_route=/wp-mux-livestream/v1/webhooks/mux).
  3. Login into Mux and create a webhook pointing to the url noted above. See https://www.mux.com/docs/core/listen-for-webhooks#configuring-endpoints how to create a webhook.
  4. Copy the webhook secret from Mux into "Settings > Mux Livestream > Mux Webhook Signing Secret" in Wordpress. Click on "Save Settings".

Now you can create a "Mux Livestream" block in the Wordpress editor. Enter your Mux live stream id in the editor sidebar.

Caveats

The plugin will only detect recordings which have been created after the plugin install / webhook registration.

Development

Requirements:

  • Docker
  • Node.js
  • git

For local development, create a tunnel to your local environment with a tool like https://ngrok.com/. See https://ngrok.com/docs/integrations/mux/webhooks/ for further details.

Start development environment:

$ npm run env start
$ npm run composer install

Rebuild the project after changes with $ npm run build.

This project is using wp-env.

Testing

$ npm run test:e2e

This runs the Playwright integration suite in tests/e2e/ against the wp-env test site on port 8889. It builds the plugin and starts wp-env for you, so Docker needs to be running — but no Mux account and no ngrok tunnel are required: the tests sign their own webhook payloads with a test secret and intercept the Mux CDN requests the block makes, so nothing leaves your machine.

Traces and screenshots for failed runs land in artifacts/.