Skip to content

Function: fourCcToUint32() ​

ts
function fourCcToUint32(str): number;

Defined in: libs/iso-bmff/src/utils/fourCcToUint32.ts:13

Converts a 4-character string (e.g., FourCC code) to a Uint32 number. Each character's code point is treated as a byte in big-endian order.

Parameters ​

str ​

string

A 4-character FourCC string

Returns ​

number

The uint32 representation of the FourCC code

Example ​

ts
const result = fourCcToUint32('ftyp')

assert.strictEqual(result, 0x66747970)

A Streaming Video Technology Alliance project.