Add video preview image for Media Finder form widget#956
Draft
bennothommo wants to merge 1 commit intodevelopfrom
Draft
Add video preview image for Media Finder form widget#956bennothommo wants to merge 1 commit intodevelopfrom
bennothommo wants to merge 1 commit intodevelopfrom
Conversation
Member
|
Something that I'd like to do as a general pattern across all our frontend development is to ensure that all assets live under either dist/ or src/ folders, with the objective being that /src folders aren't expected to exist on production servers or be persisted to CDNs. So |
LukeTowers
reviewed
Aug 3, 2023
| echo $this->makePartial('image_single'); | ||
| break; | ||
| case 'video': | ||
| case 'audio': |
Member
There was a problem hiding this comment.
What will the preview be for an audio file? Was this missed here?
Member
Author
There was a problem hiding this comment.
Ah, I do intend to add an audio player to the backend field preview if an audio file is selected.
Member
Member
|
@bennothommo what's the status of this? |
Member
Author
|
I've held this work until we have media library metadata in place. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a video preview image for
mediafinderfields that have theirmodeconfig set tovideo. It renders the video screenshot by loading the first 10 seconds of the video and uses a HTML5 canvas element to take a snapshot as an image (stopping the video load afterwards).In the course of this, I have also rewritten Media Finder to a Snowboard widget.
Only things left to do are:
previewandupdatecontexts