Skip to content

Commit 485fe15

Browse files
authored
Replace ESDocs generated api-docs with api-documenter markdown (video-dev#5163)
1 parent 6f6fa2e commit 485fe15

33 files changed

+30111
-20555
lines changed

.esdoc.json

-18
This file was deleted.

.github/workflows/build.yml

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88

99
permissions: {}
1010

11+
defaults:
12+
run:
13+
shell: bash
14+
1115
jobs:
1216
config:
1317
runs-on: ubuntu-latest
@@ -99,6 +103,8 @@ jobs:
99103
run: |
100104
npm run build:ci
101105
npm run docs
106+
./scripts/check-docs-built.sh
107+
102108
# check that hls.js doesn't error if requiring in node
103109
# see https://github.com/video-dev/hls.js/pull/1642
104110
node -e 'require("./" + require("./package.json").main)'

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ coverage/
2121
/dist.zip
2222
/netlify
2323
/api-docs
24+
/api-docs-markdown
2425

2526
# eslint
2627
.eslintcache

api-extractor.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"reportTempFolder": "<projectFolder>/api-extractor/report-temp"
1212
},
1313
"docModel": {
14-
"enabled": false
14+
"enabled": true,
15+
"apiJsonFilePath": "<projectFolder>/api-extractor/<unscopedPackageName>.api.json"
1516
},
1617
"dtsRollup": {
1718
"enabled": true,

api-extractor/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
/report-temp
2+
hls.js.api.json
3+
api-documenter

api-extractor/report/hls.js.api.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ export interface ErrorData {
427427

428428
// Warning: (ae-missing-release-tag) "ErrorDetails" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
429429
//
430-
// @public
430+
// @public (undocumented)
431431
export enum ErrorDetails {
432432
// (undocumented)
433433
AUDIO_TRACK_LOAD_ERROR = "audioTrackLoadError",
@@ -515,7 +515,7 @@ export enum ErrorDetails {
515515

516516
// Warning: (ae-missing-release-tag) "ErrorTypes" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
517517
//
518-
// @public
518+
// @public (undocumented)
519519
export enum ErrorTypes {
520520
// (undocumented)
521521
KEY_SYSTEM_ERROR = "keySystemError",
@@ -531,7 +531,7 @@ export enum ErrorTypes {
531531

532532
// Warning: (ae-missing-release-tag) "Events" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
533533
//
534-
// @public
534+
// @public (undocumented)
535535
export enum Events {
536536
// (undocumented)
537537
AUDIO_TRACK_LOADED = "hlsAudioTrackLoaded",
@@ -751,7 +751,7 @@ export interface FragLoadingData {
751751

752752
// Warning: (ae-missing-release-tag) "Fragment" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
753753
//
754-
// @public (undocumented)
754+
// @public
755755
export class Fragment extends BaseSegment {
756756
constructor(type: PlaylistLevelType, baseurl: string);
757757
// (undocumented)
@@ -913,8 +913,6 @@ export type HdcpLevel = typeof HdcpLevels[number];
913913
// @public (undocumented)
914914
export const HdcpLevels: readonly ["NONE", "TYPE-0", "TYPE-1", "TYPE-2", null];
915915

916-
// Warning: (ae-missing-release-tag) "Hls" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
917-
//
918916
// @public
919917
class Hls implements HlsEventEmitter {
920918
constructor(userConfig?: Partial<HlsConfig>);
@@ -931,7 +929,6 @@ class Hls implements HlsEventEmitter {
931929
get capLevelToPlayerSize(): boolean;
932930
// Warning: (ae-setter-with-docs) The doc comment for the property "capLevelToPlayerSize" must appear on the getter, not the setter.
933931
set capLevelToPlayerSize(shouldStartCapping: boolean);
934-
// (undocumented)
935932
readonly config: HlsConfig;
936933
// (undocumented)
937934
createController(ControllerClass: any, components: any): any;
@@ -946,15 +943,19 @@ class Hls implements HlsEventEmitter {
946943
get drift(): number | null;
947944
// (undocumented)
948945
emit<E extends keyof HlsListeners>(event: E, name: E, eventObject: Parameters<HlsListeners[E]>[1]): boolean;
946+
// (undocumented)
949947
static get ErrorDetails(): typeof ErrorDetails;
948+
// (undocumented)
950949
static get ErrorTypes(): typeof ErrorTypes;
950+
// (undocumented)
951951
static get Events(): typeof Events;
952952
get firstLevel(): number;
953953
// Warning: (ae-setter-with-docs) The doc comment for the property "firstLevel" must appear on the getter, not the setter.
954954
set firstLevel(newLevel: number);
955955
get forceStartLoad(): boolean;
956956
static isSupported(): boolean;
957957
get latency(): number;
958+
// (undocumented)
958959
get levels(): Level[];
959960
// (undocumented)
960961
listenerCount<E extends keyof HlsListeners>(event: E): number;
@@ -1017,7 +1018,6 @@ class Hls implements HlsEventEmitter {
10171018
// (undocumented)
10181019
trigger<E extends keyof HlsListeners>(event: E, eventObject: Parameters<HlsListeners[E]>[1]): boolean;
10191020
get ttfbEstimate(): number;
1020-
// (undocumented)
10211021
readonly userConfig: Partial<HlsConfig>;
10221022
static get version(): string;
10231023
}
@@ -1085,7 +1085,7 @@ export interface HlsEventEmitter {
10851085

10861086
// Warning: (ae-missing-release-tag) "HlsListeners" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
10871087
//
1088-
// @public (undocumented)
1088+
// @public
10891089
export interface HlsListeners {
10901090
// (undocumented)
10911091
[Events.AUDIO_TRACK_LOADED]: (event: Events.AUDIO_TRACK_LOADED, data: AudioTrackLoadedData) => void;
@@ -1429,7 +1429,7 @@ export type LevelControllerConfig = {
14291429

14301430
// Warning: (ae-missing-release-tag) "LevelDetails" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
14311431
//
1432-
// @public (undocumented)
1432+
// @public
14331433
export class LevelDetails {
14341434
constructor(baseUrl: any);
14351435
// (undocumented)
@@ -2049,7 +2049,7 @@ export interface NonNativeTextTracksData {
20492049

20502050
// Warning: (ae-missing-release-tag) "Part" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
20512051
//
2052-
// @public (undocumented)
2052+
// @public
20532053
export class Part extends BaseSegment {
20542054
constructor(partAttrs: AttrList, frag: Fragment, baseurl: string, index: number, previous?: Part);
20552055
// (undocumented)

docs/API.md

+30-24
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# HLS.js v1 API
22

3+
See [API Reference](https://hls-js-dev.netlify.app/api-docs/) for a complete list of interfaces available in the hls.js package.
4+
35
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
46
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
57

@@ -19,7 +21,7 @@
1921
- [`Hls.DefaultConfig get/set`](#hlsdefaultconfig-getset)
2022
- [`capLevelToPlayerSize`](#capleveltoplayersize)
2123
- [`capLevelOnFPSDrop`](#caplevelonfpsdrop)
22-
- [`ignoreDevicePixelRatio`](#ignoreDevicePixelRatio)
24+
- [`ignoreDevicePixelRatio`](#ignoredevicepixelratio)
2325
- [`debug`](#debug)
2426
- [`autoStartLoad`](#autostartload)
2527
- [`startPosition`](#startposition)
@@ -31,7 +33,7 @@
3133
- [`maxBufferHole`](#maxbufferhole)
3234
- [`maxStarvationDelay`](#maxstarvationdelay)
3335
- [`maxLoadingDelay`](#maxloadingdelay)
34-
- [`lowBufferWatchdogPeriod`](#lowbufferwatchdogperiod) (deprecated)
36+
- [`lowBufferWatchdogPeriod` (deprecated)](#lowbufferwatchdogperiod-deprecated)
3537
- [`highBufferWatchdogPeriod`](#highbufferwatchdogperiod)
3638
- [`nudgeOffset`](#nudgeoffset)
3739
- [`nudgeMaxRetry`](#nudgemaxretry)
@@ -41,9 +43,9 @@
4143
- [`liveMaxLatencyDurationCount`](#livemaxlatencydurationcount)
4244
- [`liveSyncDuration`](#livesyncduration)
4345
- [`liveMaxLatencyDuration`](#livemaxlatencyduration)
44-
- [`maxLiveSyncPlaybackRate`](#maxLiveSyncPlaybackRate)
46+
- [`maxLiveSyncPlaybackRate`](#maxlivesyncplaybackrate)
4547
- [`liveDurationInfinity`](#livedurationinfinity)
46-
- [`liveBackBufferLength`](#livebackbufferlength) (deprecated)
48+
- [`liveBackBufferLength` (deprecated)](#livebackbufferlength-deprecated)
4749
- [`enableWorker`](#enableworker)
4850
- [`enableSoftwareAES`](#enablesoftwareaes)
4951
- [`startLevel`](#startlevel)
@@ -52,19 +54,21 @@
5254
- [`fragLoadingMaxRetryTimeout` / `manifestLoadingMaxRetryTimeout` / `levelLoadingMaxRetryTimeout`](#fragloadingmaxretrytimeout--manifestloadingmaxretrytimeout--levelloadingmaxretrytimeout)
5355
- [`fragLoadingRetryDelay` / `manifestLoadingRetryDelay` / `levelLoadingRetryDelay`](#fragloadingretrydelay--manifestloadingretrydelay--levelloadingretrydelay)
5456
- [`startFragPrefetch`](#startfragprefetch)
55-
- [`testBandwidth`](#testBandwidth)
56-
- [`fpsDroppedMonitoringPeriod`](#fpsDroppedMonitoringPeriod)
57-
- [`fpsDroppedMonitoringThreshold`](#fpsDroppedMonitoringThreshold)
57+
- [`testBandwidth`](#testbandwidth)
58+
- [`progressive`](#progressive)
59+
- [`lowLatencyMode`](#lowlatencymode)
60+
- [`fpsDroppedMonitoringPeriod`](#fpsdroppedmonitoringperiod)
61+
- [`fpsDroppedMonitoringThreshold`](#fpsdroppedmonitoringthreshold)
5862
- [`appendErrorMaxRetry`](#appenderrormaxretry)
5963
- [`loader`](#loader)
6064
- [`fLoader`](#floader)
6165
- [`pLoader`](#ploader)
6266
- [`xhrSetup`](#xhrsetup)
6367
- [`fetchSetup`](#fetchsetup)
6468
- [`abrController`](#abrcontroller)
65-
- [`bufferController`](#bufferController)
66-
- [`capLevelController`](#capLevelController)
67-
- [`fpsController`](#fpsController)
69+
- [`bufferController`](#buffercontroller)
70+
- [`capLevelController`](#caplevelcontroller)
71+
- [`fpsController`](#fpscontroller)
6872
- [`timelineController`](#timelinecontroller)
6973
- [`enableDateRangeMetadataCues`](#enabledaterangemetadatacues)
7074
- [`enableEmsgMetadataCues`](#enableemsgmetadatacues)
@@ -76,11 +80,11 @@
7680
- [`captionsTextTrack1LanguageCode`](#captionstexttrack1languagecode)
7781
- [`captionsTextTrack2Label`](#captionstexttrack2label)
7882
- [`captionsTextTrack2LanguageCode`](#captionstexttrack2languagecode)
79-
- [`captionsTextTrack3Label`](#captionsTextTrack3Label)
80-
- [`captionsTextTrack3LanguageCode`](#captionsTextTrack3LanguageCode)
81-
- [`captionsTextTrack4Label`](#captionsTextTrack4Label)
82-
- [`captionsTextTrack4LanguageCode`](#captionsTextTrack4LanguageCode)
83-
- [`renderTextTracksNatively`](#renderTextTracksNatively)
83+
- [`captionsTextTrack3Label`](#captionstexttrack3label)
84+
- [`captionsTextTrack3LanguageCode`](#captionstexttrack3languagecode)
85+
- [`captionsTextTrack4Label`](#captionstexttrack4label)
86+
- [`captionsTextTrack4LanguageCode`](#captionstexttrack4languagecode)
87+
- [`renderTextTracksNatively`](#rendertexttracksnatively)
8488
- [`stretchShortVideoTrack`](#stretchshortvideotrack)
8589
- [`maxAudioFramesDrift`](#maxaudioframesdrift)
8690
- [`forceKeyFrameOnDiscontinuity`](#forcekeyframeondiscontinuity)
@@ -93,13 +97,14 @@
9397
- [`abrBandWidthUpFactor`](#abrbandwidthupfactor)
9498
- [`abrMaxWithRealBitrate`](#abrmaxwithrealbitrate)
9599
- [`minAutoBitrate`](#minautobitrate)
96-
- [`emeEnabled`](#emeEnabled)
97-
- [`widevineLicenseUrl`](#widevineLicenseUrl) (deprecated)
98-
- [`licenseXhrSetup`](#licenseXhrSetup)
99-
- [`licenseResponseCallback`](#licenseResponseCallback)
100-
- [`drmSystems`](#drmSystems)
101-
- [`drmSystemOptions`](#drmSystemOptions)
102-
- [`requestMediaKeySystemAccessFunc`](#requestMediaKeySystemAccessFunc)
100+
- [`emeEnabled`](#emeenabled)
101+
- [`widevineLicenseUrl` (deprecated)](#widevinelicenseurl-deprecated)
102+
- [`licenseXhrSetup`](#licensexhrsetup)
103+
- [`licenseResponseCallback`](#licenseresponsecallback)
104+
- [`drmSystems`](#drmsystems)
105+
- [`drmSystems[KEY-SYSTEM].generateRequest](#drmsystemskey-systemgeneraterequest)
106+
- [`drmSystemOptions`](#drmsystemoptions)
107+
- [`requestMediaKeySystemAccessFunc`](#requestmediakeysystemaccessfunc)
103108
- [`cmcd`](#cmcd)
104109
- [Video Binding/Unbinding API](#video-bindingunbinding-api)
105110
- [`hls.attachMedia(videoElement)`](#hlsattachmediavideoelement)
@@ -118,7 +123,7 @@
118123
- [`hls.maxHdcpLevel`](#hlsmaxhdcplevel)
119124
- [`hls.capLevelToPlayerSize`](#hlscapleveltoplayersize)
120125
- [`hls.bandwidthEstimate`](#hlsbandwidthestimate)
121-
- [`hls.removeLevel(levelIndex, urlId)`](#hlsremoveLevel)
126+
- [`hls.removeLevel(levelIndex, urlId)`](#hlsremovelevellevelindex-urlid)
122127
- [Version Control](#version-control)
123128
- [`Hls.version`](#hlsversion)
124129
- [Network Loading Control API](#network-loading-control-api)
@@ -144,6 +149,7 @@
144149
- [Network Errors](#network-errors)
145150
- [Media Errors](#media-errors)
146151
- [Mux Errors](#mux-errors)
152+
- [EME Key System Errors](#eme-key-system-errors)
147153
- [Other Errors](#other-errors)
148154
- [Objects](#objects)
149155
- [Level](#level)
@@ -633,7 +639,7 @@ Override current Media Source duration to `Infinity` for a live broadcast.
633639
Useful, if you are building a player which relies on native UI capabilities in modern browsers.
634640
If you want to have a native Live UI in environments like iOS Safari, Safari, Android Google Chrome, etc. set this value to `true`.
635641

636-
### `liveBackBufferLength`
642+
### `liveBackBufferLength` (deprecated)
637643

638644
`liveBackBufferLength` has been deprecated. Use `backBufferLength` instead.
639645

docs/design.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
2+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
3+
4+
**Table of Contents**
5+
6+
- [Design principle](#design-principle)
7+
- [Code structure](#code-structure)
8+
- [Error detection and Handling](#error-detection-and-handling)
9+
10+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
11+
112
## Design principle
213

314
design idea is pretty simple :

0 commit comments

Comments
 (0)