Documentation ¶
Index ¶
- type Device
- func (d *Device) DecreaseVolume(step uint8) (err error)
- func (d *Device) GetAlbumArtURL() string
- func (d *Device) IncreaseVolume(step uint8) (err error)
- func (d *Device) Next() (err error)
- func (d *Device) Pause() (err error)
- func (d *Device) Play() (err error)
- func (d *Device) PowerOff() (err error)
- func (d *Device) PowerOn() (err error)
- func (d *Device) Previous() (err error)
- func (d *Device) SetMute(mute bool) (err error)
- func (d *Device) SetVolume(volume uint8) (err error)
- func (d *Device) Subscribe() chan interface{}
- func (d *Device) Sync() (err error)
- func (d *Device) TogglePlayPause() (err error)
- type Playback
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct { ID string `json:"id"` Model string `json:"model"` Name string `json:"name"` Status Status `json:"status"` Playback Playback `json:"playback"` URL url.URL // contains filtered or unexported fields }
func NewDevice ¶
func NewDevice(maybeRoot upnp.MaybeRootDevice) (device *Device, err error)
NewDevice creates a new Device from the given UPnP root device.
func (*Device) DecreaseVolume ¶
DecreaseVolume decreases the volume by the given value.
func (*Device) GetAlbumArtURL ¶
GetAlbumArtURL returns the URL to the current album art
func (*Device) IncreaseVolume ¶
IncreaseVolume increases the volume by the given value.
func (*Device) Subscribe ¶
func (d *Device) Subscribe() chan interface{}
Subscribe returns a channel for receiving update notifications from the device.
func (*Device) TogglePlayPause ¶
TogglePlayPause toggles playback state from "play" to "pause" and vice versa.
type Playback ¶
type Playback struct { Input string `json:"input"` Playback string `json:"playback"` Repeat string `json:"repeat"` Shuffle string `json:"shuffle"` PlayTime int32 `json:"play_time"` TotalTime int32 `json:"total_time"` Artist string `json:"artist"` Album string `json:"album"` AlbumArtURL string `json:"albumart_url"` Track string `json:"track"` }
Click to show internal directories.
Click to hide internal directories.