Fix api docs

This commit is contained in:
Jerome Wu 2023-07-26 22:24:38 +08:00
parent ef6c5d2156
commit 096f5b2358
6 changed files with 103 additions and 82 deletions

View File

@ -1,3 +1,4 @@
import MuiThemeProvider from "@site/src/components/common/MuiThemeProvider";
import Table from '@mui/material/Table';
import TableBody from '@mui/material/TableBody';
import TableCell from '@mui/material/TableCell';
@ -11,6 +12,7 @@ import Paper from '@mui/material/Paper';
As 0.12+ is not backward compatible with 0.11.x, below is a quick mapping
table to transform 0.11.x to 0.12+
<MuiThemeProvider>
<TableContainer>
<Table sx={{ minWidth: 650 }} aria-label="simple table">
<TableHead>
@ -46,3 +48,4 @@ table to transform 0.11.x to 0.12+
</TableBody>
</Table>
</TableContainer>
</MuiThemeProvider>

View File

@ -1,3 +1,4 @@
import MuiThemeProvider from "@site/src/components/common/MuiThemeProvider";
import Table from '@mui/material/Table';
import TableBody from '@mui/material/TableBody';
import TableCell from '@mui/material/TableCell';
@ -49,6 +50,7 @@ be spawned by `ffmpeg-core` inside `ffmpeg.worker`
ffmpeg.wasm is built with toolchains / libraries:
<MuiThemeProvider>
<TableContainer>
<Table sx={{ minWidth: 650 }} aria-label="simple table">
<TableHead>
@ -83,10 +85,11 @@ ffmpeg.wasm is built with toolchains / libraries:
<TableCell component="th" scope="row">
{row.name}
</TableCell>
<TableCell align="center">{row.version}</TableCell>
<TableCell align="center">{row.note}</TableCell>
<TableCell align="left">{row.version}</TableCell>
<TableCell align="left">{row.note}</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>
</MuiThemeProvider>

View File

@ -135,10 +135,27 @@ const config = {
[
"docusaurus-plugin-typedoc",
{
id: "ffmpeg",
entryPoints: ["../../packages/ffmpeg/src/index.ts"],
tsconfig: "../../packages/ffmpeg/tsconfig.json",
readme: "none",
out: "api/ffmpeg",
sidebar: {
indexLabel: "@ffmpeg/ffmpeg",
fullNames: true,
},
},
],
[
"docusaurus-plugin-typedoc",
{
id: "util",
entryPoints: ["../../packages/util/src/index.ts"],
tsconfig: "../../packages/util/tsconfig.json",
readme: "none",
out: "api/util",
sidebar: {
indexLabel: "@ffmpeg/util",
fullNames: true,
},
},

View File

@ -29,7 +29,7 @@ const sidebars = {
{
type: "category",
label: "API",
items: ["api/classes/FFmpeg"],
items: ["api/ffmpeg/index", "api/util/index"],
},
{
type: "category",

View File

@ -109,9 +109,6 @@ export class FFmpeg {
* })
* ```
*
* @remarks
* log includes output to stdout and stderr.
*
* @example
* ```ts
* ffmpeg.on("progress", ({ progress, time }) => {
@ -120,7 +117,8 @@ export class FFmpeg {
* ```
*
* @remarks
* The progress events are accurate only when the length of
* - log includes output to stdout and stderr.
* - The progress events are accurate only when the length of
* input and output video/audio file are the same.
*
* @category FFmpeg

View File

@ -5,7 +5,7 @@ import {
import { HeaderContentLength } from "./const.js";
import { ProgressCallback } from "./types.js";
export const readFromBlobOrFile = (blob: Blob | File): Promise<Uint8Array> =>
const readFromBlobOrFile = (blob: Blob | File): Promise<Uint8Array> =>
new Promise((resolve, reject) => {
const fileReader = new FileReader();
fileReader.onload = () => {