Skip to content

Commit be9ad5e

Browse files
committed
vBumpo and doc generation
1 parent 9b63a2a commit be9ad5e

File tree

3 files changed

+92
-21
lines changed

3 files changed

+92
-21
lines changed

docs/classes/Id3v2FrameFactory.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
[node-taglib-sharp](../README.md) / [Exports](../modules.md) / Id3v2FrameFactory
2+
3+
# Class: Id3v2FrameFactory
4+
5+
Performs the necessary operations to determine and create the correct child classes of
6+
Frame for a given raw ID3v2 frame.
7+
By default, this will only load frames contained in the library. To add additional frames to the
8+
process, register a frame creator with [addFrameCreator](Id3v2FrameFactory.md#addframecreator).
9+
10+
## Table of contents
11+
12+
### Constructors
13+
14+
- [constructor](Id3v2FrameFactory.md#constructor)
15+
16+
### Methods
17+
18+
- [addFrameCreator](Id3v2FrameFactory.md#addframecreator)
19+
- [clearFrameCreators](Id3v2FrameFactory.md#clearframecreators)
20+
- [createFrame](Id3v2FrameFactory.md#createframe)
21+
22+
## Constructors
23+
24+
### constructor
25+
26+
**new Id3v2FrameFactory**()
27+
28+
## Methods
29+
30+
### addFrameCreator
31+
32+
`Static` **addFrameCreator**(`creator`): `void`
33+
34+
Adds a custom frame creator to try before using standard frame creation methods.
35+
Frame creators are used before standard methods so custom checking can be used and new
36+
formats can be added. They are executed in reverse order in which they are added.
37+
38+
#### Parameters
39+
40+
| Name | Type | Description |
41+
| :------ | :------ | :------ |
42+
| `creator` | [`Id3v2FrameCreator`](../modules.md#id3v2framecreator) | Frame creator function * data: ByteVector Raw ID3v2 frame * offset: number Offset in data at which the frame data begins (should be int) * header: Id3v2FrameHeader Header for the frame contained in data * version: number ID3v2 version the raw frame data is stored in (should be byte) * returns Frame if method was able to match the frame, falsy otherwise |
43+
44+
#### Returns
45+
46+
`void`
47+
48+
___
49+
50+
### clearFrameCreators
51+
52+
`Static` **clearFrameCreators**(): `void`
53+
54+
Removes all custom frame creators
55+
56+
#### Returns
57+
58+
`void`
59+
60+
___
61+
62+
### createFrame
63+
64+
`Static` **createFrame**(`data`, `file`, `offset`, `version`, `alreadyUnsynced`): `Object`
65+
66+
Creates a Frame object by reading it from raw ID3v2 frame data.
67+
68+
#### Parameters
69+
70+
| Name | Type | Description |
71+
| :------ | :------ | :------ |
72+
| `data` | [`ByteVector`](ByteVector.md) | Raw ID3v2 frame |
73+
| `file` | [`File`](File.md) | File to read the frame from if `data` is falsy |
74+
| `offset` | `number` | Index into `file` or in `data` if truthy, at which the frame begins. After reading, the offset where the next frame can be read is returned in the `offset` property of the returned object |
75+
| `version` | `number` | ID3v2 version the frame is encoded with. Must be unsigned 8-bit int |
76+
| `alreadyUnsynced` | `boolean` | Whether or not the entire tag has already been unsynchronized |
77+
78+
#### Returns
79+
80+
`Object`
81+
82+
Undefined is returned if there are no more frames to read.
83+
Object is returned if a frame was found. Object has the following properties:
84+
* frame: Frame that was read
85+
* offset: updated offset where the next frame starts
86+
87+
| Name | Type |
88+
| :------ | :------ |
89+
| `frame` | [`Id3v2Frame`](Id3v2Frame.md) |
90+
| `offset` | `number` |

docs/modules.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
- [Id3v2EventTimeCodeFrame](classes/Id3v2EventTimeCodeFrame.md)
7777
- [Id3v2ExtendedHeader](classes/Id3v2ExtendedHeader.md)
7878
- [Id3v2Frame](classes/Id3v2Frame.md)
79+
- [Id3v2FrameFactory](classes/Id3v2FrameFactory.md)
7980
- [Id3v2FrameHeader](classes/Id3v2FrameHeader.md)
8081
- [Id3v2FrameIdentifier](classes/Id3v2FrameIdentifier.md)
8182
- [Id3v2MusicCdIdentifierFrame](classes/Id3v2MusicCdIdentifierFrame.md)
@@ -187,7 +188,6 @@
187188

188189
### Variables
189190

190-
- [Id3v2FrameFactory](modules.md#id3v2framefactory)
191191
- [Id3v2FrameIdentifiers](modules.md#id3v2frameidentifiers)
192192

193193
## References
@@ -312,25 +312,6 @@ Generated [IOggCodec](interfaces/IOggCodec.md) is returned if a codec could be
312312

313313
## Variables
314314

315-
### Id3v2FrameFactory
316-
317-
**Id3v2FrameFactory**: `Object`
318-
319-
Performs the necessary operations to determine and create the correct child classes of
320-
Frame for a given raw ID3v2 frame.
321-
By default, this will only load frames contained in the library. To add additional frames to the
322-
process, register a frame creator with addFrameCreator.
323-
324-
#### Type declaration
325-
326-
| Name | Type |
327-
| :------ | :------ |
328-
| `addFrameCreator` | (`creator`: [`Id3v2FrameCreator`](modules.md#id3v2framecreator)) => `void` |
329-
| `clearFrameCreators` | () => `void` |
330-
| `createFrame` | (`data`: [`ByteVector`](classes/ByteVector.md), `file`: [`File`](classes/File.md), `offset`: `number`, `version`: `number`, `alreadyUnsynced`: `boolean`) => { `frame`: [`Id3v2Frame`](classes/Id3v2Frame.md) ; `offset`: `number` } |
331-
332-
___
333-
334315
### Id3v2FrameIdentifiers
335316

336317
`Const` **Id3v2FrameIdentifiers**: `Object`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "node-taglib-sharp",
33
"description": "Read and write audio/video/picture tags using a similar interface to TagLib#",
4-
"version": "6.0.0",
4+
"version": "6.0.1",
55
"license": "LGPL-2.1-or-later",
66
"author": "Ben Russell <[email protected]> (https://github.com/benrr101)",
77
"repository": "github:benrr101/node-taglib-sharp",

0 commit comments

Comments
 (0)