Changeset e67828e in Klonkt for src/views/pages


Ignore:
Timestamp:
07/01/2026 10:38:02 PM (2 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
0877771
Parents:
5e52448
Message:

fix(media): poster frames for remote videos (News feed + Circle tiles)

A remote video (Loops/PeerTube/Mastodon attachment) rendered as a black box until
played: the image proxy refused non-image content, so the tile/feed poster 302'd to
the raw mp4 and never displayed. The proxy now extracts a poster frame from remote
video too — via a bounded range fetch (first 4MB, enough for a faststart mp4's first
frame; moov-at-end files fall back to the old 302). The News feed's <video> gets a
poster so long videos show a frame instead of black. (>30s keeping controls instead
of autoplaying is by design — that was the reported "didn't load like the others".)

  • src/services/ThumbnailService.js — getRemoteThumbnail accepts video/* via a 4MB ranged fetch + single-frame extract; animated-buf guard scoped to images.
  • src/views/pages/news.ejs — feed videos carry poster=thumb(url, 1280).
  • CHANGELOG(.nl/.de).md — under Fixed.

Closes prutfolio-src-k1q.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/news.ejs

    r5e52448 re67828e  
    122122            </div>
    123123          <% } %>
    124           <% vids.forEach(function(m){ %><video class="tl-media-video" src="<%= m.url %>" controls preload="metadata" playsinline></video><% }); %>
     124          <% vids.forEach(function(m){ %><video class="tl-media-video" src="<%= m.url %>" poster="<%= thumb(m.url, 1280) %>" controls preload="metadata" playsinline></video><% }); %>
    125125          <% /* A Klonkt audio post carries an embed player (embedHtml/embedUrl) that already
    126126                covers these tracks, so don't ALSO render the raw Audio attachments as bare
Note: See TracChangeset for help on using the changeset viewer.