Updating time for video and audio happens in requestAnimationFrame. Why don't in requestIdleCallback?
requestIdleCallback is an experimental API and is not supported in Safari.
requestAnimationFrame is the correct function to use anyway - the data of playback position is typically a part of the UI, and it's both important that it's up to date and unnecessary to update many times per frame.
requestIdleCallbackis an experimental API and is not supported in Safari.requestAnimationFrameis the correct function to use anyway - the data of playback position is typically a part of the UI, and it's both important that it's up to date and unnecessary to update many times per frame.Good points, thanks for explanation!