react-native-skia-webgpu-video 0.0.0-stage → 0.1.0-beta.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 (237) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +303 -2
  3. package/android/BUILD_VALIDATION.md +62 -0
  4. package/android/CMakeLists.txt +99 -0
  5. package/android/build-validation.json +262 -0
  6. package/android/build.gradle +185 -0
  7. package/android/cpp/EncoderTargets.cpp +226 -0
  8. package/android/cpp/EncoderTargets.h +70 -0
  9. package/android/cpp/JNIHelpers.cpp +15 -0
  10. package/android/cpp/JNIHelpers.h +20 -0
  11. package/android/cpp/NativeEventDispatcher.cpp +59 -0
  12. package/android/cpp/NativeEventDispatcher.h +31 -0
  13. package/android/cpp/NativeHardwareBuffer.cpp +397 -0
  14. package/android/cpp/NativeHardwareBuffer.h +34 -0
  15. package/android/cpp/NativeRgbaBuffer.cpp +45 -0
  16. package/android/cpp/NativeRgbaBuffer.h +9 -0
  17. package/android/cpp/ReturnedVideoFrames.h +37 -0
  18. package/android/cpp/RgbaFrameLease.h +53 -0
  19. package/android/cpp/VideoCapabilities.cpp +87 -0
  20. package/android/cpp/VideoCapabilities.h +44 -0
  21. package/android/cpp/VideoComposition.cpp +170 -0
  22. package/android/cpp/VideoComposition.h +36 -0
  23. package/android/cpp/VideoCompositionFramesExtractor.cpp +82 -0
  24. package/android/cpp/VideoCompositionFramesExtractor.h +48 -0
  25. package/android/cpp/VideoCompositionFramesExtractorHostObject.cpp +230 -0
  26. package/android/cpp/VideoCompositionFramesExtractorHostObject.h +42 -0
  27. package/android/cpp/VideoCompositionFramesExtractorSyncHostObject.cpp +133 -0
  28. package/android/cpp/VideoCompositionFramesExtractorSyncHostObject.h +46 -0
  29. package/android/cpp/VideoEncoderHostObject.cpp +318 -0
  30. package/android/cpp/VideoEncoderHostObject.h +76 -0
  31. package/android/cpp/VideoFrame.cpp +293 -0
  32. package/android/cpp/VideoFrame.h +27 -0
  33. package/android/cpp/VideoPlayer.cpp +96 -0
  34. package/android/cpp/VideoPlayer.h +52 -0
  35. package/android/cpp/VideoPlayerHostObject.cpp +225 -0
  36. package/android/cpp/VideoPlayerHostObject.h +43 -0
  37. package/android/cpp/cpp-adapter.cpp +316 -0
  38. package/android/gradle.properties +5 -0
  39. package/android/instrumentation-inventory.json +178 -0
  40. package/android/proguard-rules.pro +4 -0
  41. package/android/src/main/AndroidManifest.xml +2 -0
  42. package/android/src/main/java/com/azzapp/rnskv/AudioCompositionExporter.java +537 -0
  43. package/android/src/main/java/com/azzapp/rnskv/AudioCompositionPlayer.java +321 -0
  44. package/android/src/main/java/com/azzapp/rnskv/BufferLifetime.java +55 -0
  45. package/android/src/main/java/com/azzapp/rnskv/DecodeRequests.java +100 -0
  46. package/android/src/main/java/com/azzapp/rnskv/DecoderWindow.java +55 -0
  47. package/android/src/main/java/com/azzapp/rnskv/DisplayVsyncPeriod.java +72 -0
  48. package/android/src/main/java/com/azzapp/rnskv/EGLResourcesHolder.java +132 -0
  49. package/android/src/main/java/com/azzapp/rnskv/EGLUtils.java +225 -0
  50. package/android/src/main/java/com/azzapp/rnskv/FrameSize.java +50 -0
  51. package/android/src/main/java/com/azzapp/rnskv/GLFrameExtractor.java +510 -0
  52. package/android/src/main/java/com/azzapp/rnskv/JNIHelpers.java +12 -0
  53. package/android/src/main/java/com/azzapp/rnskv/NativeEventDispatcher.java +25 -0
  54. package/android/src/main/java/com/azzapp/rnskv/NativeHardwareBuffer.java +62 -0
  55. package/android/src/main/java/com/azzapp/rnskv/NativeRgbaBuffer.java +43 -0
  56. package/android/src/main/java/com/azzapp/rnskv/ReactNativeSkiaVideoModule.java +45 -0
  57. package/android/src/main/java/com/azzapp/rnskv/ReactNativeSkiaVideoPackage.java +43 -0
  58. package/android/src/main/java/com/azzapp/rnskv/ReactNativeSkiaVideoSpec.java +9 -0
  59. package/android/src/main/java/com/azzapp/rnskv/RgbaBufferAllocator.java +114 -0
  60. package/android/src/main/java/com/azzapp/rnskv/RgbaLayout.java +33 -0
  61. package/android/src/main/java/com/azzapp/rnskv/SurfaceOutputPolicy.java +13 -0
  62. package/android/src/main/java/com/azzapp/rnskv/TextureRenderer.java +150 -0
  63. package/android/src/main/java/com/azzapp/rnskv/TimeHelpers.java +11 -0
  64. package/android/src/main/java/com/azzapp/rnskv/VideoCapabilities.java +354 -0
  65. package/android/src/main/java/com/azzapp/rnskv/VideoComposition.java +147 -0
  66. package/android/src/main/java/com/azzapp/rnskv/VideoCompositionDecoder.java +779 -0
  67. package/android/src/main/java/com/azzapp/rnskv/VideoCompositionFramesExtractor.java +463 -0
  68. package/android/src/main/java/com/azzapp/rnskv/VideoCompositionFramesExtractorSync.java +241 -0
  69. package/android/src/main/java/com/azzapp/rnskv/VideoCompositionItemDecoder.java +492 -0
  70. package/android/src/main/java/com/azzapp/rnskv/VideoEncoder.java +639 -0
  71. package/android/src/main/java/com/azzapp/rnskv/VideoFrame.java +74 -0
  72. package/android/src/main/java/com/azzapp/rnskv/VideoPlayer.java +361 -0
  73. package/cpp/RNSVCheckedSizes.h +54 -0
  74. package/cpp/RNSVEventEmitter.cpp +199 -0
  75. package/cpp/RNSVEventEmitter.h +31 -0
  76. package/cpp/RNSVHostObject.cpp +79 -0
  77. package/cpp/RNSVHostObject.h +67 -0
  78. package/cpp/RNSVMemoryBudget.cpp +68 -0
  79. package/cpp/RNSVMemoryBudget.h +100 -0
  80. package/cpp/RNSVRuntimeLifecycleMonitor.cpp +88 -0
  81. package/cpp/RNSVRuntimeLifecycleMonitor.h +33 -0
  82. package/docs/ANDROID_DEVICE_306.md +95 -0
  83. package/docs/ANDROID_EXPORT_CACHE_306.md +48 -0
  84. package/docs/ANDROID_MEMORY_RETENTION_306.md +67 -0
  85. package/docs/BENCHMARKS.md +368 -0
  86. package/docs/IOS_DEVICE_TESTS.md +115 -0
  87. package/docs/IOS_SIMULATOR_TESTS.md +74 -0
  88. package/docs/MIGRATION.md +82 -0
  89. package/docs/NATIVE_MEMORY_INVESTIGATION_306.md +88 -0
  90. package/docs/PERFORMANCE_AB_IPHONE_303.md +196 -0
  91. package/docs/PERFORMANCE_AB_SIMULATOR.md +135 -0
  92. package/docs/PERFORMANCE_AB_SOAK_SIMULATOR.md +84 -0
  93. package/docs/PERFORMANCE_IPHONE_306_OPTIMIZATION.md +76 -0
  94. package/docs/PERFORMANCE_SIMULATOR.md +89 -0
  95. package/docs/PERFORMANCE_SIMULATOR_INITIAL.md +96 -0
  96. package/docs/PERFORMANCE_SOAK_IPHONE_303.md +41 -0
  97. package/docs/UPSTREAM_NOTES.md +188 -0
  98. package/docs/assets/banner.svg +26 -0
  99. package/examples/webgpu-overlay.ts +147 -0
  100. package/ios/AVAssetTrackUtils.h +24 -0
  101. package/ios/AudioCompositionUtils.h +27 -0
  102. package/ios/AudioCompositionUtils.mm +113 -0
  103. package/ios/DecoderWindow.h +52 -0
  104. package/ios/NativeResourceStats.h +32 -0
  105. package/ios/RNSVColorSpace.h +50 -0
  106. package/ios/RNSVJSIUtils.h +46 -0
  107. package/ios/RNSVScopedPixelBuffer.h +17 -0
  108. package/ios/RNSVVideoPlayer.h +46 -0
  109. package/ios/RNSVVideoPlayer.mm +410 -0
  110. package/ios/ReactNativeSkiaVideo.h +8 -0
  111. package/ios/ReactNativeSkiaVideo.mm +310 -0
  112. package/ios/SeekPolicy.h +27 -0
  113. package/ios/VideoComposition.h +148 -0
  114. package/ios/VideoCompositionFramesExtractorHostObject.h +105 -0
  115. package/ios/VideoCompositionFramesExtractorHostObject.mm +686 -0
  116. package/ios/VideoCompositionFramesExtractorSyncHostObject.h +37 -0
  117. package/ios/VideoCompositionFramesExtractorSyncHostObject.mm +168 -0
  118. package/ios/VideoCompositionItemDecoder.h +60 -0
  119. package/ios/VideoCompositionItemDecoder.mm +480 -0
  120. package/ios/VideoEncoderHostObject.h +83 -0
  121. package/ios/VideoEncoderHostObject.mm +706 -0
  122. package/ios/VideoFrame.h +66 -0
  123. package/ios/VideoFrame.mm +108 -0
  124. package/ios/VideoPlayerHostObject.h +52 -0
  125. package/ios/VideoPlayerHostObject.mm +332 -0
  126. package/lib/module/NativeReactNativeSkiaVideo.js +5 -0
  127. package/lib/module/NativeReactNativeSkiaVideo.js.map +1 -0
  128. package/lib/module/RNSkiaVideoModule.js +20 -0
  129. package/lib/module/RNSkiaVideoModule.js.map +1 -0
  130. package/lib/module/canvas.js +18 -0
  131. package/lib/module/canvas.js.map +1 -0
  132. package/lib/module/exportCache.js +22 -0
  133. package/lib/module/exportCache.js.map +1 -0
  134. package/lib/module/exportFrames.js +338 -0
  135. package/lib/module/exportFrames.js.map +1 -0
  136. package/lib/module/exportQueue.js +52 -0
  137. package/lib/module/exportQueue.js.map +1 -0
  138. package/lib/module/exportTarget.js +137 -0
  139. package/lib/module/exportTarget.js.map +1 -0
  140. package/lib/module/exportVideoComposition.js +492 -0
  141. package/lib/module/exportVideoComposition.js.map +1 -0
  142. package/lib/module/frameInterop.js +532 -0
  143. package/lib/module/frameInterop.js.map +1 -0
  144. package/lib/module/gpu.js +222 -0
  145. package/lib/module/gpu.js.map +1 -0
  146. package/lib/module/gpuDevice.js +54 -0
  147. package/lib/module/gpuDevice.js.map +1 -0
  148. package/lib/module/index.js +36 -0
  149. package/lib/module/index.js.map +1 -0
  150. package/lib/module/memory.js +38 -0
  151. package/lib/module/memory.js.map +1 -0
  152. package/lib/module/package.json +1 -0
  153. package/lib/module/previewLifecycle.js +52 -0
  154. package/lib/module/previewLifecycle.js.map +1 -0
  155. package/lib/module/runtimeYield.js +10 -0
  156. package/lib/module/runtimeYield.js.map +1 -0
  157. package/lib/module/types.js +4 -0
  158. package/lib/module/types.js.map +1 -0
  159. package/lib/module/utils/useEventListener.js +18 -0
  160. package/lib/module/utils/useEventListener.js.map +1 -0
  161. package/lib/module/videoCompositionPlayer.js +368 -0
  162. package/lib/module/videoCompositionPlayer.js.map +1 -0
  163. package/lib/module/videoFrameImage.js +185 -0
  164. package/lib/module/videoFrameImage.js.map +1 -0
  165. package/lib/module/videoPlayer.js +172 -0
  166. package/lib/module/videoPlayer.js.map +1 -0
  167. package/lib/module/yuvBlit.js +299 -0
  168. package/lib/module/yuvBlit.js.map +1 -0
  169. package/lib/typescript/package.json +1 -0
  170. package/lib/typescript/src/NativeReactNativeSkiaVideo.d.ts +7 -0
  171. package/lib/typescript/src/NativeReactNativeSkiaVideo.d.ts.map +1 -0
  172. package/lib/typescript/src/RNSkiaVideoModule.d.ts +4 -0
  173. package/lib/typescript/src/RNSkiaVideoModule.d.ts.map +1 -0
  174. package/lib/typescript/src/canvas.d.ts +4 -0
  175. package/lib/typescript/src/canvas.d.ts.map +1 -0
  176. package/lib/typescript/src/exportCache.d.ts +6 -0
  177. package/lib/typescript/src/exportCache.d.ts.map +1 -0
  178. package/lib/typescript/src/exportFrames.d.ts +57 -0
  179. package/lib/typescript/src/exportFrames.d.ts.map +1 -0
  180. package/lib/typescript/src/exportQueue.d.ts +5 -0
  181. package/lib/typescript/src/exportQueue.d.ts.map +1 -0
  182. package/lib/typescript/src/exportTarget.d.ts +28 -0
  183. package/lib/typescript/src/exportTarget.d.ts.map +1 -0
  184. package/lib/typescript/src/exportVideoComposition.d.ts +68 -0
  185. package/lib/typescript/src/exportVideoComposition.d.ts.map +1 -0
  186. package/lib/typescript/src/frameInterop.d.ts +17 -0
  187. package/lib/typescript/src/frameInterop.d.ts.map +1 -0
  188. package/lib/typescript/src/gpu.d.ts +39 -0
  189. package/lib/typescript/src/gpu.d.ts.map +1 -0
  190. package/lib/typescript/src/gpuDevice.d.ts +11 -0
  191. package/lib/typescript/src/gpuDevice.d.ts.map +1 -0
  192. package/lib/typescript/src/index.d.ts +21 -0
  193. package/lib/typescript/src/index.d.ts.map +1 -0
  194. package/lib/typescript/src/memory.d.ts +25 -0
  195. package/lib/typescript/src/memory.d.ts.map +1 -0
  196. package/lib/typescript/src/previewLifecycle.d.ts +22 -0
  197. package/lib/typescript/src/previewLifecycle.d.ts.map +1 -0
  198. package/lib/typescript/src/runtimeYield.d.ts +4 -0
  199. package/lib/typescript/src/runtimeYield.d.ts.map +1 -0
  200. package/lib/typescript/src/types.d.ts +631 -0
  201. package/lib/typescript/src/types.d.ts.map +1 -0
  202. package/lib/typescript/src/utils/useEventListener.d.ts +5 -0
  203. package/lib/typescript/src/utils/useEventListener.d.ts.map +1 -0
  204. package/lib/typescript/src/videoCompositionPlayer.d.ts +105 -0
  205. package/lib/typescript/src/videoCompositionPlayer.d.ts.map +1 -0
  206. package/lib/typescript/src/videoFrameImage.d.ts +60 -0
  207. package/lib/typescript/src/videoFrameImage.d.ts.map +1 -0
  208. package/lib/typescript/src/videoPlayer.d.ts +99 -0
  209. package/lib/typescript/src/videoPlayer.d.ts.map +1 -0
  210. package/lib/typescript/src/yuvBlit.d.ts +50 -0
  211. package/lib/typescript/src/yuvBlit.d.ts.map +1 -0
  212. package/package.json +155 -4
  213. package/patches/react-native-skia+3.7.0.patch +502 -0
  214. package/react-native-skia-webgpu-video.podspec +35 -0
  215. package/scripts/apply-skia-canvas-patch.mjs +48 -0
  216. package/scripts/skia-canvas-patch.json +291 -0
  217. package/src/NativeReactNativeSkiaVideo.ts +8 -0
  218. package/src/RNSkiaVideoModule.ts +27 -0
  219. package/src/canvas.ts +22 -0
  220. package/src/exportCache.ts +27 -0
  221. package/src/exportFrames.ts +421 -0
  222. package/src/exportQueue.ts +65 -0
  223. package/src/exportTarget.ts +179 -0
  224. package/src/exportVideoComposition.ts +718 -0
  225. package/src/frameInterop.ts +684 -0
  226. package/src/gpu.ts +290 -0
  227. package/src/gpuDevice.ts +80 -0
  228. package/src/index.tsx +45 -0
  229. package/src/memory.ts +48 -0
  230. package/src/previewLifecycle.ts +60 -0
  231. package/src/runtimeYield.ts +6 -0
  232. package/src/types.ts +661 -0
  233. package/src/utils/useEventListener.ts +22 -0
  234. package/src/videoCompositionPlayer.ts +568 -0
  235. package/src/videoFrameImage.ts +205 -0
  236. package/src/videoPlayer.ts +318 -0
  237. package/src/yuvBlit.ts +331 -0
