#1294·webamp

requestAnimationFrame() ticks faster than intended on displays with above 60hz

Author: 0x5066Created Jan 12, 2025Updated Jan 12, 2025

The visualizer depends on requestAnimationFrame() which does not allow to specify a set tickrate to avoid potentially running too fast than is really intended.

https://stackoverflow.com/questions/19764018/controlling-fps-with-requestanimationframe

The answer provides a way to control this and should not exceed the maximum framerate the device is able to produce (such as when in low power mode)