# Class: Id3v1

## jala.Mp3.Id3v1(mp3File)

This class represents an Id3v1 tag.

## Constructor

#### new Id3v1(mp3File)

Constructs a new Id3v1 tag from an Mp3 file

##### Parameters:

Name | Type | Description
--- | --- | ---
`mp3File` | jala.Mp3 |

Source:
  - jala/code/Mp3.js, line 705

### Methods

#### copyFrom(src)

Copies standard fields from another tag.

##### Parameters:

Name | Type | Description
--- | --- | ---
`src` | Object | object with getter methods for fields album, artist, comment, title, trackNumber, genre and year.

Source:
  - jala/code/Mp3.js, line 751

#### getAlbum()

Returns the album information of the tag.

Source:
  - jala/code/Mp3.js, line 762

##### Returns:

string containing album name

#### getArtist()

Returns the artist information of the tag.

Source:
  - jala/code/Mp3.js, line 772

##### Returns:

string containing artist name

#### getAudio()

Returns the wrapper for the underlying audio file.

Source:
  - jala/code/Mp3.js, line 717

#### getComment()

Returns the comment information of the tag.

Source:
  - jala/code/Mp3.js, line 782

##### Returns:

string containing comment

#### getGenre()

Returns the genre information of the tag.

Source:
  - jala/code/Mp3.js, line 819

##### Returns:

string containing genre name

#### getJavaObject()

Returns the java representation of the tag, class depends on the actual library used.

Source:
  - jala/code/Mp3.js, line 726

#### getTextContent(id)

This method could be used to retrieve an arbitrary field of the underlying tag. For Id3v1 tags all information is available through getter and setter methods, so this implementation always returns null.

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` | String |

Source:
  - jala/code/Mp3.js, line 843

##### Returns:

null

#### getTitle()

Returns the title information of the tag.

Source:
  - jala/code/Mp3.js, line 792

##### Returns:

string containing title

#### getTrackNumber()

Returns the track number information of the tag.

Source:
  - jala/code/Mp3.js, line 803

##### Returns:

string representing track number or null if tag doesn't contain a track number.

#### getYear()

Returns the year information of the tag.

Source:
  - jala/code/Mp3.js, line 830

##### Returns:

string representing year

#### setAlbum(album)

Sets the album information.

##### Parameters:

Name | Type | Description
--- | --- | ---
`album` | String |

Source:
  - jala/code/Mp3.js, line 852

#### setArtist(artist)

Sets the artist information.

##### Parameters:

Name | Type | Description
--- | --- | ---
`artist` | String |

Source:
  - jala/code/Mp3.js, line 862

#### setComment(comment)

Sets the comment

##### Parameters:

Name | Type | Description
--- | --- | ---
`comment` | String |

Source:
  - jala/code/Mp3.js, line 872

#### setGenre(genre)

Sets the genre information. A list of genre names that are valid for ID3v1 tags is located in jala.Mp3.GENRES.

##### Parameters:

Name | Type | Description
--- | --- | ---
`genre` | String |

Source:
  - jala/code/Mp3.js, line 907

#### setTextContent(id, value)

This method could be used to set an arbitrary field of the underlying tag. For Id3v1 tags all information is available through getter and setter methods, so this implementation does nothing.

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` | String |
`value` | String |

Source:
  - jala/code/Mp3.js, line 932

#### setTitle(title)

Sets the title information

##### Parameters:

Name | Type | Description
--- | --- | ---
`title` | String |

Source:
  - jala/code/Mp3.js, line 882

#### setTrackNumber(trackNumber)

Sets the track number information.

##### Parameters:

Name | Type | Description
--- | --- | ---
`trackNumber` | Number |

Source:
  - jala/code/Mp3.js, line 892

#### setYear(year)

Sets the year information.

##### Parameters:

Name | Type | Description
--- | --- | ---
`year` | Number |

Source:
  - jala/code/Mp3.js, line 918