polotno-node 2.9.8 → 2.9.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polotno-node",
3
- "version": "2.9.8",
3
+ "version": "2.9.9",
4
4
  "description": "Polotno workflow from NodeJS",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/video-parallel.js CHANGED
@@ -23,7 +23,6 @@ const downloadVideo = async (url, destination) => {
23
23
  };
24
24
 
25
25
  // 2. Convert it into webm format
26
-
27
26
  const convertToWebM = (input, output) => {
28
27
  return new Promise((resolve, reject) => {
29
28
  ffmpeg(input)
@@ -74,9 +73,7 @@ const cachedVideoToDataURL = async (url) => {
74
73
  };
75
74
 
76
75
  function printProgress(progress) {
77
- process.stdout.clearLine(0);
78
- process.stdout.cursorTo(0);
79
- process.stdout.write('Rendering frame: ' + progress + '%');
76
+ console.log('Rendering frame: ' + progress + '%');
80
77
  }
81
78
 
82
79
  module.exports.jsonToVideo = async function jsonToVideo(
@@ -103,7 +100,7 @@ module.exports.jsonToVideo = async function jsonToVideo(
103
100
  );
104
101
 
105
102
  const duration = json.pages.reduce((acc, page) => {
106
- return acc + page.duration;
103
+ return acc + (page.duration ?? 5000);
107
104
  }, 0);
108
105
  const parallel = attrs.parallel || 5;
109
106