strapi-plugin-mux-video-uploader

This plugin allows you to upload your content to Mux and use it with Strapi.

Usage no npm install needed!

<script type="module">
  import strapiPluginMuxVideoUploader from 'https://cdn.skypack.dev/strapi-plugin-mux-video-uploader';
</script>

README

Mux Video Uploader

A Strapi plugin for managing uploads to Mux.

This plugin provides the ability to upload content via a url or a direct file upload to Mux.

🀩 Features

  • Upload videos using a url or a file to Mux from inside of Strapi
  • Manage assets with the plugin's asset grid and pagination capabilities
  • Search for assets using title or Mux Asset ID values
  • Preview content using a player (powered by the videojs-mux-kit project)
  • Delete assets which result in the Mux Asset also being deleted
  • Support uploading audio files
  • Mux updates Strapi automatically when the asset is ready using Webhooks

πŸ§‘β€πŸ’» Install

For installing with Strapi v4, install the latestβ€”

npm i strapi-plugin-mux-video-uploader@latest

yarn add strapi-plugin-mux-video-uploader@latest

For installing with Strapi v3, install v2.0.0β€”

npm i strapi-plugin-mux-video-uploader@2.0.0

yarn add strapi-plugin-mux-video-uploader@2.0.0

πŸ– Requirements

  • A Mux account
  • You will need both the Access Token and Secret Key scoped with "Full Access" permissions which can be created in the Mux Dashboard
  • The Webhook Signing Secret which can be created in the Mux Dashboard (See the Webhooks section for more info)
  • Tested with Strapi v4.0.5 Community Edition

βš™οΈ Configuration

In order for this plugin to communicate with Mux, some configuration values need to be set for the plugin before it can be used.

With your Access Token, Secret Key and Webhook Signing Secret, navigate to the Settings view within Strapi and click the "General" section under MUX VIDEO UPLOADER.

On this view, set the appropriate values to their fields and click the Save button.

πŸͺ Webhooks

Please note: We've currently disabled webhook signature verification as there is not a way to access the raw request body from the Koa.js middleware (which Strapi is using for parsing requests). This is needed to ensure that we are verifying the signature and that the request JSON payload has properties in the same order that was used for generating the signature.

When setting up your Webhook configuration in the Mux Dashboard, the "URL to notify" field should be in the format ofβ€”

{STRAPI_BASE_URL}/mux-video-uploader/webhook-handler

Where {STRAPI_BASE_URL} is the publicly accessible hostname of your Strapi instance.

πŸ§‘β€βš–οΈ Permissions

Currently, anyone with "Super Admin" access to your Strapi instance will be able to utilize the plugin for uploading and managing content.

🀝 Contributing

Contributions, issues and feature requests are welcome!

If you encounter an error or have questions, please feel free to file inquiries on the Issues page for strapi-plugin-mux-video-uploader.

πŸ—£ FAQ

My Strapi instance is not publicly available, can I still use Webhooks?

Yes! However, in order to make it work, you'll need a "Webhook Relay" that runs from within your network. You can use a Webhook Relay service like Smee (https://smee.io/) or ngrok (https://ngrok.com/) to forward Webhook events to an instance of Strapi behind a firewall.

I've installed the plugin, but the Strapi Admin UI doesn't show it

This happens when you need to rebuild your Strapi instance. To do this, you need delete the .cache and build folders (while Strapi is off) and restart to rebuild the instance.

Here is an example of how to do this on a unix-based operating system from within the Strapi application rootβ€”

% rm -rf ./.cache ./build

❀️ Thanks

Strapi.io

πŸ“š References