Skip to content

Function: arrayBufferToUuid() ​

ts
function arrayBufferToUuid(buffer): string;

Defined in: arrayBufferToUuid.ts:14

Converts an ArrayBuffer to a UUID string.

Parameters ​

buffer ​

ArrayBuffer

The ArrayBuffer to convert.

Returns ​

string

The UUID string representation.

Example ​

ts
const data = new Uint8Array([
	160, 86, 74, 247, 96, 194, 217, 75, 150, 16, 199, 174, 112, 213, 217, 112,
])
const result = arrayBufferToUuid(data.buffer)

equal(result, 'a0564af7-60c2-d94b-9610-c7ae70d5d970')

A Streaming Video Technology Alliance project.