@@ -0,0 +1,105 @@
1
+ import type { SkImage } from "react-native-skia";
2
+ import { type DerivedValue, type SharedValue } from "react-native-reanimated";
3
+ import type { FrameDrawer, VideoComposition, VideoCompositionFramesExtractor } from "./types.js";
4
+ type UseVideoCompositionPlayerOptions<T = undefined> = {
5
+ /**
6
+ * The video composition to play.
7
+ * if null, the composition player won't be created.
8
+ */
9
+ composition: VideoComposition | null;
10
+ /**
11
+ * The function used to draw the composition frames.
12
+ */
13
+ drawFrame: FrameDrawer<T>;
14
+ /**
15
+ * A function that is called before drawing each frame.
16
+ * the return value will be passed to the drawFrame function as context.
17
+ */
18
+ beforeDrawFrame?: () => T;
19
+ /**
20
+ * A function that is called after drawing each frame.
21
+ * the context returned by the beforeDrawFrame function will be passed to this function.
22
+ * This function can be used to clean up resources allocated during the drawFrame function.
23
+ */
24
+ afterDrawFrame?: (context: T) => void;
25
+ /**
26
+ * The width of rendered frames.
27
+ */
28
+ width: number;
29
+ /**
30
+ * The height of rendered frames.
31
+ */
32
+ height: number;
33
+ /**
34
+ * Whether the composition should start playing automatically.
35
+ */
36
+ autoPlay?: boolean;
37
+ /**
38
+ * Weather the composition should loop.
39
+ */
40
+ isLooping?: boolean;
41
+ /**
42
+ * Whether to keep calling `drawFrame` at every vsync while playback is
43
+ * paused. By default a paused player only redraws when the composition time
44
+ * or the decoded frames change (a seek, the frame that follows it), which
45
+ * saves GPU time and battery. Enable it if `drawFrame` depends on values
46
+ * that change while paused, an overlay being dragged for instance.
47
+ *
48
+ * Or the shared values `drawFrame` reads: a paused player then redraws only
49
+ * when one of them is replaced, besides the time, the frames, the size or
50
+ * `drawFrame` itself. An idle editor stops redrawing at every vsync.
51
+ * @default false
52
+ */
53
+ drawWhenPaused?: boolean | SharedValue<unknown>[];
54
+ /**
55
+ * Whether `drawFrame` can draw something different at `currentTime` than it
56
+ * drew at `previousTime` from the same decoded frames. By default every time
57
+ * change redraws, so a playing player draws at every vsync even though the
58
+ * video only changes at its own frame rate. A drawer whose picture depends on
59
+ * time only through the frames (or only at known moments, a transition say)
60
+ * returns false elsewhere, and the player then redraws when a new frame is
61
+ * decoded instead. Must be a worklet.
62
+ */
63
+ redrawOnTime?: (previousTime: number, currentTime: number) => boolean;
64
+ /**
65
+ * Import a newly decoded frame in one vsync and draw it in the next, instead
66
+ * of both in the same one. On Android the import (YUV blit and its checked
67
+ * GPU wait) and the draw (snapshot and its checked GPU wait) cost about as
68
+ * much as each other, and together they overrun a 90–120 Hz frame budget on
69
+ * the UI thread. The picture then trails the clock by one vsync.
70
+ * The first frame of a session is still drawn as soon as it is imported.
71
+ * @default false
72
+ */
73
+ splitImportAndDraw?: boolean;
74
+ /**
75
+ * Callback that is called when the composition is ready to play.
76
+ */
77
+ onReadyToPlay?: () => void;
78
+ /**
79
+ * Callback that is called when the composition playback completes.
80
+ */
81
+ onComplete?: () => void;
82
+ /**
83
+ * Callback that is called when an error occurs.
84
+ * @param error the error that occurred.
85
+ * @param retry a function that can be called to retry the operation.
86
+ */
87
+ onError?: (error: any, retry: () => void) => void;
88
+ };
89
+ type VideoCompositionPlayerController = Pick<VideoCompositionFramesExtractor, "currentTime" | "play" | "pause" | "seekTo" | "isPlaying">;
90
+ type UseVideoCompositionPlayerReturnType = {
91
+ /**
92
+ * The current drawn frame of the video composition.
93
+ */
94
+ currentFrame: DerivedValue<SkImage | null>;
95
+ /**
96
+ * The video player controller.
97
+ */
98
+ player: VideoCompositionPlayerController | null;
99
+ };
100
+ /**
101
+ * A hook that creates a video composition player.
102
+ */
103
+ export declare const useVideoComposition: <T = undefined>({ composition, drawFrame, beforeDrawFrame, afterDrawFrame, width, height, autoPlay, isLooping, drawWhenPaused, redrawOnTime, splitImportAndDraw, onReadyToPlay, onComplete, onError, }: UseVideoCompositionPlayerOptions<T>) => UseVideoCompositionPlayerReturnType;
104
+ export {};
105
+ //# sourceMappingURL=videoCompositionPlayer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"videoCompositionPlayer.d.ts","sourceRoot":"","sources":["../../../src/videoCompositionPlayer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAY,OAAO,EAAa,MAAM,mBAAmB,CAAC;AAEtE,OAAO,EAIL,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EACV,WAAW,EAEX,gBAAgB,EAChB,+BAA+B,EAChC,MAAM,YAAS,CAAC;AASjB,KAAK,gCAAgC,CAAC,CAAC,GAAG,SAAS,IAAI;IACrD;;;OAGG;IACH,WAAW,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACrC;;OAEG;IACH,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAC1B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,IAAI,CAAC;IACtC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;IAClD;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC;IACtE;;;;;;;;OAQG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,KAAK,gCAAgC,GAAG,IAAI,CAC1C,+BAA+B,EAC/B,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,WAAW,CAC1D,CAAC;AAEF,KAAK,mCAAmC,GAAG;IACzC;;OAEG;IACH,YAAY,EAAE,YAAY,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAC3C;;OAEG;IACH,MAAM,EAAE,gCAAgC,GAAG,IAAI,CAAC;CACjD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,GAAG,SAAS,EAAE,wLAehD,gCAAgC,CAAC,CAAC,CAAC,KAAG,mCAsaxC,CAAC"}
@@ -0,0 +1,60 @@
1
+ import type { SkCanvas, SkImage, SkPaint, SkRect } from "react-native-skia";
2
+ import type { VideoFrame } from "./types.js";
3
+ /**
4
+ * A frame as a Skia image, with what it takes to show its picture: the part of
5
+ * the image that is the picture, and the rotation that shows it upright.
6
+ */
7
+ export type VideoFrameImage = {
8
+ /** The frame's whole texture. */
9
+ image: SkImage;
10
+ /**
11
+ * The picture, in the image's pixels: all of the image, except for the
12
+ * decoder's buffers that Android hands over with `textureMode: 'direct'`.
13
+ */
14
+ rect: SkRect;
15
+ /** Clockwise, in degrees (0, 90, 180 or 270), to show the picture upright. */
16
+ rotation: number;
17
+ /** The width of the upright picture. */
18
+ width: number;
19
+ /** The height of the upright picture. */
20
+ height: number;
21
+ };
22
+ /**
23
+ * How the picture fills the destination of {@link drawVideoFrame}.
24
+ *
25
+ * - `fill`: all of it, stretched to the destination.
26
+ * - `cover`: the middle of it with the destination's aspect, all of the
27
+ * destination.
28
+ * - `contain`: all of it with its own aspect, in the middle of the destination.
29
+ */
30
+ export type VideoFrameFit = "fill" | "cover" | "contain";
31
+ /**
32
+ * Wraps a frame's texture in a Skia image, and says which part of it to draw
33
+ * and how to turn it. Works with every frame, whatever the platform and the
34
+ * texture mode: iOS frames and Android `direct` frames come as decoded, with
35
+ * a rotation, and Android `direct` frames are larger than their picture.
36
+ *
37
+ * @param frame the frame, drawn in the tick it was handed out in
38
+ * @param output an image returned for a previous frame, recycled rather than
39
+ * allocating a new wrapper. Accepted for compatibility; owned snapshots are used in v3
40
+ * @returns the image and its picture, or null when the frame has no texture
41
+ */
42
+ export declare const makeVideoFrameImage: (frame: VideoFrame, _output?: SkImage | null) => VideoFrameImage | null;
43
+ /**
44
+ * Draws a frame's picture, upright, into a rectangle of the canvas.
45
+ *
46
+ * @param canvas the canvas to draw on
47
+ * @param frame the frame, drawn in the tick it was handed out in
48
+ * @param dst where to draw the picture
49
+ * @param options.paint the paint to draw with, for an opacity say
50
+ * @param options.fit how the picture fills `dst`, `fill` by default
51
+ * @param options.output an image returned by a previous call, recycled
52
+ * @returns the image drawn, to pass back as `output` next time, or null when
53
+ * the frame has no texture
54
+ */
55
+ export declare const drawVideoFrame: (canvas: SkCanvas, frame: VideoFrame, dst: SkRect, options?: {
56
+ paint?: SkPaint;
57
+ fit?: VideoFrameFit;
58
+ output?: SkImage | null;
59
+ }) => SkImage | null;
60
+ //# sourceMappingURL=videoFrameImage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"videoFrameImage.d.ts","sourceRoot":"","sources":["../../../src/videoFrameImage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE5E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAS,CAAC;AAG1C;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,iCAAiC;IACjC,KAAK,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,GAC9B,OAAO,UAAU,EACjB,UAAU,OAAO,GAAG,IAAI,KACvB,eAAe,GAAG,IAqBpB,CAAC;AAgDF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,GACzB,QAAQ,QAAQ,EAChB,OAAO,UAAU,EACjB,KAAK,MAAM,EACX,UAAU;IACR,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CACzB,KACA,OAAO,GAAG,IAiEZ,CAAC"}
@@ -0,0 +1,99 @@
1
+ import { type SharedValue } from "react-native-reanimated";
2
+ import type { BufferingRange, VideoDimensions, VideoFrame, VideoPlayer, VideoTextureMode } from "./types.js";
3
+ type UseVideoPlayerOptions = {
4
+ /**
5
+ * The URI of the video to play.
6
+ * if null, the video player won't be created.
7
+ */
8
+ uri: string | null;
9
+ /**
10
+ * If provided, the resolution to scale the video to.
11
+ * If not provided, the original resolution of the video will be used.
12
+ * Downscaling the video can improve performance.
13
+ * Changing the resolution after the video player will lead to re-creating the video player.
14
+ */
15
+ resolution?: {
16
+ width: number;
17
+ height: number;
18
+ } | null;
19
+ /**
20
+ * How the decoded frames reach Skia on iOS, see `VideoTextureMode`.
21
+ * Changing it re-creates the video player. Ignored on Android.
22
+ * @default 'copy'
23
+ */
24
+ textureMode?: VideoTextureMode;
25
+ /**
26
+ * Whether the video should start playing automatically.
27
+ */
28
+ autoPlay?: boolean;
29
+ /**
30
+ * Weather the video should loop.
31
+ */
32
+ isLooping?: boolean;
33
+ /**
34
+ * The volume of the video.
35
+ */
36
+ volume?: number;
37
+ /**
38
+ * The playback speed of the video.
39
+ * The value should be greater than 0. 1.0 is normal speed, 2.0 is double speed, 0.5 is half speed.
40
+ */
41
+ playbackSpeed?: number;
42
+ /**
43
+ * Callback that is called when the video is ready to play.
44
+ * @param dimensions The dimensions of the video.
45
+ */
46
+ onReadyToPlay?: (dimensions: VideoDimensions) => void;
47
+ /**
48
+ * Callback that is called when the video starts buffering.
49
+ */
50
+ onBufferingStart?: () => void;
51
+ /**
52
+ * Callback that is called when the video stops buffering.
53
+ */
54
+ onBufferingEnd?: () => void;
55
+ /**
56
+ * Callback that is called when the buffered ranges are updated.
57
+ * @param loadedRanges The buffered ranges.
58
+ */
59
+ onBufferingUpdate?: (loadedRanges: BufferingRange[]) => void;
60
+ /**
61
+ * Callback that is called when the video playback completes.
62
+ */
63
+ onComplete?: () => void;
64
+ /**
65
+ * Callback that is called when an error occurs.
66
+ * @param error the error that occurred.
67
+ * @param retry a function that can be called to retry the operation.
68
+ */
69
+ onError?: (error: any, retry: () => void) => void;
70
+ /**
71
+ * Callback that is called when the playing status changes.
72
+ * @param playing Whether the video is playing.
73
+ */
74
+ onPlayingStatusChange?: (playing: boolean) => void;
75
+ /**
76
+ * Callback that is called when a seek operation completes.
77
+ * @returns
78
+ */
79
+ onSeekComplete?: () => void;
80
+ };
81
+ type VideoPlayerController = Pick<VideoPlayer, "currentTime" | "duration" | "play" | "pause" | "seekTo" | "isPlaying">;
82
+ type UseVideoPlayerReturnType = {
83
+ /**
84
+ * The current frame of the playing video.
85
+ */
86
+ currentFrame: SharedValue<VideoFrame | null>;
87
+ /**
88
+ * The video player controller.
89
+ */
90
+ player: VideoPlayerController | null;
91
+ };
92
+ /**
93
+ * Hook that creates a video player and manages its state.
94
+ * @param options The options for the video player.
95
+ * @returns
96
+ */
97
+ export declare const useVideoPlayback: ({ uri, resolution, textureMode, autoPlay, isLooping, volume, playbackSpeed, onReadyToPlay, onBufferingStart, onBufferingEnd, onBufferingUpdate, onComplete, onError, onPlayingStatusChange, onSeekComplete, }: UseVideoPlayerOptions) => UseVideoPlayerReturnType;
98
+ export {};
99
+ //# sourceMappingURL=videoPlayer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"videoPlayer.d.ts","sourceRoot":"","sources":["../../../src/videoPlayer.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,UAAU,EACV,WAAW,EACX,gBAAgB,EACjB,MAAM,YAAS,CAAC;AAOjB,KAAK,qBAAqB,GAAG;IAC3B;;;OAGG;IACH,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB;;;;;OAKG;IACH,UAAU,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACtD;;;;OAIG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,eAAe,KAAK,IAAI,CAAC;IACtD;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,KAAK,IAAI,CAAC;IAC7D;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAClD;;;OAGG;IACH,qBAAqB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACnD;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF,KAAK,qBAAqB,GAAG,IAAI,CAC/B,WAAW,EACX,aAAa,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,WAAW,CACvE,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B;;OAEG;IACH,YAAY,EAAE,WAAW,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IAC7C;;OAEG;IACH,MAAM,EAAE,qBAAqB,GAAG,IAAI,CAAC;CACtC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,+MAgB9B,qBAAqB,KAAG,wBAwL1B,CAAC"}
@@ -0,0 +1,50 @@
1
+ import type { GPUNativeBufferExternalTexture, NativeVideoFrame } from "react-native-webgpu";
2
+ /** One Android decoder buffer, imported once as an external texture. An
3
+ * ImageReader cycles through a few buffers: each one is imported the first
4
+ * time it shows up, then only its access is opened and closed per frame. */
5
+ export type YuvImport = {
6
+ handle: bigint;
7
+ rotation: number;
8
+ /** The import's own reference on the buffer, released with it. */
9
+ source: NativeVideoFrame;
10
+ wrapper: GPUNativeBufferExternalTexture;
11
+ uniforms: GPUBuffer;
12
+ bindGroup: GPUBindGroup;
13
+ /** uv scale and offset last written to `uniforms`. */
14
+ mapping: number[];
15
+ };
16
+ /** The corner of a decoder buffer's crop rectangle once the buffer is turned
17
+ * clockwise for display: the blit takes its source origin in that turned
18
+ * space. Throws unless the rectangle lies in the buffer and turns into the
19
+ * frame's display size. */
20
+ export declare const yuvFrameOrigin: (region: {
21
+ x: number;
22
+ y: number;
23
+ width: number;
24
+ height: number;
25
+ }, rotation: number, buffer: {
26
+ width: number;
27
+ height: number;
28
+ }, frame: {
29
+ width: number;
30
+ height: number;
31
+ }) => {
32
+ x: number;
33
+ y: number;
34
+ };
35
+ /** Call only once the GPU work sampling the buffer has completed. */
36
+ export declare const releaseYuvImport: (entry: YuvImport) => void;
37
+ /** Releases a producer's imports, or every producer's. Call only once the GPU
38
+ * work sampling them has completed (a checked flush). */
39
+ export declare const releaseYuvImports: (imports: Map<number, YuvImport[]>, producer?: number) => void;
40
+ /**
41
+ * Draws the upright `width`×`height` region at `origin` of a decoder buffer
42
+ * into `target`, converting YUV to RGB; the buffer is imported on its first
43
+ * frame. Submits the draw: the caller waits for it before releasing the
44
+ * frame's lease or `source`, as after copyExternalImageToTexture.
45
+ */
46
+ export declare const blitYuvFrame: (device: GPUDevice, imports: Map<number, YuvImport[]>, producer: number, source: NativeVideoFrame, rotation: number, origin: {
47
+ x: number;
48
+ y: number;
49
+ }, width: number, height: number, target: GPUTexture) => void;
50
+ //# sourceMappingURL=yuvBlit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yuvBlit.d.ts","sourceRoot":"","sources":["../../../src/yuvBlit.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,8BAA8B,EAC9B,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAO7B;;4EAE4E;AAC5E,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,MAAM,EAAE,gBAAgB,CAAC;IACzB,OAAO,EAAE,8BAA8B,CAAC;IACxC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,EAAE,YAAY,CAAC;IACxB,sDAAsD;IACtD,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA4CF;;;2BAG2B;AAC3B,eAAO,MAAM,cAAc,GACzB,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAC/D,UAAU,MAAM,EAChB,QAAQ;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACzC,OAAO;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,KACvC;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAyBxB,CAAC;AAyEF,qEAAqE;AACrE,eAAO,MAAM,gBAAgB,GAAI,OAAO,SAAS,KAAG,IAKnD,CAAC;AAEF;yDACyD;AACzD,eAAO,MAAM,iBAAiB,GAC5B,SAAS,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,EACjC,WAAW,MAAM,KAChB,IAUF,CAAC;AAoDF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GACvB,QAAQ,SAAS,EACjB,SAAS,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,EACjC,UAAU,MAAM,EAChB,QAAQ,gBAAgB,EACxB,UAAU,MAAM,EAChB,QAAQ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,OAAO,MAAM,EACb,QAAQ,MAAM,EACd,QAAQ,UAAU,KACjB,IAgEF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,157 @@
1
1
  {
2
2
  "name": "react-native-skia-webgpu-video",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0-beta.1",
4
+ "description": "Bounded video composition, playback and export for React Native Skia 3 / Graphite",
5
+ "main": "./lib/module/index.js",
6
+ "types": "./lib/typescript/src/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./lib/typescript/src/index.d.ts",
10
+ "react-native": "./src/index.tsx",
11
+ "default": "./lib/module/index.js"
12
+ },
13
+ "./package.json": "./package.json",
14
+ "./gpu": {
15
+ "types": "./lib/typescript/src/gpu.d.ts",
16
+ "react-native": "./src/gpu.ts",
17
+ "default": "./lib/module/gpu.js"
18
+ },
19
+ "./apply-skia-canvas-patch": "./scripts/apply-skia-canvas-patch.mjs"
20
+ },
21
+ "files": [
22
+ "src",
23
+ "lib",
24
+ "android",
25
+ "ios",
26
+ "cpp",
27
+ "*.podspec",
28
+ "!ios/build",
29
+ "!android/build",
30
+ "!android/gradle",
31
+ "!android/gradlew",
32
+ "!android/gradlew.bat",
33
+ "!android/local.properties",
34
+ "!android/src/test",
35
+ "!android/tests",
36
+ "!android/scripts",
37
+ "!**/__tests__",
38
+ "!**/__fixtures__",
39
+ "!**/__mocks__",
40
+ "!**/.*",
41
+ "scripts/apply-skia-canvas-patch.mjs",
42
+ "scripts/skia-canvas-patch.json",
43
+ "patches/react-native-skia+3.7.0.patch",
44
+ "docs/UPSTREAM_NOTES.md",
45
+ "!ios/tests",
46
+ "!android/src/androidTest",
47
+ "!cpp/tests",
48
+ "docs",
49
+ "examples"
50
+ ],
51
+ "scripts": {
52
+ "test": "jest --runInBand",
53
+ "typecheck": "tsc --noEmit",
54
+ "build": "bob build",
55
+ "check-package": "publint --strict --pack npm",
56
+ "test:native": "node scripts/test-native.mjs",
57
+ "prebuild": "node scripts/apply-skia-canvas-patch.mjs",
58
+ "benchmark:test": "node --test test/comparison/*.test.mjs",
59
+ "benchmark:compare": "node scripts/benchmark-compare.mjs",
60
+ "benchmark:inventory": "node scripts/benchmark-inventory.mjs",
61
+ "benchmark:fixtures": "node scripts/benchmark-fixture-manifest.mjs",
62
+ "test:package": "node --test test/package/*.test.mjs",
63
+ "release": "node scripts/release.mjs"
64
+ },
65
+ "keywords": [
66
+ "react-native",
67
+ "ios",
68
+ "android",
69
+ "skia",
70
+ "video",
71
+ "react-native-skia",
72
+ "video-composition"
73
+ ],
74
+ "repository": {
75
+ "type": "git",
76
+ "url": "git+https://github.com/batical/react-native-skia-webgpu-video.git"
77
+ },
78
+ "author": "Sebastien Hecart (https://github.com/batical)",
79
+ "license": "MIT",
80
+ "bugs": {
81
+ "url": "https://github.com/batical/react-native-skia-webgpu-video/issues"
82
+ },
83
+ "homepage": "https://github.com/batical/react-native-skia-webgpu-video#readme",
84
+ "devDependencies": {
85
+ "@babel/core": "^7.29.7",
86
+ "@react-native-community/cli": "^20.2.0",
87
+ "@react-native-community/cli-platform-ios": "^20.2.0",
88
+ "@react-native/babel-preset": "0.86.2",
89
+ "@react-native/jest-preset": "0.86.2",
90
+ "@react-native/metro-config": "^0.86.2",
91
+ "@types/jest": "^29.5.14",
92
+ "@types/node": "^22.19.11",
93
+ "@types/react": "^19.2.18",
94
+ "@types/react-test-renderer": "^19",
95
+ "jest": "^29.7.0",
96
+ "prettier": "^3.9.6",
97
+ "publint": "^0.3.22",
98
+ "react": "19.2.3",
99
+ "react-native": "0.86.2",
100
+ "react-native-builder-bob": "^0.43.0",
101
+ "react-native-reanimated": "4.5.3",
102
+ "react-native-skia": "3.7.0",
103
+ "react-native-webgpu": "0.17.0",
104
+ "react-native-worklets": "0.11.3",
105
+ "react-test-renderer": "19.2.3",
106
+ "typescript": "^6.0.3"
107
+ },
108
+ "peerDependencies": {
109
+ "react": ">=19",
110
+ "react-native": ">=0.83 <0.87",
111
+ "react-native-reanimated": "4.5.3",
112
+ "react-native-skia": "3.7.0",
113
+ "react-native-webgpu": "0.17.0",
114
+ "react-native-worklets": "0.11.3"
115
+ },
116
+ "jest": {
117
+ "preset": "@react-native/jest-preset",
118
+ "modulePathIgnorePatterns": [
119
+ "<rootDir>/lib/",
120
+ "<rootDir>/benchmark/"
121
+ ]
122
+ },
123
+ "react-native-builder-bob": {
124
+ "source": "src",
125
+ "output": "lib",
126
+ "targets": [
127
+ [
128
+ "module",
129
+ {
130
+ "esm": true
131
+ }
132
+ ],
133
+ [
134
+ "typescript",
135
+ {
136
+ "project": "tsconfig.build.json"
137
+ }
138
+ ]
139
+ ]
140
+ },
141
+ "codegenConfig": {
142
+ "name": "RNReactNativeSkiaVideoSpec",
143
+ "type": "modules",
144
+ "jsSrcsDir": "src"
145
+ },
146
+ "react-native": "./src/index.tsx",
147
+ "bin": {
148
+ "skia-video-patch-canvas": "scripts/apply-skia-canvas-patch.mjs"
149
+ },
150
+ "dependencies": {
151
+ "@webgpu/types": "^0.1.65"
152
+ },
153
+ "type": "commonjs",
154
+ "contributors": [
155
+ "Azzapp <contact@azzapp.com> (https://www.azzapp.com)"
156
+ ]
157
+ }