polotno-node 2.9.14 → 2.9.16
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/index.js +15 -0
- package/package.json +1 -1
- package/video-parallel.js +3 -2
package/index.js
CHANGED
|
@@ -12,16 +12,23 @@ if (isMacOs || isWindows) {
|
|
|
12
12
|
const { createInstance } = require('./instance');
|
|
13
13
|
|
|
14
14
|
const minimal_args = [
|
|
15
|
+
'about:blank',
|
|
16
|
+
'--allow-pre-commit-input',
|
|
15
17
|
'--autoplay-policy=user-gesture-required',
|
|
16
18
|
'--disable-background-networking',
|
|
17
19
|
'--disable-background-timer-throttling',
|
|
18
20
|
'--disable-backgrounding-occluded-windows',
|
|
19
21
|
'--disable-breakpad',
|
|
22
|
+
'--disable-component-extensions-with-background-pages',
|
|
20
23
|
'--disable-client-side-phishing-detection',
|
|
21
24
|
'--disable-component-update',
|
|
22
25
|
'--disable-default-apps',
|
|
23
26
|
'--disable-dev-shm-usage',
|
|
27
|
+
'--no-proxy-server',
|
|
28
|
+
"--proxy-server='direct://'",
|
|
29
|
+
'--proxy-bypass-list=*',
|
|
24
30
|
'--disable-domain-reliability',
|
|
31
|
+
'--disable-features=AudioServiceOutOfProcess,IsolateOrigins,site-per-process,Translate,BackForwardCache,AvoidUnnecessaryBeforeUnloadCheckSync,IntensiveWakeUpThrottling',
|
|
25
32
|
'--disable-extensions',
|
|
26
33
|
'--disable-features=AudioServiceOutOfProcess',
|
|
27
34
|
'--disable-hang-monitor',
|
|
@@ -30,27 +37,35 @@ const minimal_args = [
|
|
|
30
37
|
'--disable-offer-store-unmasked-wallet-cards',
|
|
31
38
|
'--disable-popup-blocking',
|
|
32
39
|
'--disable-print-preview',
|
|
40
|
+
'--disable-site-isolation-trials',
|
|
33
41
|
'--disable-prompt-on-repost',
|
|
34
42
|
'--disable-renderer-backgrounding',
|
|
35
43
|
'--disable-setuid-sandbox',
|
|
36
44
|
'--disable-speech-api',
|
|
37
45
|
'--disable-sync',
|
|
46
|
+
'--force-color-profile=srgb',
|
|
38
47
|
'--hide-scrollbars',
|
|
39
48
|
'--ignore-gpu-blacklist',
|
|
40
49
|
'--metrics-recording-only',
|
|
41
50
|
'--mute-audio',
|
|
42
51
|
'--no-default-browser-check',
|
|
43
52
|
'--no-first-run',
|
|
53
|
+
'--enable-automation',
|
|
44
54
|
'--no-pings',
|
|
45
55
|
'--no-sandbox',
|
|
46
56
|
'--no-zygote',
|
|
47
57
|
'--password-store=basic',
|
|
58
|
+
'--allow-running-insecure-content',
|
|
59
|
+
|
|
48
60
|
// this line breaks the rendering on most of OS
|
|
49
61
|
// it doesn't allow creating of pages
|
|
50
62
|
//'--use-gl=swiftshader',
|
|
51
63
|
'--disable-gpu',
|
|
52
64
|
'--use-mock-keychain',
|
|
65
|
+
'--enable-blink-features=IdleDetection',
|
|
66
|
+
'--intensive-wake-up-throttling-policy=0',
|
|
53
67
|
'--font-render-hinting=none',
|
|
68
|
+
'--ignore-gpu-blocklist',
|
|
54
69
|
'--disable-font-subpixel-positioning',
|
|
55
70
|
'--force-color-profile=generic-rgb',
|
|
56
71
|
'--text-rendering=geometricprecision',
|
package/package.json
CHANGED
package/video-parallel.js
CHANGED
|
@@ -180,6 +180,7 @@ module.exports.jsonToVideo = async function jsonToVideo(inst, json, attrs) {
|
|
|
180
180
|
const url = await store.toDataURL({
|
|
181
181
|
...attrs,
|
|
182
182
|
_skipTimeout: true,
|
|
183
|
+
mimeType: 'image/jpeg',
|
|
183
184
|
pageId: currentPage?.id,
|
|
184
185
|
});
|
|
185
186
|
return url;
|
|
@@ -189,7 +190,7 @@ module.exports.jsonToVideo = async function jsonToVideo(inst, json, attrs) {
|
|
|
189
190
|
currentTime
|
|
190
191
|
);
|
|
191
192
|
fs.writeFileSync(
|
|
192
|
-
`${tempFolder.name}/${frameIndex}.
|
|
193
|
+
`${tempFolder.name}/${frameIndex}.jpeg`,
|
|
193
194
|
dataURL.split(',')[1],
|
|
194
195
|
'base64'
|
|
195
196
|
);
|
|
@@ -234,7 +235,7 @@ module.exports.jsonToVideo = async function jsonToVideo(inst, json, attrs) {
|
|
|
234
235
|
|
|
235
236
|
await new Promise((resolve, reject) => {
|
|
236
237
|
const ffmpegCmd = ffmpeg()
|
|
237
|
-
.input(`${tempFolder.name}/%d.
|
|
238
|
+
.input(`${tempFolder.name}/%d.jpeg`)
|
|
238
239
|
.inputFPS(fps)
|
|
239
240
|
.videoCodec('libx264')
|
|
240
241
|
.outputOptions('-pix_fmt yuv420p');
|