polotno-node 2.6.5 → 2.6.6

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,9 +245,16 @@ const url = await instance.run(async (json) => {
245
245
 
246
246
  **This part is currently under development and API will change.**
247
247
 
248
+ You may need to have ffmpeg available in your system to make it work.
249
+ Also you need to manually dependencies:
250
+
251
+ ```bash
252
+ npm install fluent-ffmpeg axios
253
+ ```
254
+
248
255
  ```js
249
256
  import { createInstance } from 'polotno-node';
250
- import { jsonToVideo } from 'polotno/video';
257
+ import { jsonToVideo } from 'polotno-node/video';
251
258
 
252
259
  // create working instance
253
260
  const instance = await createInstance({
package/instance.js CHANGED
@@ -124,6 +124,10 @@ module.exports.createInstance = async ({
124
124
  const result = await page.evaluate(func, ...args);
125
125
  const error = await page.evaluate(() => window._polotnoError);
126
126
  if (error) {
127
+ // clear error
128
+ await page.evaluate(() => {
129
+ window._polotnoError = null;
130
+ });
127
131
  const message = error.toString();
128
132
  const isFontError = message.indexOf('Timeout for loading font') >= 0;
129
133
  const skipError = isFontError && args[1]?.skipFontError;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polotno-node",
3
- "version": "2.6.5",
3
+ "version": "2.6.6",
4
4
  "description": "Polotno workflow from NodeJS",
5
5
  "main": "index.js",
6
6
  "scripts": {