chore: add proper documentation (#763)

* chore: generate API ref using `typedoc`

* chore: declutter readme and add links to ytjs.dev

* chore: clean up
This commit is contained in:
Luan
2024-09-23 17:32:50 -03:00
committed by GitHub
parent dd7f5cf778
commit 74659fd03f
853 changed files with 139814 additions and 1929 deletions

View File

@@ -0,0 +1,25 @@
[youtubei.js](../../../README.md) / [FormatUtils](../README.md) / chooseFormat
# Function: chooseFormat()
> **chooseFormat**(`options`, `streaming_data`?): [`Format`](../../Misc/classes/Format.md)
Selects the format that best matches the given options.
## Parameters
**options**: [`FormatOptions`](../../Types/interfaces/FormatOptions.md)
Options
**streaming\_data?**: [`IStreamingData`](../../APIResponseTypes/interfaces/IStreamingData.md)
Streaming data
## Returns
[`Format`](../../Misc/classes/Format.md)
## Defined in
[src/utils/FormatUtils.ts:133](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/FormatUtils.ts#L133)

View File

@@ -0,0 +1,27 @@
[youtubei.js](../../../README.md) / [FormatUtils](../README.md) / download
# Function: download()
> **download**(`options`, `actions`, `playability_status`?, `streaming_data`?, `player`?, `cpn`?): `Promise`\<`ReadableStream`\<`Uint8Array`\>\>
## Parameters
**options**: [`DownloadOptions`](../../Types/interfaces/DownloadOptions.md)
**actions**: [`Actions`](../../../classes/Actions.md)
**playability\_status?**: [`IPlayabilityStatus`](../../APIResponseTypes/interfaces/IPlayabilityStatus.md)
**streaming\_data?**: [`IStreamingData`](../../APIResponseTypes/interfaces/IStreamingData.md)
**player?**: [`Player`](../../../classes/Player.md)
**cpn?**: `string`
## Returns
`Promise`\<`ReadableStream`\<`Uint8Array`\>\>
## Defined in
[src/utils/FormatUtils.ts:10](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/FormatUtils.ts#L10)

View File

@@ -0,0 +1,35 @@
[youtubei.js](../../../README.md) / [FormatUtils](../README.md) / toDash
# Function: toDash()
> **toDash**(`streaming_data`?, `is_post_live_dvr`?, `url_transformer`?, `format_filter`?, `cpn`?, `player`?, `actions`?, `storyboards`?, `caption_tracks`?, `options`?): `Promise`\<`string`\>
## Parameters
**streaming\_data?**: [`IStreamingData`](../../APIResponseTypes/interfaces/IStreamingData.md)
**is\_post\_live\_dvr?**: `boolean` = `false`
**url\_transformer?**: [`URLTransformer`](../../Types/type-aliases/URLTransformer.md) = `...`
**format\_filter?**: [`FormatFilter`](../../Types/type-aliases/FormatFilter.md)
**cpn?**: `string`
**player?**: [`Player`](../../../classes/Player.md)
**actions?**: [`Actions`](../../../classes/Actions.md)
**storyboards?**: [`PlayerLiveStoryboardSpec`](../../YTNodes/classes/PlayerLiveStoryboardSpec.md) \| [`PlayerStoryboardSpec`](../../YTNodes/classes/PlayerStoryboardSpec.md)
**caption\_tracks?**: `CaptionTrackData`[]
**options?**: `StreamingInfoOptions`
## Returns
`Promise`\<`string`\>
## Defined in
[src/utils/DashManifest.tsx:269](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/DashManifest.tsx#L269)