Defined in: frame-hold.ts:20
Keeps frames in order until release, then passes them, and every later one, straight on.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Frame |
Properties
Section titled “Properties”isReleased
Section titled “isReleased”readonly isReleased: boolean;Defined in: frame-hold.ts:34
Whether release was called.
readonly stats: Readonly<FrameHoldStats>;Defined in: frame-hold.ts:36
Counters.
Methods
Section titled “Methods”clear()
Section titled “clear()”clear(): void;Defined in: frame-hold.ts:32
Drop every kept frame; later frames are kept again until release. Does nothing once released.
Returns
Section titled “Returns”void
push()
Section titled “push()”push(frame): void;Defined in: frame-hold.ts:22
Keep a frame, or pass it on once released. A frame reader’s onFrame can be this method.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
frame |
Frame |
Returns
Section titled “Returns”void
release()
Section titled “release()”release(consumer): void;Defined in: frame-hold.ts:30
Pass every kept frame to consumer, oldest first, then every later frame as it comes. Once only. A frame pushed
from inside consumer while the kept ones are passed on waits its turn behind them. A kept frame the consumer
throws on does not stop the rest: each is passed on, and the first error is thrown after the last (as a frame
reader’s onFrame failing for one frame does not lose the next). After release, push throws what the consumer
throws.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
consumer |
(frame) => void |
Returns
Section titled “Returns”void