
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
sanity-plugin-mux-input
Advanced tools
An input component that integrates Sanity Studio with Mux video encoding/hosting service.
This is a plugin which let you use Mux video assets in your Sanity studio.
The Mux plugin for Sanity gives you a way to upload and preview videos easily.
Read our blog post about this plugin.
Not familiar with Sanity? Visit www.sanity.io
sanity install mux-input
.
Read more about using plugins in Sanity here.Make a schema type that uses the plugin's type mux.video
, for example:
{
title: "Video blog post",
name: "videoBlogPost",
type: "document",
fields: [
{ title: "Title", name: "title", type: "string" },
{
title: "Video file",
name: "video",
type: "mux.video"
}
]
}
Read more about schemas in Sanity here.
Get an API Access Token and enter it into the setup screen First time you use the plugin you will be asked to enter your Mux credentials.
The Mux Video API uses an Access Token and Secret Key for authentication.
If you haven't already, generate a new Access Token in the Access Token settings of your Mux account dashboard, and make sure it got permission to both read and write video and read data.
The token is stored in the dataset as a document of the type mux.apiKey
with the id secrets.mux
.
Having the ID be non-root ensures that only editors are able to see it.
The Mux plugin will find it’s access tokens by fetching this document.
We have made an own player which supports poster images for the videos as set with this plugin, see sanity-mux-player
You could use any player which supports HLS, just point the video source to:
https://stream.mux.com/${assetDocument.playbackId}.m3u8
To enable signed urls with content uploaded to Mux, you will need to check the "Enable Signed Urls" option in the Mux Plugin configuration. Assuming that the API Access Token and Secret Key are set (as per the Quick start section).
More information for this feature of the plugin can be found on Mux's documentation
Issues are actively monitored and PRs are welcome. When developing this plugin the easiest setup is:
npm install -g @sanity/cli && sanity init
. Follow the prompts, starting out with the blog template is a good way to go.cd
into your project directory, run npm install && npm start
- your sanity studio should be running on http://localhost:3333.cd
into the plugins
director of your project.plugins
directory inside your project git clone git@github.com:your-fork/sanity-plugin-mux-input.git
.sanity.json
, go to the plugins
array and add mux-input
.npm start
.schemas/post.js
and add follow the plugin documentation to add a mux.video
type field.FAQs
An input component that integrates Sanity Studio with Mux video encoding/hosting service.
The npm package sanity-plugin-mux-input receives a total of 11,881 weekly downloads. As such, sanity-plugin-mux-input popularity was classified as popular.
We found that sanity-plugin-mux-input demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 72 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.