One RGBA buffer reused from frame to frame, so a sampled frame allocates only its JPEG. Each encode takes a view of exactly its own size and writes every pixel of it, so nothing of an earlier frame survives into a later one.
A view of exactly byteLength bytes, growing the buffer when a frame is larger than any before.
byteLength
One RGBA buffer reused from frame to frame, so a sampled frame allocates only its JPEG. Each encode takes a view of exactly its own size and writes every pixel of it, so nothing of an earlier frame survives into a later one.