Map one non-negative film-frame boundary onto a destination integer clock, such as audio samples or WebVTT milliseconds.
The boundary of frame f at rate n/d lies at f·d/n seconds, so its tick on a ticksPerSecond clock is f·d·ticksPerSecond / n, rounded once. nearest sends an exact half tick upward, and floor and ceiling are 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 beyond Number.MAX_SAFE_INTEGER each throw an Error.
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.
The boundary's tick on the destination clock.
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.