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 +16 -0
- package/dist/assets/{index-Xal09T7W.js → index-Ca74A7-l.js} +103 -103
- package/dist/assets/index-SXZWmjCL.js +65 -0
- package/dist/assets/{index.es-6B4V2Olh.js → index.es-DsqSHMpS.js} +1 -1
- package/dist/index.html +1 -1
- package/index.d.ts +6 -0
- package/instance.js +321 -86
- package/package.json +1 -1
- package/dist/assets/index-D5GpnOg5.js +0 -65
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.
|