feat: now support make any record starred
This commit is contained in:
@@ -24,18 +24,12 @@ export async function compressPics(hostname: string, startTime: Date, endTime: D
|
||||
}
|
||||
})
|
||||
|
||||
// 有两种情况不进行处理:
|
||||
// 1. 每个记录中有多于一个截图
|
||||
// 2. 时间段内截图有多种分辨率
|
||||
|
||||
const picNames = records.map(record => {
|
||||
return record.screenshots.map(screenshot => screenshot.objectName)
|
||||
}).flat();
|
||||
|
||||
const picBuffers = (await Promise.all(picNames.map(name => getFileByObjectName(name)))).filter(buffer => buffer !== null && buffer !== undefined);
|
||||
|
||||
// 先默认不存在null吧
|
||||
|
||||
const vBuffer = await compressImagesToAv1Video(picBuffers)
|
||||
|
||||
storeFile(vBuffer, 'test.mp4', 'video/mp4', 'other', hostname)
|
||||
@@ -44,4 +38,4 @@ export async function compressPics(hostname: string, startTime: Date, endTime: D
|
||||
|
||||
//DESKTOP-JHHNH9C startTime=1751104800 1751108400
|
||||
|
||||
compressPics('DESKTOP-JHHNH9C', new Date(1751104800000), new Date(1751108400000))
|
||||
/* compressPics('DESKTOP-JHHNH9C', new Date(1751104800000), new Date(1751108400000)) */
|
||||
Reference in New Issue
Block a user