Skip to content

v0.5.0-preview.1

Pre-release
Pre-release

Choose a tag to compare

@kuuhaku0 kuuhaku0 released this 11 Oct 05:34
· 6 commits to main since this release
  • Adds short looping video. AssetClient.resolveVideo(ref) returns ResolvedVideo (source REMOTE, CACHE or POSTER, sequence, message, file, width, height, durationMs, frameRate) for a placement's base slot. resolve never downloads a clip. Only the latest accepted release downloads; retained releases are cache-only. As for Lottie animations, a missing current clip returns POSTER, and a current clip that cannot be used first recovers from the newest verified cached clip of an earlier release. Every use, including each cache read, checks the signed length and SHA-256 and a bounded header walk (ftyp first, moov before the first mdat, no moof, an avc1 sample entry at the signed size). Any failure returns POSTER, and the app shows the ordinary image or its bundled fallback.
  • Validates videoSchemaVersion and video. The version, when present, must be exactly 1 (null or any other value rejects the manifest); video without it, on a variant cell, or beside animation rejects the manifest. The descriptor must be mp4 / h264-loop-v1 / video/mp4 with a lowercase hex sha256, 1–4,194,304 bytes, even width and height of 16–1280 with at most 921,600 pixels in exactly the slot's aspect ratio, integer durationMs 1,000–10,000, a finite numeric frameRate 1–30, and the exact same-origin path /api/delivery/{orgId}/{appId}/assets/{assetId}/videos/{sha256}. animationSchemaVersion stays ignored.
  • FileAssetStorage implements the new AssetVideoStorage and keeps clips as <sha256>.mp4 in cacheDir, within the existing 50 MiB / 100-entry budget and least-recently-used eviction. Custom storage without it gets POSTER. Adds Limits.VIDEO_BYTES (4 MiB) and AssetVideoSource.
  • AssetTransport gains get(url, maxBytes, accept), which defaults to the two-argument call, and the client now names the media type for every request: application/json, the candidate's own image type (PNG renditions send image/png, not image/webp), or video/mp4. HttpsTransport gains videoTimeoutMillis (default 30,000, allowed 20–30,000) for video/mp4 calls; HttpsTransport(timeoutMillis) still compiles.
  • The clip download runs outside the client's mutex, so a slow clip does not hold up image resolution. The cache no longer evicts the entry it has just written when modification times tie.
  • No player dependency: the README shows Media3 1.11.x in the app. Not verified on an emulator or a device.
  • Vendors the shared corpus with 27 video manifests (142 signed manifest cases), video.json and the loop.mp4 clip fixtures.

Recompile consuming applications when replacing the AAR. New public types (ResolvedVideo, AssetVideoSource, AssetVideoStorage), the new AssetTransport method and the HttpsTransport constructor change JVM signatures.

  • Code generation rejects a group or member named AppAssets, AssetRef, AssetAccessibility or AssetRendering, as the Swift generator does for its own generated names. AssetRendering produced Kotlin that did not compile when the catalog had a template placement; the other three shadowed the generated root object or the imported SDK types.
  • Code generation rejects two groups that differ only in case (their class files overwrite each other on case-insensitive file systems, so one object is missing at run time) and two members of one group that compile to the same JVM getter, such as coast and Coast, which did not compile.
  • A package segment that is a Kotlin hard keyword, such as is or fun, is escaped with backticks; the unescaped package line did not compile.
  • Any other catalog generates byte-identical output. SDK sources and the AAR are unchanged.

Validation on October 11, 2026: codegen tests (5), 114 JVM unit tests with the optional hosted test skipped, lint, and the release build passed (./gradlew :sdk:testDebugUnitTest :sdk:lint :sdk:assembleRelease, JDK 17). assetlib-android-0.5.0-preview.1.aar SHA-256 b31e8508e7e039c1920ae80e944edc606283d0272f09d092d039236cc8333039 (macOS build). No emulator or device run, and no Media3 playback, is claimed. See VERIFICATION.md.

AAR SHA-256: b31e8508e7e039c1920ae80e944edc606283d0272f09d092d039236cc8333039 assetlib-android-0.5.0-preview.1.aar