- Introduction to Video
- Stream video files
- Start live streaming
- Make API requests
- Play your videos
- Enable static MP4 renditions
- Download for offline editing
- Embed videos for social media
- Listen for webhooks
- Secure video playback
- Create clips from your videos
- Get images from a video
- Create timeline hover previews
- Adjust audio levels
- Add watermarks to your videos
- Add subtitles to your videos
- Minimize processing time
- Upload files directly
- Autoplay your videos
- Stream an audio-only version of your video
- Synchronize video playback
- Integrate with your CMS
Integrate with Strapi
Strapi is an open source content management system that allows you to define your own schemas for your content.
In this guide:
The Mux Video Uploader plugin allows editors to upload content directly to Mux from within the Strapi interface, then associate those videos with their custom collection types.
- A working installation of Strapi that is publicly accessible through a hostname
- An Access Token and Secret Key which is provisioned within Mux Dashboard
- Configure a Webhooks listener within Mux Dashboard so that Strapi can be informed of upload progress.
With your existing Strapi installation, run the following command in the root of your Strapi project to install the plugin
Run this command in your Strapi project folder if you are using NPM:
npm i strapi-plugin-mux-video-uploader
Or this command if you are using yarn:
yarn add strapi-plugin-mux-video-uploader
Be sure to restart Strapi for the plugin to take effect.
Generate a new Access Token by going to the Access Token settings of your Mux account dashboard.
The access token should have Mux Video Read and Write permissions.
After clicking the "Generate Token" button, save the "Access Token ID" and "Secret Key" to be used later.
Part of the upload process includes Mux updating Strapi with the completion of the upload and processing. In order Mux to make this communication, a Webhook needs to be established so that events are sent to your Strapi installation.
Create a new Webhook configuration in Mux Dashboard. There will be a space to add a "URL to notify". This value should be formatted based on your Strapi's hostname
After saving, copy the "Signing Secret" which will be used later.
In Strapi, visit the Settings page and navigate to the
MUX VIDEO UPLOADER section.
Using the details saved in the previous step, fill in the fields with the appropriate values.
Click the "Save" button to persist the changes.
Use the Mux Video Uploader page that is now available in Strapi's menu to upload either with a remote URL or directly using a local video file.
From here, relationships of Mux assets can be modeled to custom collection types within Strapi to tie metadata with playable content.
You now have the ability to upload content to Mux through Strapi CMS!
At this point, querying Strapi using REST or GraphQL will give you access to the
playback_id information. This
playback_id can be used by your client applications to stream content or retrieve thumbnails.