Skip to content

Commit 08cf2ca

Browse files
committed
Preserve the full forward palm motion within the homepage media budget
1 parent ca63935 commit 08cf2ca

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

614 Bytes
Loading
320 KB
Loading

‎tests/hero-media.test.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@ test('the palm loop stays at 24 fps, matches its still, and fits the media budge
2929
path.join(repoRoot, 'public', motion),
3030
).metadata()
3131
const poster = await sharp(path.join(repoRoot, 'public', still)).metadata()
32-
// The excerpt plays at the source rate of 24 fps. WebP stores whole milliseconds.
32+
// The source has 121 frames at 24 fps. WebP stores whole milliseconds.
3333
const delays = Array.from(
34-
{ length: 70 },
34+
{ length: 121 },
3535
(_, i) => Math.round(((i + 1) * 1000) / 24) - Math.round((i * 1000) / 24),
3636
)
3737
assert.deepEqual(animation.delay, delays)
3838
const assetSize = (file: string) =>
3939
fs.statSync(path.join(repoRoot, 'public', file)).size
40+
// The MP4 and its posters transferred 1.91 MB in the mobile baseline.
4041
assert.ok(
41-
assetSize(motion) + assetSize(still) <
42-
assetSize('/images/hero-palm-motion.mp4'),
43-
'both palm images together should be smaller than the original MP4',
42+
assetSize(motion) + assetSize(still) < 1_900_000,
43+
'the combined palm assets should stay under 1.90 MB',
4444
)
4545
assert.equal(animation.loop, 0)
4646
assert.ok(animation.hasAlpha && poster.hasAlpha)

0 commit comments

Comments
 (0)