Switch skyline to GIF and add plugin_skyline_compatibility option (#198)
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
return null
|
||||
|
||||
//Load inputs
|
||||
let {year, frames, quality} = imports.metadata.plugins.skyline.inputs({data, account, q})
|
||||
let {year, frames, quality, compatibility} = imports.metadata.plugins.skyline.inputs({data, account, q})
|
||||
if (Number.isNaN(year)) {
|
||||
year = new Date().getFullYear()
|
||||
console.debug(`metrics/compute/${login}/plugins > skyline > year set to ${year}`)
|
||||
@@ -32,13 +32,13 @@
|
||||
|
||||
//Generate gif
|
||||
console.debug(`metrics/compute/${login}/plugins > skyline > generating frames`)
|
||||
const framed = await imports.record({page, width, height, frames, scale:quality})
|
||||
const animation = compatibility ? await imports.record({page, width, height, frames, scale:quality}) : await imports.gif({page, width, height, frames, quality:Math.max(1, quality*20)})
|
||||
|
||||
//Close puppeteer
|
||||
await browser.close()
|
||||
|
||||
//Results
|
||||
return {frames:framed}
|
||||
return {animation, width, height, compatibility}
|
||||
}
|
||||
//Handle errors
|
||||
catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user