MCPcopy Create free account
hub / github.com/Vanilagy/webcodecs-polyfill / copyTo

Method copyTo

src/encoded_audio_chunk.ts:69–75  ·  view source on GitHub ↗

* Copies the encoded chunk data to a destination buffer.

(destination: AllowSharedBufferSource)

Source from the content-addressed store, hash-verified

67 * Copies the encoded chunk data to a destination buffer.
68 */
69 copyTo(destination: AllowSharedBufferSource) {
70 if (destination.byteLength < this.data.byteLength) {
71 throw new TypeError('Destination buffer is too small.');
72 }
73
74 toUint8Array(destination).set(this.data);
75 }
76}

Callers

nothing calls this directly

Calls 1

toUint8ArrayFunction · 0.85

Tested by

no test coverage detected