-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Add video preview image for Media Finder form widget #956
base: develop
Are you sure you want to change the base?
Conversation
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 |
@@ -7,17 +7,15 @@ | |||
<?php | |||
switch ($mode) { | |||
case 'image': | |||
echo $this->makePartial('image_single'); | |||
break; | |||
case 'video': | |||
case 'audio': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will the preview be for an audio file? Was this missed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I do intend to add an audio player to the backend field preview if an audio file is selected.
@bennothommo what's the status of this? |
I've held this work until we have media library metadata in place. |
This PR adds a video preview image for
mediafinder
fields that have theirmode
config 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:
preview
andupdate
contexts