cached_video_thumbnail 0.1.1
cached_video_thumbnail: ^0.1.1 copied to clipboard
High-performance video thumbnail engine: cached, scheduled, cancellable thumbnail generation from asset, file, and network videos.
0.1.1 #
No changes to the Dart/native runtime; this release adds repo-distributed AI coding-assistant support and maintainer tooling.
- Installable agent plugin for Claude Code and OpenAI Codex, hosted in
this repository (
agent-plugin/cached-video-thumbnail, one shared skills tree, dual manifests, repo-root marketplace catalogs for both clients). Install commands are in the README. - Four package-specific skills:
integrate-feed-thumbnails(feed wiring, physical-pixel specs, priorities, prefetch, audit checklist),diagnose-thumbnail-issues(error codes, negative cache, platform quirks, metrics triage),mock-thumbnail-engine(hermetic tests with an injectable fake extractor), andmigrate-from-video-thumbnail(video_thumbnail / flutter_video_thumbnail_plus / get_thumbnail_video / fc_native_video_thumbnail conversions), plus a read-onlythumbnail-integration-auditoragent for Claude Code. - Repository guidance for coding agents (
AGENTS.md, imported byCLAUDE.md) covering validation gates, generated-file rules, the error-code contract, and the release process. - CI now validates the plugin tree and version sync
(
tool/validate_agent_plugin.dart); the plugin tree is excluded from the pub archive (.pubignore), which is why the package itself is unchanged.
0.1.0 #
Initial release: a disk-cached, scheduled, cancellable video thumbnail engine for Android and iOS, designed for infinite feeds on low-end devices.
- Thumbnails from Flutter bundle assets, local files, and http(s) URLs
(with optional request headers), requested with
getThumbnail(a plainFuture) orthumbnail(a cancellable request handle). ThumbnailSpeccontrols the output: fit-within sizing that preserves aspect ratio and never upscales, frame position (clamped into the video's duration), nearest-keyframe or exact-frame seeking, JPEG or PNG encoding, and JPEG quality.- Persistent disk cache with deterministic keys, atomic writes, and LRU eviction capped by total bytes and entry count; hits are served from an in-memory index with no decoding and no platform-channel round trip. A file's cache identity includes its size and modification time, so editing a local video invalidates its thumbnails automatically.
- Request scheduling built for scroll performance:
visible,normal, andprefetchpriority bands, newest-first dispatch within a band, a bounded number of concurrent native extractions, coalescing of identical requests, per-request cancellation, priority bumping, and per-request timeouts. - Negative caching: recent failures are remembered for a configurable TTL and fail fast instead of re-hammering a broken source during scroll.
VideoThumbnailImage, anImageProviderfor anyImagewidget: its identity covers source and spec so Flutter'sImageCachededuplicates identical tiles, generation is cancelled when the last listener detaches, and externally purged or corrupted cache files are evicted and regenerated on the next resolve.- Cache management:
prefetchfor warming,evictfor a single source, andclearCachefor everything. - Every failure is a
ThumbnailExceptioncarrying a classifiedThumbnailErrorCode(asset/file not found, network, unsupported media, timeout, cancelled, ...); failures are never silently swallowed into nulls or booleans. - Observability: a
metricssnapshot (requests, cache hits, coalesced joins, extractions, failures, queue depth, and extraction and queue-wait percentiles) plus anonEventhook for structured engine events. - Engine tuning through
ThumbnailEngineConfig: extraction concurrency, default timeout, negative-cache TTL, cache size caps, and the default spec. - Hermetic test support:
ThumbnailEngine.forTestingwith an injectableThumbnailExtractorand cache directory, so app tests run without native code.