Clarify docs

This commit is contained in:
Vanilagy
2025-09-18 10:11:27 +02:00
parent 407dd05953
commit f340e19baa
2 changed files with 6 additions and 4 deletions
+2
View File
@@ -123,6 +123,8 @@ output.setMetadataTags({
});
```
If you add metadata tags, you must call this method *before* starting the `Output`.
For more info on which tags you can write, see [`MetadataTags`](../api/MetadataTags).
## Starting an output
+4 -4
View File
@@ -197,7 +197,7 @@ export class Output<
this._muxer = options.format._createMuxer(this);
}
/** Adds a video track to the output with the given source. Must be called before output is started. */
/** Adds a video track to the output with the given source. Can only be called before the output is started. */
addVideoTrack(source: VideoSource, metadata: VideoTrackMetadata = {}) {
if (!(source instanceof VideoSource)) {
throw new TypeError('source must be a VideoSource.');
@@ -221,7 +221,7 @@ export class Output<
this._addTrack('video', source, metadata);
}
/** Adds an audio track to the output with the given source. Must be called before output is started. */
/** Adds an audio track to the output with the given source. Can only be called before the output is started. */
addAudioTrack(source: AudioSource, metadata: AudioTrackMetadata = {}) {
if (!(source instanceof AudioSource)) {
throw new TypeError('source must be an AudioSource.');
@@ -231,7 +231,7 @@ export class Output<
this._addTrack('audio', source, metadata);
}
/** Adds a subtitle track to the output with the given source. Must be called before output is started. */
/** Adds a subtitle track to the output with the given source. Can only be called before the output is started. */
addSubtitleTrack(source: SubtitleSource, metadata: SubtitleTrackMetadata = {}) {
if (!(source instanceof SubtitleSource)) {
throw new TypeError('source must be a SubtitleSource.');
@@ -245,7 +245,7 @@ export class Output<
* Sets descriptive metadata tags about the media file, such as title, author, date, or cover art. When called
* multiple times, only the metadata from the last call will be used.
*
* Must be called before output is started.
* Can only be called before the output is started.
*/
setMetadataTags(tags: MetadataTags) {
validateMetadataTags(tags);