No, there is no differentiation in the core between file types on that level. $file
is always a normal File
object, no matter if image, pdf or video. And thus follows the default code for the panel preview image.
As I already posted it here: User models not working as expected ¡ Issue #1892 ¡ getkirby/kirby ¡ GitHub
As far as I can see, the user model has been fixed since but the issue is still open.
Ahh, I missed in the issue that itâs for file models too.
But @texnixe can you confirm that the fix has fixed your user model porblems?
Unfortunately, I didnât manage to test it yet. Will try tonight and let you know.
Ok, I donât understand anything of the discussion anymore, but it is safe for me to assume that the video thumbnail as preview image is to complicated for me to achieve.
@texnixe, would this be a reasonable feature to request? If so, I would write up a feature request. Actually I think the whole video file format could need some love. In my projects, I almost always need images side by side next to videos and find it very unfortunate that with images you have a wealth of metadata and with video files almost none.
Could you explain what you mean? Not sure I understand.
Well, with images you have all this infos like a thumbnail that gets auto-generated, the resolution, the orientation and so on. I would be nice if kirby can read the most basic informations from videos as well, such as thumbnail extraction, resolution, orientation, framerate, length etc.
This is nothing that can be done without a library like ffmpeg which cannot be installed everywhere. It therefore doesnât make sense to provide built-in functions that require something that is not available everywhere.
Extracting meta data from video files can be achieved with a plugin. As regards storing information about an associated poster for each video file, that information could be stored in the meta data file. Then you can fetch these images for display in the Panel.
hi stephan⌠could you show me your steps. i am a newby, i donât get it with the file method plugin. could you show your codes? thanx
Iâm digging this out again.
I have now created a custom section in the backend, which works almost perfectly.
The only problem is that the videos no longer load after a certain number of reloads.
The video player tries forever to load them. Unfortunately without success.
I am relatively sure that this is a cache problem. Unfortunately, I donât get an error message in the console.
The URL pointing to the file is correct in any case. (The file is in the media folder)
Any idea how to solve this?
Maybe an solution with permaurl?
Or deactivating certain cache settings?