@adonis-agora/media 0.19.0 → 0.21.0

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/assets/spa/assets/{index-3HWw8Zsr.js → index-BO6hgGp1.js} +3 -3
  3. package/dist/assets/spa/assets/index-BO6hgGp1.js.map +1 -0
  4. package/dist/assets/spa/index.html +1 -1
  5. package/dist/src/define_config.d.ts +2 -2
  6. package/dist/src/define_config.d.ts.map +1 -1
  7. package/dist/src/define_config.js +2 -2
  8. package/dist/src/define_config.js.map +1 -1
  9. package/dist/src/errors.d.ts +16 -1
  10. package/dist/src/errors.d.ts.map +1 -1
  11. package/dist/src/errors.js +23 -2
  12. package/dist/src/errors.js.map +1 -1
  13. package/dist/src/image_processor.d.ts +5 -0
  14. package/dist/src/image_processor.d.ts.map +1 -1
  15. package/dist/src/index.d.ts +6 -2
  16. package/dist/src/index.d.ts.map +1 -1
  17. package/dist/src/index.js +4 -2
  18. package/dist/src/index.js.map +1 -1
  19. package/dist/src/processors/sharp.d.ts +2 -2
  20. package/dist/src/processors/sharp.d.ts.map +1 -1
  21. package/dist/src/processors/sharp.js +7 -3
  22. package/dist/src/processors/sharp.js.map +1 -1
  23. package/dist/src/single_file_store.d.ts +11 -0
  24. package/dist/src/single_file_store.d.ts.map +1 -1
  25. package/dist/src/single_file_store.js +3 -1
  26. package/dist/src/single_file_store.js.map +1 -1
  27. package/dist/src/transformers/factory.d.ts +47 -2
  28. package/dist/src/transformers/factory.d.ts.map +1 -1
  29. package/dist/src/transformers/factory.js +30 -2
  30. package/dist/src/transformers/factory.js.map +1 -1
  31. package/dist/src/transformers/ffmpeg.d.ts +104 -0
  32. package/dist/src/transformers/ffmpeg.d.ts.map +1 -0
  33. package/dist/src/transformers/ffmpeg.js +207 -0
  34. package/dist/src/transformers/ffmpeg.js.map +1 -0
  35. package/dist/src/transformers/hls.d.ts +4 -1
  36. package/dist/src/transformers/hls.d.ts.map +1 -1
  37. package/dist/src/transformers/hls.js.map +1 -1
  38. package/dist/src/transformers/placeholder.d.ts +93 -0
  39. package/dist/src/transformers/placeholder.d.ts.map +1 -0
  40. package/dist/src/transformers/placeholder.js +114 -0
  41. package/dist/src/transformers/placeholder.js.map +1 -0
  42. package/dist/src/transformers/probe.d.ts +1 -1
  43. package/dist/src/transformers/probe.d.ts.map +1 -1
  44. package/package.json +7 -7
  45. package/skills/media-attachments-single-file/SKILL.md +2 -1
  46. package/skills/media-library-collections/SKILL.md +7 -4
  47. package/dist/assets/spa/assets/index-3HWw8Zsr.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # @adonis-agora/media
2
2
 
3
+ ## 0.21.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#193](https://github.com/DavideCarvalho/adonis-agora-media/pull/193) [`ee1a275`](https://github.com/DavideCarvalho/adonis-agora-media/commit/ee1a2753b4b7e2056880e6ed8f91f43fdd676193) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - **ffmpeg engines for the HLS and probe transformers.** `engines.ffmpegHls()` and `engines.ffprobe()` plug into the existing `engine` option of `transformers.hls()` / `transformers.probe()` and spawn the system `ffmpeg` / `ffprobe` binaries. There is no npm dependency, and nothing is bundled.
8
+
9
+ - **Remux by default.** Without a ladder, `ffmpegHls()` does a stream copy, the same contract as the mediabunny engine.
10
+ - **`ladder` transcodes.** With `ladder: [{ height, videoBitrate, audioBitrate? }]` it encodes an h264/aac adaptive-bitrate ladder into one master playlist.
11
+ - Keyframes are forced on segment boundaries.
12
+ - Rungs taller than the source are dropped, so it never upscales.
13
+ - Ready-made ladders: `engines.ladders.standard` (360/720/1080p) and `engines.ladders.compact` (360/720p).
14
+ - This is the transcoding mediabunny can't do in Node without WebCodecs.
15
+ - **Same package shape.** The output is the shape the mediabunny engine writes (`index.m3u8` master, per-rendition playlists, MPEG-TS segments), so HLS delivery and playlist rewriting work unchanged.
16
+ - **Errors.**
17
+ - A missing binary throws `TransformerRuntimeMissingError`.
18
+ - A source with no video stream throws `HlsSourceUnsupportedError`, the same definitive signal the mediabunny engine gives, so callers branch on one error whatever the engine.
19
+ - Any other failed run throws the new `FfmpegFailedError` (`E_MEDIA_FFMPEG_FAILED`), carrying `exitCode` and the tail of `stderr`.
20
+ - `HlsSourceUnsupportedError` gains an optional `hint` constructor argument.
21
+ - **Validation.** The ladder is checked when the engine is built: heights must be positive even integers, and bitrates must parse.
22
+ - **ffprobe gaps.** The ffprobe engine reports `format` as ffprobe's `format_name` and does not report `mimeType`.
23
+ - **Also exported:** `ffmpegHlsEngine`, `ffprobeEngine`, `buildHlsArgs` and `effectiveLadder`, plus the `FfmpegRendition` / `FfmpegHlsEngineOptions` / `FfmpegBinaryOptions` types.
24
+
25
+ ## 0.20.0
26
+
27
+ ### Minor Changes
28
+
29
+ - [#190](https://github.com/DavideCarvalho/adonis-agora-media/pull/190) [`e7c4368`](https://github.com/DavideCarvalho/adonis-agora-media/commit/e7c436805d0e05281f6891d8c132fceccc58c505) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - **Image placeholders and blur.**
30
+
31
+ - New `transformers.placeholder()` — a metadata-only transformer that persists, on `record.conversions.placeholder.meta`, a tiny WebP preview as a `data:` URL, the original's dimensions (after EXIF orientation) and its dominant colour. Enough to render a blur-up placeholder with the right aspect ratio in the same response as the image URL, with no extra request or client decoder. Eager by default; skips non-`image/*` and SVG records with `meta: {}`. Needs the `sharp` peer (loaded lazily). Exported as `PlaceholderTransformer` with its `ImagePlaceholder` / `PlaceholderEngine` types.
32
+ - `placeholderOf(record)` reads that placeholder off any `MediaRecord` (whatever the transformer's name), and `storeSingleFile` / `storeSingleFileWith` now also return the record `id` and its `placeholder` (or `null`).
33
+ - `ConversionPreset.blur` — gaussian blur sigma applied after the resize, for blurred variants served as files.
34
+ - **Fix:** the sharp processor now auto-orients from EXIF before resizing. Phone photos taken in portrait used to come out sideways in every conversion, because the output drops the EXIF orientation tag that made the original display upright. Existing conversions are not regenerated.
35
+
3
36
  ## 0.19.0
4
37
 
5
38
  ### Minor Changes