Film boundary index, a nonnegative safe integer. Zero is the clock origin; the end boundary of an interval is valid even though it is not a played frame.
Exact positive rational frames per second. canonicalProductionFrameRate validates safe integer numerator/denominator and reduces the ratio.
Resolution of a boundary between ticks: nearest rounds an exact half upward; floor and ceiling select their mathematical bounds.
Positive safe integer destination ticks per second, such as the audio sample rate or 1000 for milliseconds.
Map one non-negative film-frame boundary onto a destination integer clock, such as audio samples or WebVTT milliseconds.
The boundary of frame
fat raten/dlies atf·d/nseconds, so its tick on aticksPerSecondclock isf·d·ticksPerSecond / n, rounded once.nearestsends an exact half tick upward, andfloorandceilingare the caller's explicit choices. A frame that is not a non-negative safe integer, a clock rate that is not a positive safe integer, an invalid frame rate, and a tick beyondNumber.MAX_SAFE_INTEGEReach throw anError.