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
Track
instance by parsing XML starting atparent
. - .new(pull : JSON::PullParser)
-
.new
Creates a new
Track
instance. -
.new(*locationURIs : URI, title : String | Nil = nil, album : String | Nil = nil, creator : String | Nil = nil, trackNumber : UInt64 | Nil = nil)
Creates a new
Track
instance.
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
- #annotate=(annotate : String | Nil)
-
#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)
- #identifiers=(identifiers : Array(URI))
-
#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)
- #links=(links : Array(Link))
- #locations : Array(URI)
- #locations=(locations : Array(URI))
- #meta : Array(Meta)
- #meta=(meta : Array(Meta))
-
#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
- #trackNumber=(trackNumber : UInt64 | Nil)
-
#write(xml : XML::Builder) : Nil
Writes this instance to an
XML::Builder
for 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.
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.
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.
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.