Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 7 additions & 1 deletion api/textmode.export.js/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: API Reference
api: true
kind: Project
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

# textmode.export.js
Expand Down Expand Up @@ -65,6 +65,12 @@ the [Exporting guide](/docs/exporting).
| [SVGExportOptions](type-aliases/SVGExportOptions.md) | Options for exporting the textmode content to SVG format. |
| [TXTExportOptions](type-aliases/TXTExportOptions.md) | Options for exporting the textmode content to TXT format. |

## Other

| Type Alias | Description |
| ------ | ------ |
| [VideoContentHint](type-aliases/VideoContentHint.md) | Hint for the encoder's content-aware rate control. |

## Overlay

| Name | Description |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Interfaces
api: true
kind: Interface
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
isInterface: true
---

Expand Down
2 changes: 1 addition & 1 deletion api/textmode.export.js/interfaces/ExportOverlayPosition.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Interfaces
api: true
kind: Interface
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
isInterface: true
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Interfaces
api: true
kind: Interface
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
isInterface: true
---

Expand Down
2 changes: 1 addition & 1 deletion api/textmode.export.js/interfaces/LayerExportOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Interfaces
api: true
kind: Interface
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
isInterface: true
---

Expand Down
2 changes: 1 addition & 1 deletion api/textmode.export.js/interfaces/TextmodeExportAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Interfaces
api: true
kind: Interface
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
isInterface: true
---

Expand Down
2 changes: 1 addition & 1 deletion api/textmode.export.js/type-aliases/ExportDefaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / ExportDefaults
Expand Down
2 changes: 1 addition & 1 deletion api/textmode.export.js/type-aliases/ExportDefaultsPatch.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / ExportDefaultsPatch
Expand Down
2 changes: 1 addition & 1 deletion api/textmode.export.js/type-aliases/GIFExportOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / GIFExportOptions
Expand Down
2 changes: 1 addition & 1 deletion api/textmode.export.js/type-aliases/GIFExportProgress.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / GIFExportProgress
Expand Down
2 changes: 1 addition & 1 deletion api/textmode.export.js/type-aliases/GIFOverlayDefaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / GIFOverlayDefaults
Expand Down
2 changes: 1 addition & 1 deletion api/textmode.export.js/type-aliases/ImageExportOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / ImageExportOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / ImageOverlayDefaults
Expand Down
2 changes: 1 addition & 1 deletion api/textmode.export.js/type-aliases/JSONExportColorMode.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / JSONExportColorMode
Expand Down
2 changes: 1 addition & 1 deletion api/textmode.export.js/type-aliases/JSONExportOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / JSONExportOptions
Expand Down
2 changes: 1 addition & 1 deletion api/textmode.export.js/type-aliases/JSONExportTarget.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / JSONExportTarget
Expand Down
2 changes: 1 addition & 1 deletion api/textmode.export.js/type-aliases/JSONOverlayDefaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / JSONOverlayDefaults
Expand Down
2 changes: 1 addition & 1 deletion api/textmode.export.js/type-aliases/SVGExportOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / SVGExportOptions
Expand Down
2 changes: 1 addition & 1 deletion api/textmode.export.js/type-aliases/SVGOverlayDefaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / SVGOverlayDefaults
Expand Down
2 changes: 1 addition & 1 deletion api/textmode.export.js/type-aliases/TXTExportOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / TXTExportOptions
Expand Down
2 changes: 1 addition & 1 deletion api/textmode.export.js/type-aliases/TXTOverlayDefaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / TXTOverlayDefaults
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / TextmodeDocumentJSON
Expand Down
2 changes: 1 addition & 1 deletion api/textmode.export.js/type-aliases/VideoBitrateMode.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / VideoBitrateMode
Expand Down
10 changes: 5 additions & 5 deletions api/textmode.export.js/type-aliases/VideoBitratePreset.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / VideoBitratePreset

# Type Alias: VideoBitratePreset

