@nitida/sdk 0.30.1 → 0.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nitida/sdk",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.2",
|
|
4
4
|
"description": "nitida — the media SDK: browser and mobile upload with resume, client-side compression, on-the-fly transforms behind a CDN, video transcode, HLS ladders and AI proxies. Multi-tenant.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -159,6 +159,10 @@ everyone, and the ladder buys you nothing.
|
|
|
159
159
|
that your sources can sustain.
|
|
160
160
|
(There IS a paid, separate `POST /assets/:id/upscale` that genuinely enlarges
|
|
161
161
|
with a model. It is not the transform route and it is not free — §8g.)
|
|
162
|
+
- ⚠️ **There is no upscale — the master is the ceiling.** Measured: a 2400 px
|
|
163
|
+
master asked for `width=2560` returns **2400 px**. Put widths in the `srcSet`
|
|
164
|
+
that your sources can sustain — asking for more is not an error, it is a
|
|
165
|
+
smaller image than you think you requested.
|
|
162
166
|
- ⚠️ The **first** request of each width is generated cold, then cached at the
|
|
163
167
|
edge immutably. Warm them after upload if the first visitor matters.
|
|
164
168
|
|
|
@@ -223,6 +227,11 @@ Output: `https://8ok.uk/<tenantId.toString(36)>/v/<sha16>-v.mp4`.
|
|
|
223
227
|
|
|
224
228
|
**Do NOT:**
|
|
225
229
|
- ❌ Use `getVideoTransformUrl` — that builds a `/t/...` transform URL, which never returns playable video. On a video sha `/t/` transforms the **poster frame**: `200 image/webp` with `x-transform-source: poster` when a poster exists, `410` when it does not. (`getVideoTransformUrl` is for on-the-fly re-encodes, a different feature.)
|
|
230
|
+
- ❌ Use `getVideoTransformUrl` for the HLS entry — that builds a `/t/…`
|
|
231
|
+
transform URL. ⚠️ **A 410 there means the SOURCE BYTES ARE GONE**
|
|
232
|
+
(`source_unavailable`), **not** that you used the wrong builder. Do not go
|
|
233
|
+
change the call site while data loss goes unnoticed. (`getVideoTransformUrl`
|
|
234
|
+
is for on-the-fly re-encodes — a different feature.)
|
|
226
235
|
- ❌ Hand-roll the path with the decimal tenant id. The path segment is **base36**: `tenantId.toString(36)`. **Tenant 10 → `/a/v/`**, and the decimal `/10/v/` **404s**. This is invisible for tenants ≤ 9 (`8`→`8`, `9`→`9`) and bit a real migration only at tenant 10. Always delegate to `getAssetUrl` so the encoding can't drift.
|
|
227
236
|
|
|
228
237
|
**Audio IS supported (updated 2026-07-01 — verify against the SDK types, this used to say "not supported").** The platform recognizes `kind: "image" | "video" | "document" | "audio" | "other"` and ships an **`mp3`** variant preset (`VariantPreset` in `@nitida/asset-client`). Uploads are hash-deduped (byte-identical re-uploads return the existing sha — that's *byte* dedup, NOT semantic "find a similar track"). `nt.upload` also accepts an `audioTrack` on video-composition calls. Serve via the `mp3` preset / `original`. Confirm the current preset/kind list in `node_modules/@nitida/asset-client/dist/index.d.ts` before relying on a specific ext.
|