Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
cb7a588
Apply prettier@3.6 formatting
robwalch Jul 8, 2025
e6d30b0
chore(deps): update dependency prettier to v3.6.2
renovate[bot] Jul 8, 2025
6259bed
Merge pull request #7361 from video-dev/renovate/prettier-3.x
hlsjs-ci Jul 8, 2025
4bd1e43
chore(deps): update node.js to v22.17.0
renovate[bot] Jul 8, 2025
91693a1
Merge pull request #7365 from video-dev/renovate/node-22.x
robwalch Jul 8, 2025
85aa67b
chore(config): migrate config renovate.json
renovate[bot] Jul 8, 2025
083a51a
chore(deps): update dependency chromedriver to v138.0.1
renovate[bot] Jul 9, 2025
52cad21
Merge pull request #7387 from video-dev/renovate/chromedriver-138.x
hlsjs-ci Jul 9, 2025
93f78e4
chore(deps): update dependency wrangler to v4.23.0
renovate[bot] Jul 10, 2025
abd8fe1
Merge pull request #7394 from video-dev/renovate/wrangler-4.x
hlsjs-ci Jul 10, 2025
94342c6
chore(deps): update dependency wrangler to v4.24.1
renovate[bot] Jul 10, 2025
fa53117
Merge pull request #7395 from video-dev/renovate/wrangler-4.x
hlsjs-ci Jul 10, 2025
c3e053e
Merge pull request #7386 from video-dev/renovate/migrate-config
robwalch Jul 10, 2025
032531c
Replace deprecated babel plugins and update renovate config with igno…
robwalch Jul 10, 2025
ac64589
Merge pull request #7396 from video-dev/task/package-and-renovate-upd…
robwalch Jul 10, 2025
a705e62
chore(deps): update dependency chromedriver to v138.0.2
renovate[bot] Jul 10, 2025
d876e51
Merge pull request #7397 from video-dev/renovate/chromedriver-138.x
hlsjs-ci Jul 10, 2025
f9a4938
chore(deps): update dependency eslint-plugin-n to v17.21.0
renovate[bot] Jul 10, 2025
c0e5706
Merge pull request #7398 from video-dev/renovate/eslint-plugin-n-17.x
hlsjs-ci Jul 10, 2025
853b3f5
chore(deps): update dependency rollup to v4.44.2
renovate[bot] Jul 11, 2025
ea55b28
Merge pull request #7399 from video-dev/renovate/rollup-4.x
hlsjs-ci Jul 11, 2025
81d30d5
Reset TS video parser with init segment
robwalch Jul 14, 2025
e18f748
chore(deps): update typescript-eslint monorepo to v8.36.0
renovate[bot] Jul 14, 2025
38ba67d
Merge pull request #7404 from video-dev/renovate/typescript-eslint-mo…
hlsjs-ci Jul 14, 2025
85468d2
chore(deps): update typescript-eslint monorepo to v8.37.0
renovate[bot] Jul 14, 2025
4361d74
Merge pull request #7405 from video-dev/renovate/typescript-eslint-mo…
hlsjs-ci Jul 14, 2025
d313067
Fix unnecessary condition in fragment-tracker
robwalch Jul 16, 2025
7f40ca5
chore(deps): update dependency @svta/common-media-library to v0.16.0
renovate[bot] Jul 17, 2025
ddb80e6
Merge pull request #7409 from video-dev/renovate/svta-common-media-li…
hlsjs-ci Jul 17, 2025
47df678
chore(deps): update dependency wrangler to v4.24.3
renovate[bot] Jul 17, 2025
000d73c
Merge pull request #7411 from video-dev/renovate/wrangler-4.x
hlsjs-ci Jul 17, 2025
638c0b9
chore(deps): update dependency wrangler to v4.25.0
renovate[bot] Jul 17, 2025
e0c3439
Merge pull request #7412 from video-dev/renovate/wrangler-4.x
hlsjs-ci Jul 17, 2025
08fc81c
chore(deps): update dependency rollup to v4.45.0
renovate[bot] Jul 19, 2025
aa40d2a
Merge pull request #7416 from video-dev/renovate/rollup-4.x
hlsjs-ci Jul 19, 2025
e061287
chore(deps): update dependency rollup to v4.45.1
renovate[bot] Jul 19, 2025
7983656
Merge pull request #7417 from video-dev/renovate/rollup-4.x
hlsjs-ci Jul 19, 2025
cbe5f89
Ignore offsets related to default_display_window_flag in HEVC-TS demuxer
Jul 19, 2025
99358d8
Merge pull request #7418 from devoldemar/fix_issue_7392
robwalch Jul 19, 2025
67b62e9
chore(deps): update dependency chromedriver to v138.0.3
renovate[bot] Jul 23, 2025
7f98b85
Merge pull request #7423 from video-dev/renovate/chromedriver-138.x
hlsjs-ci Jul 23, 2025
51c4784
chore(deps): update node.js to v22.17.1
renovate[bot] Jul 23, 2025
ff2f417
Merge pull request #7422 from video-dev/renovate/node-22.x
robwalch Jul 23, 2025
e51bc87
chore(deps): update dependency eslint-config-prettier to v10.1.8
renovate[bot] Jul 25, 2025
86096d8
Merge pull request #7428 from video-dev/renovate/eslint-config-pretti…
hlsjs-ci Jul 25, 2025
07ac745
chore(deps): update typescript-eslint monorepo to v8.38.0
renovate[bot] Jul 28, 2025
9176b39
Merge pull request #7434 from video-dev/renovate/typescript-eslint-mo…
hlsjs-ci Jul 28, 2025
a7b7e08
chore(deps): update dependency @svta/common-media-library to v0.17.1
renovate[bot] Jul 29, 2025
3687209
Merge pull request #7435 from video-dev/renovate/svta-common-media-li…
hlsjs-ci Jul 29, 2025
986b3ea
chore(deps): update dependency wrangler to v4.25.1
renovate[bot] Jul 29, 2025
850b103
Merge pull request #7437 from video-dev/renovate/wrangler-4.x
hlsjs-ci Jul 29, 2025
e0e07ab
chore(deps): update dependency wrangler to v4.26.1
renovate[bot] Jul 29, 2025
3db93e6
Merge pull request #7438 from video-dev/renovate/wrangler-4.x
hlsjs-ci Jul 29, 2025
2fb519b
Schedule renovate to run on the 28th day of the month (#7439)
robwalch Jul 29, 2025
8d1053c
Timestamp offset stability fix for muxed audiovideo mp4 (#7436)
robwalch Jul 31, 2025
d46bf0e
Fix FairPlay Streaming "encrypted" event handling regression
robwalch Jul 30, 2025
d5ddaba
Unblock audio appends when video source buffer is at EoS
robwalch Jul 30, 2025
a19f424
Interstitials improvements and fixes (#7425)
robwalch Aug 4, 2025
84e4fbd
Improve `recoverMediaError` documentation in API.md (#7447)
robwalch Aug 4, 2025
a37db2f
Prevent exception when mapping date ranges that referenced dropped PD…
robwalch Aug 7, 2025
3206822
Detect unhandled encryption and fallback or error
robwalch Aug 7, 2025
053c42b
Remove unnecessary conditionals (#7455)
robwalch Aug 7, 2025
d2c81f0
Force schedule update on asset or interstitial error (#7451)
robwalch Aug 7, 2025
59ede99
Disable part loading for subtitle playlists (not supported in subtitl…
robwalch Aug 14, 2025
e3c4f1d
Merge new Date Ranges in Delta Update when last details have none
robwalch Aug 13, 2025
b829dd3
Do not treat HTTP status 0 frag load errors as gaps
robwalch Aug 14, 2025
5ea8f78
Minor improvements to docs (#7459)
anacrolix Aug 14, 2025
b21b6de
Allow base and query URI differences in segment mismatch error check …
robwalch Aug 14, 2025
c64313b
Fix syntax in `recoverMediaError` example in API.md
tmatth Aug 19, 2025
1e3453e
Fix interstitial asset events not firing when attaching primary early…
robwalch Aug 20, 2025
d42ecce
Fix exception when seeking to program end
robwalch Aug 22, 2025
f9a6dbf
Merge pull request #7478 from video-dev/bugfix/interstitials-program-…
robwalch Aug 22, 2025
4ebd6d2
Handle EME key status errors such as "internal-error" and "output-res…
robwalch Aug 22, 2025
b2d7391
Defer segment requests when network connection is lost (#7476)
robwalch Aug 22, 2025
82e4695
Improve functional test logs (#7481)
robwalch Aug 25, 2025
178333c
Add ESLint syntax rules to restrict async syntax, no-floating-promise…
robwalch Aug 25, 2025
6ba7eb6
Merge branch 'master-doris' into patch/v1.6.11-doris
hongfeih-es Aug 26, 2025
f5d3cd1
chore: 1.6.12
hongfeih-es Aug 26, 2025
f75c23e
Revert "fix: support Widevine and Playready Hardware DRM. (#111)"
hongfeih-es Aug 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 37 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
const asyncKeywordConstraintMsg =
'The async keyword adds a `regenerator` dependency in the hls.js ES5 output not allowed in v1 due to bundle size constraints.';
const selfVsWindowGlobalMsg =
'Use `self` instead of `window` to access the global context everywhere (including workers).';
const arrayFindCompatibilityMsg =
'Usage of Array find methods is restricted for compatibility.';
const arrayFindIndexCompatibilityMsg =
'Usage of Array findIndex methods is restricted for compatibility.';

module.exports = {
env: { browser: true, commonjs: true, es6: true },
globals: {
Expand Down Expand Up @@ -27,20 +36,13 @@ module.exports = {
2,
{
name: 'window',
message:
'Use `self` instead of `window` to access the global context everywhere (including workers).',
message: selfVsWindowGlobalMsg,
},
{ name: 'SourceBuffer', message: 'Use `self.SourceBuffer`' },
{ name: 'setTimeout', message: 'Use `self.setTimeout`' },
{ name: 'setInterval', message: 'Use `self.setInterval`' },
],

'no-restricted-properties': [
2,
{ property: 'findIndex' }, // Intended to block usage of Array.prototype.findIndex
{ property: 'find' }, // Intended to block usage of Array.prototype.find
],

'import/first': 1,
'no-var': 1,
'no-empty': 1,
Expand All @@ -67,6 +69,31 @@ module.exports = {
'no-unused-vars': 0,
'no-undef': 0,
'no-use-before-define': 'off',
'no-restricted-syntax': [
'error',
{
selector: 'FunctionDeclaration[async=true]',
message: asyncKeywordConstraintMsg,
},
{
selector: 'ArrowFunctionExpression[async=true]',
message: asyncKeywordConstraintMsg,
},
{
selector: 'MethodDefinition[value.async=true]',
message: asyncKeywordConstraintMsg,
},
{
selector:
'MemberExpression[property.name="find"][object.type="Identifier"]',
message: arrayFindCompatibilityMsg,
},
{
selector:
'MemberExpression[property.name="findIndex"][object.type="Identifier"]',
message: arrayFindIndexCompatibilityMsg,
},
],
'import/order': [
'warn',
{
Expand Down Expand Up @@ -98,6 +125,8 @@ module.exports = {
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-import-type-side-effects': 'error',
'@typescript-eslint/no-restricted-imports': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-misused-promises': 'error',
},
},
],
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.16.0
22.17.1
75 changes: 41 additions & 34 deletions api-extractor/report/hls.js.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export class AudioStreamController extends BaseStreamController implements Netwo
// (undocumented)
protected onHandlerDestroying(): void;
// (undocumented)
onInitPtsFound(event: Events.INIT_PTS_FOUND, { frag, id, initPTS, timescale }: InitPTSFoundData): void;
onInitPtsFound(event: Events.INIT_PTS_FOUND, { frag, id, initPTS, timescale, trackId }: InitPTSFoundData): void;
// (undocumented)
protected onManifestLoading(): void;
// (undocumented)
Expand Down Expand Up @@ -392,6 +392,8 @@ export class BaseStreamController extends TaskLoop implements NetworkComponentAP
// (undocumented)
protected checkLiveUpdate(details: LevelDetails): void;
// (undocumented)
protected checkRetryDate(): void;
// (undocumented)
protected clearTrackerIfNeeded(frag: Fragment): void;
// (undocumented)
protected config: HlsConfig;
Expand Down Expand Up @@ -458,7 +460,7 @@ export class BaseStreamController extends TaskLoop implements NetworkComponentAP
// (undocumented)
get inFlightFrag(): InFlightData;
// (undocumented)
protected initPTS: RationalTimestamp[];
protected initPTS: TimestampOffset[];
// (undocumented)
protected isLoopLoading(frag: Fragment, targetBufferTime: number): boolean;
// (undocumented)
Expand Down Expand Up @@ -528,8 +530,6 @@ export class BaseStreamController extends TaskLoop implements NetworkComponentAP
// (undocumented)
protected resetLoadingState(): void;
// (undocumented)
protected resetStartWhenNotLoaded(level: Level | null): void;
// (undocumented)
protected resetTransmuxer(): void;
// (undocumented)
protected resetWhenMissingContext(chunkMeta: ChunkMetadata | Fragment): void;
Expand Down Expand Up @@ -563,6 +563,8 @@ export class BaseStreamController extends TaskLoop implements NetworkComponentAP
// (undocumented)
protected transmuxer: TransmuxerInterface | null;
// (undocumented)
protected unhandledEncryptionError(initSegment: InitSegmentData, frag: Fragment): boolean;
// (undocumented)
protected unregisterListeners(): void;
// (undocumented)
protected waitForCdnTuneIn(details: LevelDetails): boolean | 0;
Expand All @@ -579,6 +581,8 @@ export interface BaseTrack {
// (undocumented)
container: string;
// (undocumented)
encrypted?: boolean;
// (undocumented)
id: 'audio' | 'main';
// (undocumented)
levelCodec?: string;
Expand Down Expand Up @@ -631,7 +635,7 @@ export interface BufferAppendingData {
// (undocumented)
chunkMeta: ChunkMetadata;
// (undocumented)
data: Uint8Array;
data: Uint8Array<ArrayBuffer>;
// (undocumented)
frag: Fragment;
// (undocumented)
Expand Down Expand Up @@ -1185,8 +1189,8 @@ export type EMEControllerConfig = {
licenseResponseCallback?: (this: Hls, xhr: XMLHttpRequest, url: string, keyContext: MediaKeySessionContext) => ArrayBuffer;
emeEnabled: boolean;
widevineLicenseUrl?: string;
drmSystems: DRMSystemsConfiguration;
drmSystemOptions: DRMSystemOptions;
drmSystems: DRMSystemsConfiguration | undefined;
drmSystemOptions: DRMSystemOptions | undefined;
requestMediaKeySystemAccessFunc: MediaKeyFunc | null;
requireKeySystemAccessOnStart: boolean;
};
Expand All @@ -1200,9 +1204,11 @@ export const enum ErrorActionFlags {
// (undocumented)
MoveAllAlternatesMatchingHost = 1,
// (undocumented)
MoveAllAlternatesMatchingKey = 4,
// (undocumented)
None = 0,
// (undocumented)
SwitchToSDR = 4
SwitchToSDR = 8
}

// Warning: (ae-missing-release-tag) "ErrorController" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Expand Down Expand Up @@ -1235,6 +1241,8 @@ export interface ErrorData {
// (undocumented)
context?: PlaylistLoaderContext;
// (undocumented)
decryptdata?: LevelKey;
// (undocumented)
details: ErrorDetails;
// @deprecated (undocumented)
err?: {
Expand Down Expand Up @@ -1503,8 +1511,6 @@ export enum Events {
// (undocumented)
KEY_LOADING = "hlsKeyLoading",
// (undocumented)
KEY_STATUSES_CHANGED = "hlsKeyStatusesChanged",
// (undocumented)
LEVEL_LOADED = "hlsLevelLoaded",
// (undocumented)
LEVEL_LOADING = "hlsLevelLoading",
Expand Down Expand Up @@ -1809,7 +1815,7 @@ export class Fragment extends BaseSegment {
level: number;
// (undocumented)
levelkeys?: {
[key: string]: LevelKey;
[key: string]: LevelKey | undefined;
};
// (undocumented)
loader: Loader<FragmentLoaderContext> | null;
Expand Down Expand Up @@ -1927,7 +1933,7 @@ export class FragmentTracker implements ComponentAPI {
detectPartialFragments(data: FragBufferedData): void;
// (undocumented)
fragBuffered(frag: MediaFragment, force?: true): void;
getAppendedFrag(position: number, levelType: PlaylistLevelType): Fragment | Part | null;
getAppendedFrag(position: number, levelType: PlaylistLevelType): MediaFragment | Part | null;
getBufferedFrag(position: number, levelType: PlaylistLevelType): MediaFragment | null;
// (undocumented)
getFragAtPos(position: number, levelType: PlaylistLevelType, buffered?: boolean): MediaFragment | null;
Expand Down Expand Up @@ -2190,12 +2196,14 @@ export class HlsAssetPlayer {
// (undocumented)
get duration(): number;
// (undocumented)
readonly hls: Hls;
hls: Hls | null;
// (undocumented)
readonly interstitial: InterstitialEvent;
interstitial: InterstitialEvent;
// (undocumented)
get interstitialId(): InterstitialId;
// (undocumented)
loadSource(): void;
// (undocumented)
get media(): HTMLMediaElement | null;
// (undocumented)
off<E extends keyof HlsListeners, Context = undefined>(event: E, listener: HlsListeners[E], context?: Context): void;
Expand Down Expand Up @@ -2403,8 +2411,6 @@ export interface HlsListeners {
// (undocumented)
[Events.KEY_LOADING]: (event: Events.KEY_LOADING, data: KeyLoadingData) => void;
// (undocumented)
[Events.KEY_STATUSES_CHANGED]: (event: Events.KEY_STATUSES_CHANGED, data: KeyStatusesChangedData) => void;
// (undocumented)
[Events.LEVEL_LOADED]: (event: Events.LEVEL_LOADED, data: LevelLoadedData) => void;
// (undocumented)
[Events.LEVEL_LOADING]: (event: Events.LEVEL_LOADING, data: LevelLoadingData) => void;
Expand Down Expand Up @@ -2588,6 +2594,8 @@ export interface InitPTSFoundData {
initPTS: number;
// (undocumented)
timescale: number;
// (undocumented)
trackId: number;
}

// Warning: (ae-missing-release-tag) "InitSegmentData" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Expand Down Expand Up @@ -2802,6 +2810,8 @@ export interface InterstitialPlayer {
// (undocumented)
assetPlayers: (HlsAssetPlayer | null)[];
// (undocumented)
bufferedEnd: number;
// (undocumented)
currentTime: number;
// (undocumented)
duration: number;
Expand Down Expand Up @@ -2975,8 +2985,8 @@ export interface KeyLoadedData {
// Warning: (ae-missing-release-tag) "KeyLoader" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class KeyLoader implements ComponentAPI {
constructor(config: HlsConfig);
export class KeyLoader extends Logger implements ComponentAPI {
constructor(config: HlsConfig, logger: ILogger);
// (undocumented)
abort(type?: PlaylistLevelType): void;
// (undocumented)
Expand All @@ -2993,10 +3003,6 @@ export class KeyLoader implements ComponentAPI {
// (undocumented)
emeController: EMEController | null;
// (undocumented)
keyUriToKeyInfo: {
[keyuri: string]: KeyLoaderInfo;
};
// (undocumented)
load(frag: Fragment): Promise<KeyLoadedData>;
// (undocumented)
loadClear(loadingFrag: Fragment, encryptedFragments: Fragment[], startFragRequested: boolean): null | Promise<void>;
Expand Down Expand Up @@ -3040,16 +3046,6 @@ export interface KeyLoadingData {
frag: Fragment;
}

// Warning: (ae-missing-release-tag) "KeyStatusesChangedData" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface KeyStatusesChangedData {
// (undocumented)
keyStatuses: MediaKeyStatusMap;
// (undocumented)
keySystem: string;
}

// Warning: (ae-missing-release-tag) "KeySystemFormats" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
Expand Down Expand Up @@ -3248,7 +3244,7 @@ export class LevelDetails {
// (undocumented)
canSkipUntil: number;
// (undocumented)
dateRanges: Record<string, DateRange>;
dateRanges: Record<string, DateRange | undefined>;
// (undocumented)
dateRangeTagCount: number;
// (undocumented)
Expand Down Expand Up @@ -3282,6 +3278,8 @@ export class LevelDetails {
// (undocumented)
get fragmentStart(): number;
// (undocumented)
hasKey(levelKey: LevelKey): boolean;
// (undocumented)
get hasProgramDateTime(): boolean;
// (undocumented)
hasVariableRefs: boolean;
Expand Down Expand Up @@ -4366,6 +4364,8 @@ export interface RemuxedTrack {
// (undocumented)
dropped?: number;
// (undocumented)
encrypted?: boolean;
// (undocumented)
endDTS: number;
// (undocumented)
endPTS: number;
Expand Down Expand Up @@ -4810,6 +4810,13 @@ export enum TimelineOccupancy {
Range = 1
}

// Warning: (ae-missing-release-tag) "TimestampOffset" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type TimestampOffset = RationalTimestamp & {
trackId: number;
};

// Warning: (ae-missing-release-tag) "Track" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
Expand Down Expand Up @@ -4880,7 +4887,7 @@ export class TransmuxerInterface {
// (undocumented)
flush(chunkMeta: ChunkMetadata): void;
// (undocumented)
push(data: ArrayBuffer, initSegmentData: Uint8Array | undefined, audioCodec: string | undefined, videoCodec: string | undefined, frag: MediaFragment, part: Part | null, duration: number, accurateTimeOffset: boolean, chunkMeta: ChunkMetadata, defaultInitPTS?: RationalTimestamp): void;
push(data: ArrayBuffer, initSegmentData: Uint8Array | undefined, audioCodec: string | undefined, videoCodec: string | undefined, frag: MediaFragment, part: Part | null, duration: number, accurateTimeOffset: boolean, chunkMeta: ChunkMetadata, defaultInitPTS?: TimestampOffset): void;
// (undocumented)
reset(): void;
}
Expand Down
6 changes: 3 additions & 3 deletions build-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ const babelTsWithPresetEnvTargets = ({ targets, stripConsole }) =>
],
plugins: [
[
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-class-properties',
{
loose: true,
},
],
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-transform-object-rest-spread',
{
visitor: {
CallExpression: function (espath) {
Expand Down Expand Up @@ -172,7 +172,7 @@ const babelTsWithPresetEnvTargets = ({ targets, stripConsole }) =>
},
},
['@babel/plugin-transform-object-assign'],
['@babel/plugin-proposal-optional-chaining'],
['@babel/plugin-transform-optional-chaining'],

...(stripConsole
? [
Expand Down
Loading
Loading