alpha2 0.5.3 → 0.6.1

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 (82) hide show
  1. package/README.md +68 -3
  2. package/THIRD_PARTY_NOTICES.md +7 -3
  3. package/dist/apply-edit.d.ts +124 -0
  4. package/dist/apply-edit.js +15 -0
  5. package/dist/assets.d.ts +12 -0
  6. package/dist/audio-layout.js +6 -3
  7. package/dist/audio-worklet-processor.js +27 -33
  8. package/dist/audio.d.ts +5 -4
  9. package/dist/audio.js +8 -6
  10. package/dist/compose.d.ts +105 -0
  11. package/dist/compose.js +63 -0
  12. package/dist/decoder-fallback.d.ts +3 -2
  13. package/dist/decoder-fallback.js +11 -3
  14. package/dist/decoder-stall.d.ts +15 -0
  15. package/dist/decoder-stall.js +52 -0
  16. package/dist/edit-data.d.ts +24 -0
  17. package/dist/edit-data.js +224 -0
  18. package/dist/edit-keys.d.ts +16 -0
  19. package/dist/edit-keys.js +233 -0
  20. package/dist/edit.d.ts +41 -8
  21. package/dist/edit.js +123 -30
  22. package/dist/export-failure.d.ts +10 -2
  23. package/dist/export-failure.js +55 -4
  24. package/dist/export-retry.d.ts +6 -1
  25. package/dist/export-retry.js +12 -1
  26. package/dist/exporter.d.ts +11 -7
  27. package/dist/exporter.js +10 -9
  28. package/dist/extract.d.ts +65 -0
  29. package/dist/extract.js +291 -0
  30. package/dist/extractor.d.ts +151 -0
  31. package/dist/extractor.js +141 -0
  32. package/dist/float32.d.ts +2 -0
  33. package/dist/float32.js +10 -0
  34. package/dist/frame-intake.d.ts +5 -0
  35. package/dist/frame-intake.js +10 -3
  36. package/dist/generated/builtin-effects.d.ts +3 -0
  37. package/dist/generated/builtin-effects.js +1804 -0
  38. package/dist/generated/project-schema.d.ts +636 -37
  39. package/dist/generated/project-schema.js +55 -0
  40. package/dist/generated/project-shape.js +950 -381
  41. package/dist/index.d.ts +1 -0
  42. package/dist/index.js +1 -0
  43. package/dist/json-text.js +14 -2
  44. package/dist/layout-values.js +7 -1
  45. package/dist/layout.d.ts +12 -4
  46. package/dist/media.d.ts +43 -10
  47. package/dist/media.js +255 -66
  48. package/dist/mediabunny.d.ts +32 -12
  49. package/dist/mediabunny.js +276 -90
  50. package/dist/player.d.ts +9 -3
  51. package/dist/player.js +114 -18
  52. package/dist/plugins.d.ts +62 -0
  53. package/dist/plugins.js +506 -0
  54. package/dist/project-data.d.ts +56 -0
  55. package/dist/project-data.js +765 -0
  56. package/dist/project.d.ts +24 -1
  57. package/dist/project.js +456 -38
  58. package/dist/robustness.d.ts +6 -33
  59. package/dist/robustness.js +2 -63
  60. package/dist/sha256.d.ts +3 -2
  61. package/dist/sha256.js +14 -6
  62. package/dist/worker-error.d.ts +3 -2
  63. package/dist/worker-error.js +3 -1
  64. package/dist/worker.d.ts +13 -3
  65. package/dist/worker.js +36 -9
  66. package/package.json +26 -1
  67. package/wasm/alpha2_compose.d.ts +92 -0
  68. package/wasm/alpha2_compose.js +445 -0
  69. package/wasm/alpha2_compose_bg.wasm +0 -0
  70. package/wasm/alpha2_compose_bg.wasm.d.ts +17 -0
  71. package/wasm/alpha2_extensions_bg.wasm +0 -0
  72. package/wasm/alpha2_extensions_pdf_bg.wasm +0 -0
  73. package/wasm/alpha2_wasm.d.ts +151 -18
  74. package/wasm/alpha2_wasm.js +403 -59
  75. package/wasm/alpha2_wasm_bg.wasm +0 -0
  76. package/wasm/alpha2_wasm_bg.wasm.d.ts +21 -6
  77. package/wasm/rust-crate-licenses.md +5 -61
  78. package/wasm/snippets/alpha2-wasm-6749ed8b34a74067/inline3.js +7 -0
  79. /package/wasm/snippets/{alpha2-wasm-a6265983c9769e80/inline1.js → alpha2-wasm-6749ed8b34a74067/inline0.js} +0 -0
  80. /package/wasm/snippets/{alpha2-wasm-a6265983c9769e80/inline2.js → alpha2-wasm-6749ed8b34a74067/inline1.js} +0 -0
  81. /package/wasm/snippets/{alpha2-wasm-a6265983c9769e80/inline3.js → alpha2-wasm-6749ed8b34a74067/inline2.js} +0 -0
  82. /package/wasm/snippets/{alpha2-wasm-a6265983c9769e80/inline0.js → alpha2-wasm-6749ed8b34a74067/inline4.js} +0 -0
@@ -42,15 +42,22 @@ export async function intakeVideoFrame(frame, options) {
42
42
  * Reads the frame's planes, retrying up to {@link READBACK_RETRIES} times a task apart on readback
43
43
  * failures. Rejects with {@link NonPlanarVideoFrameError} or the last read's error.
44
44
  */
45
- export async function readPlanesWithRetries(frame, declared, identity, pool, counters) {
45
+ export function readPlanesWithRetries(frame, declared, identity, pool, counters) {
46
+ return withReadbackRetries(() => readPlanarYuvFrame(frame, declared, identity, pool), () => (counters.readbackRetries += 1));
47
+ }
48
+ /**
49
+ * Runs `read`, retrying up to {@link READBACK_RETRIES} times a task apart while it fails with
50
+ * {@link isUnreadableFrame}. Rejects with the last read's error.
51
+ */
52
+ export async function withReadbackRetries(read, onRetry = () => { }) {
46
53
  for (let retry = 0;; retry += 1) {
47
54
  try {
48
- return await readPlanarYuvFrame(frame, declared, identity, pool);
55
+ return await read();
49
56
  }
50
57
  catch (error) {
51
58
  if (retry >= READBACK_RETRIES || !isUnreadableFrame(error))
52
59
  throw error;
53
- counters.readbackRetries += 1;
60
+ onRetry();
54
61
  await nextTask();
55
62
  }
56
63
  }
@@ -0,0 +1,3 @@
1
+ import type { BuiltinEffectRules } from "../project.js";
2
+ /** Each built-in effect and transition's contract, by id. */
3
+ export declare const BUILTIN_EFFECT_RULES: Readonly<Record<string, BuiltinEffectRules>>;