```ts
type VideoBitratePreset = "low" | "medium" | "high";
type VideoBitratePreset = "low" | "medium" | "high" | "ultra";
```

Subjective bitrate preset used when an exact bits-per-second value is not supplied.

Higher presets produce larger files with more detail. Each preset maps to a fixed bits-per-pixel budget
(bits per pixel per second), so a given preset resolves to the same bitrate regardless of the export
frame rate. For exact control, pass a numeric `bitrate` value in bits per second instead.
Higher presets request higher constant perceptual quality from Mediabunny. The `ultra` preset requests quantizer
zero with a frame-rate-aware bitrate fallback and should be described as near-lossless, never mathematically
lossless. For exact bitrate control, pass a numeric `bitrate` value in bits per second instead.

22 changes: 22 additions & 0 deletions api/textmode.export.js/type-aliases/VideoContentHint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
layout: doc
editLink: false
title: VideoContentHint
description: Hint for the encoder's content-aware rate control.
category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / VideoContentHint

# Type Alias: VideoContentHint

```ts
type VideoContentHint = "" | "motion" | "detail" | "text";
```

Hint for the encoder's content-aware rate control.

2 changes: 1 addition & 1 deletion api/textmode.export.js/type-aliases/VideoExportFormat.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / VideoExportFormat
Expand Down
35 changes: 28 additions & 7 deletions api/textmode.export.js/type-aliases/VideoExportOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / VideoExportOptions
Expand All @@ -23,6 +23,17 @@ Options for exporting the textmode content to video format.

## Properties

### allowLargeInMemory?

```ts
optional allowLargeInMemory?: boolean;
```

Allows `toVideoBlob()` to retain its in-memory contract above the safe 100 MB default.


***

### bitrate?

```ts
Expand All @@ -31,10 +42,9 @@ optional bitrate?: number | VideoBitratePreset;

Target bitrate in bits per second or a quality preset. Defaults to `'medium'`.

Bitrate controls how much encoded data is available per second of video. Higher values can preserve more detail
in noisy or fast-changing sketches, but create larger files. Presets resolve to a fixed bits-per-pixel budget
from the export dimensions only, so a given preset targets the same bitrate regardless of the frame rate.
Numeric values are passed directly to the encoder.
String values request constant-quality encoding through Mediabunny. `low`, `medium`, and `high` map to the
upstream `medium`, `high`, and `very-high` quality levels; `ultra` requests quantizer zero and may create very
large files. Numeric values remain exact bits-per-second targets and are wrapped in Mediabunny `Quality`.


***
Expand All @@ -45,12 +55,23 @@ Numeric values are passed directly to the encoder.
optional bitrateMode?: VideoBitrateMode;
```

Encoder bitrate allocation mode. Defaults to `'variable'`.
Bitrate allocation mode for numeric bitrates and quality fallback paths. Defaults to `'variable'`.

Use `'variable'` for most exports so simple frames can compress efficiently and complex frames can receive more
bits. Use `'constant'` only when a steadier data rate is more important than compression efficiency.


***

### contentHint?

```ts
optional contentHint?: VideoContentHint;
```

Content hint passed to the native video encoder. Defaults to `'text'`.


***

### debugLogging?
Expand Down Expand Up @@ -178,7 +199,7 @@ Progress callback invoked throughout the recording lifecycle.
optional pixelDensity?: number;
```

Pixel density used during export. Defaults to `1` so video dimensions match the live canvas.
Pixel density used during export. Defaults to `1` so video dimensions match the logical canvas size.


***
Expand Down
3 changes: 2 additions & 1 deletion api/textmode.export.js/type-aliases/VideoExportPhase.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category: Type Aliases
api: true
kind: TypeAlias
ecosystem: textmode.js
lastModified: 2026-08-17
lastModified: 2026-08-22
---

[textmode.export.js](../index.md) / VideoExportPhase
Expand All @@ -21,6 +21,7 @@ type VideoExportPhase =
| "capturing"
| "encoding"
| "draining"
| "writing"
| "finalizing";
```

Expand Down
Loading