Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Edit thumbnail #400

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

R-Delfino95
Copy link

@R-Delfino95 R-Delfino95 commented Jan 23, 2025

Related to #321

  • Added support for editing the thumbnail from the “Structure” section as it was before version 2.2.0 of the plugin.
  • Added a field to set the thumbnail manually.
  • The thumbnail time is saved under thumbTime in the mux.videoAsset document.

Here are some images and a recording of the result:
image
image

recording.mp4

Copy link

vercel bot commented Jan 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sanity-plugin-mux-input ❌ Failed (Inspect) Feb 5, 2025 8:19am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
sanity-plugin-mux-input-codesandbox ⬜️ Ignored (Inspect) Visit Preview Feb 5, 2025 8:19am

Copy link

vercel bot commented Jan 23, 2025

@R-Delfino95 is attempting to deploy a commit to the Sanity Sandbox Team on Vercel.

A member of the Team first needs to authorize it.

@R-Delfino95 R-Delfino95 marked this pull request as ready for review January 28, 2025 20:38
@R-Delfino95 R-Delfino95 requested a review from a team as a code owner January 28, 2025 20:38
@RitaDias
Copy link
Contributor

RitaDias commented Feb 5, 2025

Hi!
Just a headsup since the PR has been open for a while that I'll be reviewing it :)

Thank you for setting this up!

@RitaDias RitaDias self-requested a review February 5, 2025 07:42
Copy link
Contributor

@RitaDias RitaDias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi!
Thank you so much once more for doing this!

The only thing that I would bring up which I found strange (but it's fine, I just wondered if it's expected), is that when I change the thumbnail two things don't happen:

  • I am not prompted to publish the changes
  • It doesn't change the thumbnail on the actual UI, only on the studio input (see video)
Screen.Recording.2025-02-05.at.13.22.57.mov

I'm assuming this is the intended behaviour but I just want to double check :)

@R-Delfino95
Copy link
Author

Hi! Thank you so much once more for doing this!

The only thing that I would bring up which I found strange (but it's fine, I just wondered if it's expected), is that when I change the thumbnail two things don't happen:

  • I am not prompted to publish the changes
  • It doesn't change the thumbnail on the actual UI, only on the studio input (see video)

Screen.Recording.2025-02-05.at.13.22.57.mov
I'm assuming this is the intended behaviour but I just want to double check :)

Hi! Thanks for reviewing the PR.

The thumbnail functionality is internal to Sanity Studio. As @decepulis mentioned, MUX does not support storing the thumbnail time, so it is simply a value stored in the thumbTime key within the mux.videoAsset document.

If you want to use the thumbnail elsewhere, you would need to get that value from Sanity documents and apply it in your UI.

Let me know your thoughts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants