class RemiAudio::Xspf::Track

Overview

The Track class represents a single track within a playlist.

Included Modules

Defined in:

remiaudio/xspf/xspf.cr

Constructors

Instance Method Summary

Constructor Detail

def self.fromXML(parent : XML::Node, ns : XML::Namespace | Nil) : Track #

Creates a new Track instance by parsing XML starting at parent. The parent node should be the <track> element itself.


[View source]
def self.new(pull : JSON::PullParser) #

[View source]
def self.new #

Creates a new Track instance.


[View source]
def self.new(*locationURIs : URI, title : String | Nil = nil, album : String | Nil = nil, creator : String | Nil = nil, trackNumber : UInt64 | Nil = nil) #

Creates a new Track instance.


[View source]

Instance Method Detail

def album : String | Nil #

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.


[View source]
def album=(album : String | Nil) #

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.


[View source]
def annotate : String | Nil #

[View source]
def annotate=(annotate : String | Nil) #

[View source]
def creator : String | Nil #

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.


[View source]
def creator=(creator : String | Nil) #

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.


[View source]
def duration : UInt64 | Nil #

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.


[View source]
def duration=(duration : UInt64 | Nil) #

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.


[View source]
def identifiers : Array(URI) #

[View source]
def identifiers=(identifiers : Array(URI)) #

[View source]
def image : URI | Nil #

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.


[View source]
def image=(image : URI | Nil) #

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.


[View source]
def info : URI | Nil #

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.


[View source]
def info=(info : URI | Nil) #

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.


[View source]
def links : Array(Link) #

[View source]
def links=(links : Array(Link)) #

[View source]
def locations : Array(URI) #

[View source]
def locations=(locations : Array(URI)) #

[View source]
def meta : Array(Meta) #

[View source]
def meta=(meta : Array(Meta)) #

[View source]
def title : String | Nil #

The human-readable name title of this track, if any. If this is nil, then no <title> element is emitted for the <track> element.


[View source]
def title=(title : String | Nil) #

The human-readable name title of this track, if any. If this is nil, then no <title> element is emitted for the <track> element.


[View source]
def trackNumber : UInt64 | Nil #

[View source]
def trackNumber=(trackNumber : UInt64 | Nil) #

[View source]
def write(xml : XML::Builder) : Nil #

Writes this instance to an XML::Builder for serialization.


[View source]