This repository has been archived on 2026-03-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files

18 lines
573 B
JavaScript

import * as Token from 'token-types';
/**
* Data portion of `CHAP` sub frame
*/
export const ChapterInfo = {
len: 16,
get: (buf, off) => {
const startOffset = Token.UINT32_BE.get(buf, off + 8);
const endOffset = Token.UINT32_BE.get(buf, off + 12);
return {
startTime: Token.UINT32_BE.get(buf, off),
endTime: Token.UINT32_BE.get(buf, off + 4),
startOffset: startOffset === 0xFFFFFFFF ? undefined : startOffset,
endOffset: endOffset === 0xFFFFFFFF ? undefined : endOffset,
};
}
};