Documentation
¶
Index ¶
- func AirplayEnabled() bool
- func BackTrack()
- func Converting() bool
- func CurrentStreamTitle() string
- func CurrentStreamURL() string
- func EqEnabled() bool
- func FastForward()
- func FixedIndexing() bool
- func Frontmost() bool
- func FullScreen() bool
- func Mute() bool
- func Name() string
- func NextTrack()
- func Pause()
- func PlayerPosition() float64
- func PlayerState() string
- func Playpause()
- func PreviousTrack()
- func Resume()
- func Rewind()
- func Selection() string
- func ShuffleEnabled() bool
- func ShuffleMode() string
- func SongRepeat() string
- func SoundVolume() int
- func Stop()
- func Version() string
- func VisualSize() string
- func VisualsEnabled() bool
- type AirPlayDevice
- type Artwork
- type AudioCDPlaylist
- type AudioCDTrack
- type BrowserWindow
- type EQPreset
- type EQWindow
- type Encoder
- type File
- type FileTrack
- type FolderPlaylist
- type Item
- type LibraryPlaylist
- type MiniplayerWindow
- type Picture
- type Playlist
- type PlaylistWindow
- type Point
- type RadioTunerPlaylist
- type RawData
- type Rectangle
- type SharedTrack
- type Source
- type SubscriptionPlaylist
- type Track
- type URLTrack
- type UserPlaylist
- type VideoWindow
- type Visual
- type Window
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackTrack ¶
func BackTrack()
BackTrack reposition to beginning of current track or go to previous track if already at start of current track
func CurrentStreamTitle ¶
func CurrentStreamTitle() string
CurrentStreamTitle the name of the current song in the playing stream (provided by streaming server)
func CurrentStreamURL ¶
func CurrentStreamURL() string
CurrentStreamURL the URL of the playing stream or streaming web site (provided by streaming server)
func FixedIndexing ¶
func FixedIndexing() bool
FixedIndexing true if all AppleScript track indices should be independent of the play order of the owning playlist.
func PlayerPosition ¶
func PlayerPosition() float64
PlayerPosition the player’s position within the currently playing track in seconds.
func PreviousTrack ¶
func PreviousTrack()
PreviousTrack return to the previous track in the current playlist
func SoundVolume ¶
func SoundVolume() int
SoundVolume the sound output volume (0 = minimum, 100 = maximum)
func VisualsEnabled ¶
func VisualsEnabled() bool
VisualsEnabled are visuals currently being displayed?
Types ¶
type AirPlayDevice ¶
type AirPlayDevice struct {
Item
Active bool // is the device currently being played to?
Available bool // is the device currently available?
Kind string // the kind of the device
NetworkAddress string // the network (MAC) address of the device
Protected bool // is the device password- or passcode-protected?
Selected bool // is the device currently selected?
SupportsAudio bool // does the device support audio playback?
SupportsVideo bool // does the device support video playback?
SoundVolume int // the output volume for the device (0 = minimum, 100 = maximum)
}
AirPlayDevice an AirPlay device
func CurrentAirPlayDevices ¶
func CurrentAirPlayDevices() ([]AirPlayDevice, error)
CurrentAirPlayDevices the currently selected AirPlay device(s)
type Artwork ¶
type Artwork struct {
Item
Data Picture // data for this artwork, in the form of a picture
Description string // description of artwork as a string
Downloaded bool // was this artwork downloaded by iTunes?
Format string // the data format for this piece of artwork
Kind int // kind or purpose of this piece of artwork
RawData RawData // data for this artwork, in original format
}
Artwork a piece of art within a track or playlist
type AudioCDPlaylist ¶
type AudioCDPlaylist struct {
Playlist
AudioCDTracks []AudioCDTrack
Artist string // the artist of the CD
Compilation bool // is this CD a compilation album?
Composer string // the composer of the CD
DiscCount int // the total number of discs in this CD’s album
DiscNumber int // the index of this CD disc in the source album
Genre string // the genre of the CD
Year int // the year the album was recorded/released
}
AudioCDPlaylist a playlist representing an audio CD
type AudioCDTrack ¶
type AudioCDTrack struct {
Track
Location File // the location of the file represented by this track
}
AudioCDTrack a track on an audio CD
type BrowserWindow ¶
type BrowserWindow struct {
Window
Selection []Track // the selected songs
View Playlist // the playlist currently displayed in the window
}
BrowserWindow the main iTunes window
func BrowserWindows ¶
func BrowserWindows() ([]BrowserWindow, error)
BrowserWindows main iTunes windows
type EQPreset ¶
type EQPreset struct {
Item
Band1 float64 // the equalizer 32 Hz band level (-12.0 dB to +12.0 dB)
Band2 float64 // the equalizer 64 Hz band level (-12.0 dB to +12.0 dB)
Band3 float64 // the equalizer 125 Hz band level (-12.0 dB to +12.0 dB)
Band4 float64 // the equalizer 250 Hz band level (-12.0 dB to +12.0 dB)
Band5 float64 // the equalizer 500 Hz band level (-12.0 dB to +12.0 dB)
Band6 float64 // the equalizer 1 kHz band level (-12.0 dB to +12.0 dB)
Band7 float64 // the equalizer 2 kHz band level (-12.0 dB to +12.0 dB)
Band8 float64 // the equalizer 4 kHz band level (-12.0 dB to +12.0 dB)
Band9 float64 // the equalizer 8 kHz band level (-12.0 dB to +12.0 dB)
Band10 float64 // the equalizer 16 kHz band level (-12.0 dB to +12.0 dB)
Modifiable bool // can this preset be modified?
Preamp float64 // the equalizer preamp level (-12.0 dB to +12.0 dB)
UpdateTracks bool // should tracks which refer to this preset be updated when the preset is renamed or deleted?
}
EQPreset equalizer preset configuration
func CurrentEQPreset ¶
CurrentEQPreset the currently selected equalizer preset
type Encoder ¶
Encoder converts a track to a specific file format
func CurrentEncoder ¶
CurrentEncoder the currently selected encoder (MP3, AIFF, WAV, etc.)
type FolderPlaylist ¶
type FolderPlaylist struct {
UserPlaylist
FileTracks []FileTrack
URLTracks []URLTrack
Smart bool // is this a Smart Playlist?
Genius bool // is this a Genius Playlist?
}
FolderPlaylist a folder that contains other playlists
type Item ¶
type Item struct {
Class string // the class of the item
ID int // the id of the item
Index int // The index of the item in internal application order.
Name string // the name of the item
PersistentID string // the id of the item as a hexadecimal string. This id does not change over time.
Properties map[string]interface{} // every property of the item
}
Item an item
type LibraryPlaylist ¶
LibraryPlaylist the master music library playlist
type MiniplayerWindow ¶
type MiniplayerWindow struct {
Window
}
MiniplayerWindow the miniplayer window
func MiniplayerWindows ¶
func MiniplayerWindows() ([]MiniplayerWindow, error)
MiniplayerWindows miniplayer windows
type Playlist ¶
type Playlist struct {
Item
Tracks []Track
Artworks []Artwork
Description string // the description of the playlist
Disliked bool // is this playlist disliked?
Duration int // the total length of all songs (in seconds)
Name string // the name of the playlist
Loved bool // is this playlist loved?
Parent *Playlist // folder which contains this playlist (if any)
Shuffle bool // play the songs in this playlist in random order? (obsolete; always false)
Size int // the total size of all songs (in bytes)
SongRepeat string // playback repeat mode (obsolete; always off)
Time string // the length of all songs in MM:SS format
Visible bool // is this playlist visible in the Source list?
}
Playlist a list of songs/streams
func CurrentPlaylist ¶
CurrentPlaylist the playlist containing the currently targeted track
type PlaylistWindow ¶
type PlaylistWindow struct {
Window
Selection []Track // the selected songs
View Playlist // the playlist displayed in the window
}
PlaylistWindow a sub-window showing a single playlist
func PlaylistWindows ¶
func PlaylistWindows() ([]PlaylistWindow, error)
PlaylistWindows sub-window showing a single playlist windows
type RadioTunerPlaylist ¶
RadioTunerPlaylist the radio tuner playlist
type RawData ¶
func (*RawData) UnmarshalJSON ¶
type Source ¶
type Source struct {
Item
AudioCDPlaylists []AudioCDPlaylist
LibraryPlaylists []LibraryPlaylist
Playlists []Playlist
RadioTunerPlaylists []RadioTunerPlaylist
SubscriptionPlaylists []SubscriptionPlaylist
UserPlaylists []UserPlaylist
Capacity int // the total size of the source if it has a fixed size
FreeSpace int // the free space on the source if it has a fixed size
Kind string
}
Source a music source (music library, CD, device, etc.)
type SubscriptionPlaylist ¶
SubscriptionPlaylist a subscription playlist from Apple Music
type Track ¶
type Track struct {
Item
ArtWorks []Artwork // a piece of art within a track or playlist
Album string // the album name of the track
AlbumArtist string // the album artist of the track
AlbumDisliked bool // is the album for this track disliked?
AlbumLoved bool // is the album for this track loved?
AlbumRating int // the rating of the album for this track (0 to 100)
AlbumRatingKind string // the rating kind of the album rating for this track
Artist string // the artist/source of the track
BitRate int // the bit rate of the track (in kbps)
Bookmark int // the bookmark time of the track in seconds
Bookmarkable bool // is the playback position for this track remembered?
Bpm int // the tempo of this track in beats per minute
Category string // the category of the track
CloudStatus string // the iCloud status of the track
Comment string // freeform notes about the track
Compilation bool // is this track from a compilation album?
Composer string // the composer of the track
DatabaseID int // the common, unique ID for this track. If two tracks in different playlists have the same database ID, they are sharing the same data.
DateAdded time.Time // the date the track was added to the playlist
Description string // the description of the track
DiscCount int // the total number of discs in the source album
DiscNumber int // the index of the disc containing this track on the source album
Disliked bool // is this track disliked?
DownloaderAppleID string // the Apple ID of the person who downloaded this track
DownloaderName string // the name of the person who downloaded this track
Duration float64 // the length of the track in seconds
Enabled bool // is this track checked for playback?
EpisodeID string // the episode ID of the track
EpisodeNumber int // the episode number of the track
Eq string // the name of the EQ preset of the track
Finish float64 // the stop time of the track in seconds
Gapless bool // is this track from a gapless album?
Genre string // the music/audio genre (category) of the track
Grouping string // the grouping (piece) of the track. Generally used to denote movements within a classical work.
Kind string // a text description of the track
LongDescription string // longDescription (text)
Loved bool // is this track loved?
Lyrics string // the lyrics of the track
MediaKind string // the media kind of the track
ModificationDate time.Time // the modification date of the content of this track
Movement string // the movement name of the track
MovementCount int // the total number of movements in the work
MovementNumber int // the index of the movement in the work
PlayedCount int // number of times this track has been played
PlayedDate time.Time // the date and time this track was last played
PurchaserAppleID string // the Apple ID of the person who purchased this track
PurchaserName string // the name of the person who purchased this track
Rating int // the rating of this track (0 to 100)
RatingKind string // the rating kind of this track
ReleaseDate time.Time // the release date of this track
SampleRate int // the sample rate of the track (in Hz)
SeasonNumber int // the season number of the track
Shufflable bool // is this track included when shuffling?
SkippedCount int // number of times this track has been skipped
SkippedDate time.Time // the date and time this track was last skipped
Show string // the show name of the track
SortAlbum string // override string to use for the track when sorting by album
SortArtist string // override string to use for the track when sorting by artist
SortAlbumArtist string // override string to use for the track when sorting by album artist
SortName string // override string to use for the track when sorting by name
SortComposer string // override string to use for the track when sorting by composer
SortShow string // override string to use for the track when sorting by show name
Size int // the size of the track (in bytes)
Start float64 // the start time of the track in seconds
Time string // the length of the track in MM:SS format
TrackCount int // the total number of tracks on the source album
TrackNumber int // the index of the track on the source album
Unplayed bool // is this track unplayed?
VideoKind string // kind of video track
VolumeAdjustment int // relative volume adjustment of the track (-100% to 100%)
Work string // the work name of the track
Year int // the year the track was recorded/released
}
Track playable audio source
func CurrentTrackWithArtwork ¶
type UserPlaylist ¶
type UserPlaylist struct {
Playlist
URLTracks []URLTrack // track representing a network streams
FileTracks []FileTrack // track representing audio files (MP3, AIFF, etc.)
Smart bool // is this a Smart Playlist?
Genius bool // is this a Genius Playlist?
}
custom playlists created by the user
type Visual ¶
type Visual struct {
Item
}
Visual a visual plug-in
func CurrentVisual ¶
CurrentVisual the currently selected visual plug-in
type Window ¶
type Window struct {
Item
Bounds Rectangle // the boundary rectangle for the window
Closeable bool // does the window have a close button?
Collapseable bool // does the window have a collapse button?
Collapsed bool // is the window collapsed?
FullScreen bool // is the window full screen?
Position Point // the upper left position of the window
Resizable bool // is the window resizable?
Visible bool // is the window visible?
Zoomable bool // is the window zoomable?
Zoomed bool // is the window zoomed?
}
Window any window
Source Files
¶
- air_play_device.go
- artwork.go
- audio_cd_playlist.go
- audio_cd_track.go
- browser_window.go
- encorder.go
- eq_preset.go
- eq_window.go
- file.go
- file_track.go
- folder_playlist.go
- item.go
- itunes.go
- library_playlist.go
- miniplayer_window.go
- picture.go
- playlist.go
- playlist_window.go
- point.go
- radio_tuner_playlist.go
- raw_data.go
- rectangle.go
- shared_track.go
- source.go
- subscription_playlist.go
- track.go
- url_track.go
- user_playlist.go
- video_wIndow.go
- visual.go
- window.go