omeka / plugin-Timeline

Create TimelineJS timelines accessible via ExhibitBuilder blocks or shortcode.
0 stars 1 forks source link

Timeline thumbnails #4

Closed allanaaa closed 1 year ago

allanaaa commented 1 year ago
  1. Timeline won't pull those default media-type-based thumbnails for items that don't have derivative images (in my case, video and audio), as we know, and I'm not having luck generating thumbnails with Derivative Images right now.

  2. In one case, the audio item actually has two files already - an audio and an image - and the derivative images seem to have generated correctly in that case, but Timeline isn't choosing the image when it could: venus1 venus2

Which of course gets changed if you rearrange the file order, but then you lose the audio embed in the timeline.

I'm not sure if this will be fixed if you can fix the more general "Timeline can't find thumbnails for multimedia" issue, assuming it should be able to find the fallback default when there are no derivative images (or just don't try to display an image in the little timeline flag thing).

If not, it would be nice if Timeline looked for one of each where needed. (I suppose you would either need to identify the first file, then look for an image file if needed; or it could go by item type to know when to look for audio or video?...)

matthewjmckinley commented 1 year ago

@allanaaa The thumbnail issue should be fixed with the latest commits. Now it will display the original file for audio/video media (allowing in-slide playback) along with select other image types (gif/jpg/png/bmp), and display a thumbnail for everything else (including PDF, eliminating the clunky in-slide PDF viewer).

For audio/video, I also disabled navigating to the full record by clicking on the file in the main slide (as is default for an image or thumbnail file), since this was messing with in-slide playback--the media would start playing while a new tab opened up to the full record. The full record can still be accessed by clicking on the title metadata in the slide.

For the rest of your comments above, the timelineJS logic just isn't smart enough to know to have a media file play within the main slide while falling back to an alternate image in the tiny thumbnail, if it exists. It would probably be possible but would be a lot of extra code for a pretty minor issue. As is, I fixed it so that media files are just giving a 'null' value to the tiny thumbnail field. Interestingly, this means that timelinejs will now display nothing in the tiny timeline flag for audio files, and serve up its own tiny timelinejs generic icon for video files. Hope this is a good compromise! Cleaner and no broken links or missing files now, at any rate.

zerocrates commented 1 year ago

What's the tiny thumbnail situation? I would have assumed we could just set a thumbnail URL we wanted there. Is that not the case?

matthewjmckinley commented 1 year ago

That is the case. Only for audio/video, which don't have a thumbnail to show, is it getting rid of the tiny thumbnail--everything else it gets the generated thumbnail.

When timelinejs is not given an event['media']['thumbnail'] value, as is the case now with A/V files, it puts in its own tiny default placeholder image. Although apparently it doesn't have a default placeholder for audio, so its not showing anything for audio files in the tiny flag. I suppose I could give it the default Omeka audio placeholder file for that, if it looks weird being the only file type that doesn't get a tiny image.

allanaaa commented 1 year ago

This looks good now. Videos (that have derivative images) are showing thumbnails; audio isn't showing anything. It's up to you if you want to send the placeholder or not; I don't think it looks weird without tiny images; the flags have little enough real estate to go around. timeline