class RemiAudio::Xspf::Track
- RemiAudio::Xspf::Track
- Reference
- Object
Overview
The Track class represents a single track within a playlist.
Included Modules
- JSON::Serializable
Defined in:
remiaudio/xspf/xspf.crConstructors
-
.fromXML(parent : XML::Node, ns : XML::Namespace | Nil) : Track
Creates a new
Trackinstance by parsing XML starting atparent. - .new(pull : JSON::PullParser)
-
.new
Creates a new
Trackinstance. -
.new(*locationURIs : URI, title : String | Nil = nil, album : String | Nil = nil, creator : String | Nil = nil, trackNumber : UInt64 | Nil = nil)
Creates a new
Trackinstance.
Instance Method Summary
-
#album : String | Nil
The human-readable name of the album this track belongs to, if any.
-
#album=(album : String | Nil)
The human-readable name of the album this track belongs to, if any.
-
#annotate : String | Nil
A human-readable comment for this track, if any.
-
#annotate=(annotate : String | Nil)
A human-readable comment for this track, if any.
-
#creator : String | Nil
The human-readable name of the creator of this track, if any.
-
#creator=(creator : String | Nil)
The human-readable name of the creator of this track, if any.
-
#duration : UInt64 | Nil
The approximate length of this track.
-
#duration=(duration : UInt64 | Nil)
The approximate length of this track.
-
#identifiers : Array(URI)
An ordered list of URIs describing the cannonical identifier of this track.
-
#identifiers=(identifiers : Array(URI))
An ordered list of URIs describing the cannonical identifier of this track.
-
#image : URI | Nil
A URI pointing to an image that can be displayed while this track is playing.
-
#image=(image : URI | Nil)
A URI pointing to an image that can be displayed while this track is playing.
-
#info : URI | Nil
A URI of a web page that provides more information about this track.
-
#info=(info : URI | Nil)
A URI of a web page that provides more information about this track.
-
#links : Array(Link)
An array of
Linkinstances that allow track information to be extended without extra XML namespaces. -
#links=(links : Array(Link))
An array of
Linkinstances that allow track information to be extended without extra XML namespaces. -
#locations : Array(URI)
An ordered list of URIs that point to the actual data for this track, if any.
-
#locations=(locations : Array(URI))
An ordered list of URIs that point to the actual data for this track, if any.
-
#meta : Array(Meta)
An array of
Metainstances that specify metadata for a track. -
#meta=(meta : Array(Meta))
An array of
Metainstances that specify metadata for a track. -
#title : String | Nil
The human-readable name title of this track, if any.
-
#title=(title : String | Nil)
The human-readable name title of this track, if any.
-
#trackNumber : UInt64 | Nil
The ordinal position of this track within the
#album, if any. -
#trackNumber=(trackNumber : UInt64 | Nil)
The ordinal position of this track within the
#album, if any. -
#write(xml : XML::Builder) : Nil
Writes this instance to an
XML::Builderfor serialization.
Constructor Detail
Creates a new Track instance by parsing XML starting at parent. The
parent node should be the <track> element itself.
Creates a new Track instance.
Instance Method Detail
The human-readable name of the album this track belongs to, if any. If
this is nil, then no <album> element is emitted for the <track>
element.
The human-readable name of the album this track belongs to, if any. If
this is nil, then no <album> element is emitted for the <track>
element.
A human-readable comment for this track, if any. If this is nil, then no
<annotation> element is emitted for the <track> element. This should
never contain markup.
A human-readable comment for this track, if any. If this is nil, then no
<annotation> element is emitted for the <track> element. This should
never contain markup.
The human-readable name of the creator of this track, if any. If this is
nil, then no <creator> element is emitted for the <track> element.
The human-readable name of the creator of this track, if any. If this is
nil, then no <creator> element is emitted for the <track> element.
The approximate length of this track. This length only serves as a hint
and may not be accurate. If this is nil, then no <duration> element is
emitted for the <track> element.
The approximate length of this track. This length only serves as a hint
and may not be accurate. If this is nil, then no <duration> element is
emitted for the <track> element.
An ordered list of URIs describing the cannonical identifier of this track.
An ordered list of URIs describing the cannonical identifier of this track.
A URI pointing to an image that can be displayed while this track is
playing. If this is nil, then no <image> element is emitted for the
<track> element.
A URI pointing to an image that can be displayed while this track is
playing. If this is nil, then no <image> element is emitted for the
<track> element.
A URI of a web page that provides more information about this track. If
this is nil, then no <info> element is emitted for the <track>
element.
A URI of a web page that provides more information about this track. If
this is nil, then no <info> element is emitted for the <track>
element.
An array of Link instances that allow track information to be extended
without extra XML namespaces. If this is empty, then no <link> element
is emitted for the <track> element.
An array of Link instances that allow track information to be extended
without extra XML namespaces. If this is empty, then no <link> element
is emitted for the <track> element.
An ordered list of URIs that point to the actual data for this track, if any. This technically does not have to be a link to an audio resource.
An ordered list of URIs that point to the actual data for this track, if any. This technically does not have to be a link to an audio resource.
An array of Meta instances that specify metadata for a track. If this
is empty, then no <meta> element is emitted for the <track> element.
An array of Meta instances that specify metadata for a track. If this
is empty, then no <meta> element is emitted for the <track> element.
The human-readable name title of this track, if any. If this is nil, then
no <title> element is emitted for the <track> element.
The human-readable name title of this track, if any. If this is nil, then
no <title> element is emitted for the <track> element.
The ordinal position of this track within the #album, if any. If this is
nil, then no <trackNum> element is emitted for the <track> element.
The ordinal position of this track within the #album, if any. If this is
nil, then no <trackNum> element is emitted for the <track> element.