feat ui: optimize canvas recording
This commit is contained in:
parent
5db94fc172
commit
51e66271f6
2 changed files with 2 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ export default class SnapshotManager extends ListWalker<Timestamp> {
|
|||
private snapshots: Snapshots = {}
|
||||
|
||||
public mapToSnapshots(files: TarFile[]) {
|
||||
const filenameRegexp = /(\d+)_1_(\d+)\.jpeg$/;
|
||||
const filenameRegexp = /(\d+)_1_(\d+)\.(jpeg|webp)$/;
|
||||
const firstPair = files[0].name.match(filenameRegexp)
|
||||
const sessionStart = firstPair ? parseInt(firstPair[1], 10) : 0
|
||||
files.forEach(file => {
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ export default class CanvasManager extends ListWalker<Timestamp> {
|
|||
|
||||
public mapToSnapshots(files: TarFile[]) {
|
||||
const tempArr: Timestamp[] = [];
|
||||
const filenameRegexp = /(\d+)_(\d+)_(\d+)\.webp$/;
|
||||
const filenameRegexp = /(\d+)_(\d+)_(\d+)\.(jpeg|webp)$/;
|
||||
const firstPair = files[0].name.match(filenameRegexp);
|
||||
if (!firstPair) {
|
||||
console.error('Invalid file name format', files[0].name);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue