polotno-node 2.14.12 → 2.15.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.
package/README.md CHANGED
@@ -245,6 +245,22 @@ const url = await instance.jsonToDataURL(json, { pixelRatio: 0.2 });
245
245
  // const url = await store.toDataURL({ pixelRatio: 0.2 });
246
246
  ```
247
247
 
248
+ ### `attrs.skipDownloads` (video export only)
249
+
250
+ By default, when exporting video and **only** when using the default local client (i.e. you did **not** pass `createInstance({ url })`), `polotno-node` will:
251
+
252
+ - Download all **remote** video elements (`type: 'video'`) and `json.audios` sources into a temporary folder
253
+ - Deduplicate downloads (same URL is downloaded once)
254
+ - Rewrite `src` to `file://...` URLs so Chromium loads media from disk
255
+
256
+ If you want to disable this behavior, set:
257
+
258
+ ```js
259
+ const url = await instance.jsonToVideoDataURL(json, {
260
+ skipDownloads: true,
261
+ });
262
+ ```
263
+
248
264
  ### `attrs.assetLoadTimeout`
249
265
 
250
266
  You can add `assetLoadTimeout` attribute to `attrs` object. It will be used to set timeout for loading assets. By default it is 30000ms.