Mux <> Sanity plugin

We improved the discoverability of previously uploaded videos when adding Mux videos into Sanity.

View plugin

Context

Mux Video is a powerful API-based platform that enables developers to efficiently manage, encode, and deliver video content to users.

Its integration with Sanity, a structured content platform, allows for seamless management and delivery of video content directly from Sanity's CMS.

In cooperation with Mux's engineering team, Tinloof updated the Mux-Sanity plugin to improve how users find and interact with videos.


The problem

The first version of the Mux plugin had some issues, primarily that it was difficult to reuse the same video in different places or to find a specific asset.

This issue was even more pronounced when the uploaded videos looked similar, such as when recording a product demo, making it difficult to differentiate between thumbnails. Since there were no titles, searching for videos was impossible.

If you wanted to find an older video, you had to continually click the "Load more" button until you found the one you were looking for.

On top of that, the videos did not provide information about their duration or upload date, which further complicated the process of finding the needed content.

Screenshot of the previous version of the Sanity-Mux plugin
How the plugin looked before: a grid of confusingly similiar images that are hard to pick

Collaborating with Tinloof on our Sanity plugin was a great partnership. Their deep expertise in Sanity was evident as they quickly got up to speed and aligned with our objectives. Tinloof has a natural product sense which minimized the need for close oversight and led to great suggestions coming from their team. A top-notch partner.

The solution

We've made several improvements to the user experience, making video content management easier for thousands of Sanity users.

All these changes are non-breaking, meaning that in a few seconds the package can be updated to the latest version, without losing any functionality.

How the plugin looks like now: a grid of playable and searchable videos with titles
How the plugin looks like now: a grid of playable and searchable videos with titles

Optionally adding titles to each video and use a text search field to find them

Videos previously did not have any titles, and search was nonexistent.

Video poster

Playing videos in the browser, including in full-screen mode

Aside from automated GIFs, there was no other way to know what the video was.

Video poster

Increasing the quality of thumbnails, to not look blurry on retina screens

Videos can also be distinguished easily as they start with animated GIFs, without needing to hover over them.

Video poster

Turning the video browser into a Sanity studio tool that editors can access from anywhere

This means you can manage and navigate images just like you can with the sanity-plugin-media.


Visualising if and where a video is used

This helps in deciding whether to delete unused videos - and to prevent mistakes, you can't delete a video that's currently being used on the website.

Video poster

Enabling both dark and light mode

Previously, the plugin was always in dark mode, leading to a jarring experience. It now supports both dark and light modes, automatically fitting users' preferences in the Sanity studio.

Video poster

More work