From 41e012f1e879eecf6db1ded992d936a4dee7dfed Mon Sep 17 00:00:00 2001 From: Vanilagy <1696106+Vanilagy@users.noreply.github.com> Date: Fri, 16 Jan 2026 17:00:01 +0100 Subject: [PATCH] Fix typecheck, lint and build --- eslint.config.mjs | 1 + package.json | 2 +- src/input-format.ts | 13 +++++++++++++ src/mpeg-ts/mpeg-ts-demuxer.ts | 8 ++++++++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 29fb45a..5704365 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -40,6 +40,7 @@ export default tseslint.config( 'packages/mp3-encoder/build', 'eslint.config.mjs', 'docs/.vitepress/cache', + 'test/public', ] } ); diff --git a/package.json b/package.json index c03709d..daaf2d5 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "test": "npx vitest --run", "test-node": "npm run test node/", "test-browser": "npm run test browser/", - "check": "rm -rf dist/modules && tsc -p src && tsc -p packages/mp3-encoder/src --noEmit && tsc -p tsconfig.vitest.json --noEmit && tsc -p scripts --noEmit && tsc -p tsconfig.vite.json --noEmit", + "check": "rm -rf dist/modules && tsc -p src --stripInternal false && tsc -p packages/mp3-encoder/src --noEmit && tsc -p tsconfig.vitest.json --noEmit && tsc -p scripts --noEmit && tsc -p tsconfig.vite.json --noEmit", "check-docblocks": "tsx scripts/check-docblocks.ts dist/mediabunny.d.ts", "docs:dev": "vitepress dev docs", "docs:build": "npm run build && npm run docs:generate && vitepress build docs && npm run examples:build && cp dist/mediabunny.d.ts dist-docs/", diff --git a/src/input-format.ts b/src/input-format.ts index 3598df1..b4d0f3e 100644 --- a/src/input-format.ts +++ b/src/input-format.ts @@ -479,6 +479,14 @@ export class AdtsInputFormat extends InputFormat { const TS_PACKET_SIZE = 188; +/** + * MPEG Transport Stream (MPEG-TS) file format. + * + * Do not instantiate this class; use the {@link MPEG_TS} singleton instead. + * + * @group Input formats + * @public + */ export class MpegTsInputFormat extends InputFormat { /** @internal */ async _canReadInput(input: Input) { @@ -573,6 +581,11 @@ export const ADTS = /* #__PURE__ */ new AdtsInputFormat(); */ export const FLAC = /* #__PURE__ */ new FlacInputFormat(); +/** + * MPEG-TS input format singleton. + * @group Input formats + * @public + */ export const MPEG_TS = /* #__PURE__ */ new MpegTsInputFormat(); /** diff --git a/src/mpeg-ts/mpeg-ts-demuxer.ts b/src/mpeg-ts/mpeg-ts-demuxer.ts index d54ef02..028b49a 100644 --- a/src/mpeg-ts/mpeg-ts-demuxer.ts +++ b/src/mpeg-ts/mpeg-ts-demuxer.ts @@ -1,3 +1,11 @@ +/*! + * Copyright (c) 2025-present, Vanilagy and contributors + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + import { SAMPLES_PER_AAC_FRAME } from '../adts/adts-demuxer'; import { MAX_FRAME_HEADER_SIZE, readAdtsFrameHeader } from '../adts/adts-reader'; import {