Constructor
new Id3v2(mp3File)
Constructs a new Id3v2 tag from an Mp3 file
Parameters:
Name | Type | Description |
---|---|---|
mp3File |
jala.Mp3 |
- Source:
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:
getAlbum()
Returns the album information of the tag.
- Source:
Returns:
string containing album name
getArtist()
Returns the artist information of the tag.
- Source:
Returns:
string containing artist name
getAudio()
Returns the wrapper for the underlying audio file.
- Source:
getAuthor()
Returns the author information of the tag.
- Source:
Returns:
string containing author information
getComment()
Returns the comment information of the tag.
- Source:
Returns:
string containing comment
getCopyright()
Returns the copyright information of the tag.
- Source:
Returns:
The copyright information of the tag
getGenre()
Returns the genre information of the tag.
- Source:
Returns:
string containing genre name
getImage(pictureType)
Extracts the image from the tag
Parameters:
Name | Type | Description |
---|---|---|
pictureType |
String | number describing picture type (default is 3, describing a front cover). |
- Source:
Returns:
image as mime object
getJavaObject()
returns the java representation of the tag,
class depends on the actual library used.
- Source:
getSubtitle()
Returns the subtitle information of the tag.
- Source:
Returns:
string containing subtitle
getSubtype()
Returns the version number of this id3v2 (values 2 to 4 for id3v2.2 to id3v2.4)
- Source:
Returns:
The version number of this Id3v2 tag
getTextContent(id)
This method can be used to retrieve an arbitrary text frame
of the underlying tag. For the list of valid identifiers
and their meaning see http://www.id3.org/
The identifiers vary across the sub versions of id3v2 tags,
use getSubtype to make sure you use the correct version.
Parameters:
Name | Type | Description |
---|---|---|
id |
String | Frame identifier according to Id3v2 specification or shortcut as defined in jala.Mp3.FIELD_MAPPING. |
- Source:
- See:
Returns:
String contained in the frame
getTextEncoding()
Returns the text encoding used when setting values.
- Source:
Returns:
The text encoding
getTitle()
Returns the title information of the tag.
- Source:
Returns:
string containing title
getTrackNumber()
Returns the track number information of the tag.
- Source:
Returns:
string representing track number
getUrl()
Returns the Url stored in this tag
- Source:
Returns:
The url stored in this tag
getYear()
Returns the year information of the tag.
- Source:
Returns:
string representing year
removeFromAudio()
Removes the tag from the audio file and
nulls out the wrapper.
- Source:
setAlbum(album)
Sets the album information.
Parameters:
Name | Type | Description |
---|---|---|
album |
String |
- Source:
setArtist(artist)
Sets the artist information.
Parameters:
Name | Type | Description |
---|---|---|
artist |
String |
- Source:
setAuthor(author)
Sets the author information in this tag
Parameters:
Name | Type | Description |
---|---|---|
author |
String | The author information to set |
- Source:
setComment(comment)
Sets the comment
Parameters:
Name | Type | Description |
---|---|---|
comment |
String |
- Source:
setCopyright(copyright)
Sets the copyright information in this tag
Parameters:
Name | Type | Description |
---|---|---|
copyright |
String | The copyright information to set |
- Source:
setGenre(genre)
Sets the genre information. A list of genre names that are compatible
with ID3v1 tags is located in jala.Mp3.GENRES.
Parameters:
Name | Type | Description |
---|---|---|
genre |
String |
- Source:
setImage(pictureType, mimeType, byteArray, desc)
adds an image to the file.
Parameters:
Name | Type | Description |
---|---|---|
pictureType |
Number | number determining picture type |
mimeType |
String | mime type of image |
byteArray |
Array | image binary data |
desc |
String | optional description |
- Source:
- See:
setSubtitle(title)
Sets the subtitle information
Parameters:
Name | Type | Description |
---|---|---|
title |
String |
- Source:
setTextContent(id, value)
This method can be used to set an arbitrary field
of the underlying tag. For the list of valid identifiers
and their meaning see http://www.id3.org/
The identifiers vary across the sub versions of id3v2 tags,
use getSubtype to make sure you use the correct version.
Parameters:
Name | Type | Description |
---|---|---|
id |
String | Frame identifier according to Id3v2 specification |
value |
String |
- Source:
- See:
setTextEncoding(encType)
sets the text encoding used when creating new frames
(the encoding type of old frames can't be changed with
JavaMusicTag)
Parameters:
Name | Type | Description |
---|---|---|
encType |
Number | String | the new encoding type as number or string |
- Source:
- See:
-
- jala.Mp3#TEXT_ENCODINGS
setTitle(title)
Sets the title information
Parameters:
Name | Type | Description |
---|---|---|
title |
String |
- Source:
setTrackNumber(trackNumber)
Sets the track number information.
Parameters:
Name | Type | Description |
---|---|---|
trackNumber |
Number |
- Source:
setUrl(url, desc)
Stores the Url passed as argument in this tag.
Parameters:
Name | Type | Description |
---|---|---|
url |
String | The url to store in this tag |
desc |
String | An optiona description of the Url |
- Source:
setYear(year)
Sets the year information.
Parameters:
Name | Type | Description |
---|---|---|
year |
Number |
- Source: