mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 02:43:48 +02:00
Add API doc generator, improve documentation across the board
This commit is contained in:
+52
-45
@@ -3,6 +3,8 @@ import footnote from 'markdown-it-footnote';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import llmstxt from 'vitepress-plugin-llms';
|
||||
import { HeadConfig } from 'vitepress';
|
||||
// @ts-expect-error This file gets generated once docs:generate is run
|
||||
import apiRoutes from '../api/index.json';
|
||||
|
||||
const DESCRIPTION = 'A JavaScript library for reading, writing, and converting media files. Directly in the browser,'
|
||||
+ ' and faster than anybunny else.';
|
||||
@@ -32,56 +34,61 @@ export default withMermaid({
|
||||
// https://vitepress.dev/reference/default-theme-config
|
||||
nav: [
|
||||
{ text: 'Guide', link: '/guide/introduction', activeMatch: '/guide' },
|
||||
{ text: 'API', link: '/api', activeMatch: '/api' },
|
||||
{ text: 'Examples', link: '/examples', activeMatch: '/examples' },
|
||||
{ text: 'Sponsors', link: '/#sponsors', activeMatch: '/#sponsors' },
|
||||
{ text: 'License', link: 'https://github.com/Vanilagy/mediabunny#license' },
|
||||
],
|
||||
|
||||
sidebar: [
|
||||
{
|
||||
text: 'Getting started',
|
||||
items: [
|
||||
{ text: 'Introduction', link: '/guide/introduction' },
|
||||
{ text: 'Installation', link: '/guide/installation' },
|
||||
{ text: 'Quick start', link: '/guide/quick-start' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Reading',
|
||||
items: [
|
||||
{ text: 'Reading media files', link: '/guide/reading-media-files' },
|
||||
{ text: 'Media sinks', link: '/guide/media-sinks' },
|
||||
{ text: 'Input formats', link: '/guide/input-formats' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Writing',
|
||||
items: [
|
||||
{ text: 'Writing media files', link: '/guide/writing-media-files' },
|
||||
{ text: 'Media sources', link: '/guide/media-sources' },
|
||||
{ text: 'Output formats', link: '/guide/output-formats' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Conversion',
|
||||
items: [
|
||||
{ text: 'Converting media files', link: '/guide/converting-media-files' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Miscellaneous',
|
||||
items: [
|
||||
{ text: 'Packets & samples', link: '/guide/packets-and-samples' },
|
||||
{ text: 'Supported formats & codecs', link: '/guide/supported-formats-and-codecs' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Extensions',
|
||||
items: [
|
||||
{ text: 'mp3-encoder', link: '/guide/extensions/mp3-encoder' },
|
||||
],
|
||||
},
|
||||
],
|
||||
sidebar: {
|
||||
'/guide': [
|
||||
{
|
||||
text: 'Getting started',
|
||||
items: [
|
||||
{ text: 'Introduction', link: '/guide/introduction' },
|
||||
{ text: 'Installation', link: '/guide/installation' },
|
||||
{ text: 'Quick start', link: '/guide/quick-start' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Reading',
|
||||
items: [
|
||||
{ text: 'Reading media files', link: '/guide/reading-media-files' },
|
||||
{ text: 'Media sinks', link: '/guide/media-sinks' },
|
||||
{ text: 'Input formats', link: '/guide/input-formats' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Writing',
|
||||
items: [
|
||||
{ text: 'Writing media files', link: '/guide/writing-media-files' },
|
||||
{ text: 'Media sources', link: '/guide/media-sources' },
|
||||
{ text: 'Output formats', link: '/guide/output-formats' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Conversion',
|
||||
items: [
|
||||
{ text: 'Converting media files', link: '/guide/converting-media-files' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Miscellaneous',
|
||||
items: [
|
||||
{ text: 'Packets & samples', link: '/guide/packets-and-samples' },
|
||||
{ text: 'Supported formats & codecs', link: '/guide/supported-formats-and-codecs' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Extensions',
|
||||
items: [
|
||||
{ text: 'mp3-encoder', link: '/guide/extensions/mp3-encoder' },
|
||||
],
|
||||
},
|
||||
],
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
'/api': apiRoutes,
|
||||
},
|
||||
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/Vanilagy/mediabunny' },
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"heading": "Mediabunny API reference",
|
||||
"intro": "Here you can find detailed documentation for all classes, functions, constants and types exposed by Mediabunny's public API.",
|
||||
|
||||
"Samples": "Raw, unencoded chunks of media data, such as video frames or sections of audio.",
|
||||
"Packets": "Chunks of encoded media data.",
|
||||
"Input files & tracks": "Read input files and their tracks; demuxer API.",
|
||||
"Input formats": "Container formats that Mediabunny can read.",
|
||||
"Input sources": "The sources that can provide data to an `Input`.",
|
||||
"Output files": "Create and write new media files; muxer API.",
|
||||
"Output formats": "Container formats that Mediabunny can write.",
|
||||
"Output targets": "The targets where `Output` writes data to.",
|
||||
"Media sinks": "Methods for extracting media data from input files.",
|
||||
"Media sources": "Methods for adding media data to output files.",
|
||||
"Conversion": "A simple API for converting and transforming media files.",
|
||||
"Codecs": "Codecs understood by Mediabunny.",
|
||||
"Encoding": "Encoder configuration and encodability checks.",
|
||||
"Custom coders": "API for adding custom encoders and decoders.",
|
||||
"Miscellaneous": "Whatever's left.",
|
||||
|
||||
"@mediabunny/mp3-encoder": "Adds MP3 encoder support to Mediabunny."
|
||||
}
|
||||
@@ -14,6 +14,9 @@ hero:
|
||||
- theme: brand
|
||||
text: Hop in
|
||||
link: /guide/introduction
|
||||
- theme: alt
|
||||
text: API
|
||||
link: /api
|
||||
- theme: alt
|
||||
text: Examples
|
||||
link: /examples
|
||||
|
||||
Reference in New Issue
Block a user