Documentation ¶
Overview ¶
Package roku implements a library for interacting with Roku devices using the External Control Protocol (ECP) Example can be found at http://jonwillia.ms/roku/roku
Index ¶
- type App
- type DeviceInfo
- type Format
- type PlayerStatus
- type Plugin
- type Remote
- func (r *Remote) ActiveApp() (*App, error)
- func (r *Remote) Apps() ([]*App, error)
- func (r *Remote) Back() error
- func (r *Remote) Backspace() error
- func (r *Remote) ChannelDown() error
- func (r *Remote) ChannelUp() error
- func (r *Remote) DeviceInfo() (*DeviceInfo, error)
- func (r *Remote) Down() error
- func (r *Remote) Enter() error
- func (r *Remote) Fwd() error
- func (r *Remote) Home() error
- func (r *Remote) Info() error
- func (r *Remote) InputRune(rn rune) error
- func (r *Remote) InputString(in string) error
- func (r *Remote) Install(app *App) error
- func (r *Remote) InstantReplay() error
- func (r *Remote) Launch(app *App) error
- func (r *Remote) LaunchWithValues(app *App, values url.Values) error
- func (r *Remote) Left() error
- func (r *Remote) Play() error
- func (r *Remote) PlayerStatus() (*PlayerStatus, error)
- func (r *Remote) PowerOff() error
- func (r *Remote) PowerOn() error
- func (r *Remote) Refresh() error
- func (r *Remote) Rev() error
- func (r *Remote) Right() error
- func (r *Remote) Search() error
- func (r *Remote) Select() error
- func (r *Remote) Up() error
- func (r *Remote) VolumeDown() error
- func (r *Remote) VolumeMute() error
- func (r *Remote) VolumeUp() error
- type RokuDevice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceInfo ¶
type DeviceInfo struct { XMLName xml.Name `xml:"device-info"` Udn string `xml:"udn"` SerialNumber string `xml:"serial-number"` DeviceId string `xml:"device-id"` AdvertisingId string `xml:"advertising-id"` VendorName string `xml:"vendor-name"` ModelName string `xml:"model-name"` ModelNumber string `xml:"model-number"` ModelRegion string `xml:"model-region"` IsTv bool `xml:"is-tv"` IsStick bool `xml:"is-stick"` ScreenSize string `xml:"screen-size"` PanelId string `xml:"panel-id"` TunerType string `xml:"tuner-type"` SuuportsEthernet bool `xml:"supports-ethernet"` WifiMac string `xml:"wifi-mac"` WifiDriver string `xml:"wifi-driver"` HasWifiExtender bool `xml:"has-wifi-extender"` HasWifi5GSupport bool `xml:"has-wifi-5G-support"` CanUseWifiExtender bool `xml:"can-use-wifi-extender"` EthernetMac string `xml:"ethernet-mac"` NetworkType string `xml:"network-type"` NetworkName string `xml:"network-name"` FriendlyDeviceName string `xml:"friendly-device-name"` FriendlyModelName string `xml:"friendly-model-name"` DefaultDeviceName string `xml:"default-device-name"` UserDeviceName string `xml:"user-device-name"` UserDeviceLocation string `xml:"user-device-location"` BuildNumber string `xml:"build-number"` SoftwareVersion string `xml:"software-version"` SoftwareBuild string `xml:"software-build"` SecureDevice bool `xml:"secure-device"` Language string `xml:"language"` Country string `xml:"country"` Locale string `xml:"locale"` TimeZoneAuto bool `xml:"time-zone-auto"` TimeZone string `xml:"time-zone"` TimeZoneName string `xml:"time-zone-name"` TimeZoneTz string `xml:"time-zone-tz"` TimeZoneOffset int `xml:"time-zone-offset"` ClockFormat string `xml:"clock-format"` Uptime int `xml:"uptime"` PowerMode string `xml:"power-mode"` SupportsSuspend bool `xml:"supports-suspend"` SupportsFindRemote bool `xml:"supports-find-remote"` FindRemoteIsPossible bool `xml:"find-remote-is-possible"` SupportsAudioGuide bool `xml:"supports-audio-guide"` SupportsRva bool `xml:"supports-rva"` DeveloperEnabled bool `xml:"developer-enabled"` SearchEnabled bool `xml:"search-enabled"` SearchChannelsEnabled bool `xml:"search-channels-enabled"` VoiceSearchEnabled bool `xml:"voice-search-enabled"` NotificationsEnabled bool `xml:"notifications-enabled"` NotificationsFirstUse bool `xml:"notifications-first-use"` SupportsPrivateListening bool `xml:"supports-private-listening"` SupportsPrivateListeningDtv bool `xml:"supports-private-listening-dtv"` SupportsWarmStandby bool `xml:"supports-warm-standby"` HeadphonesConnected bool `xml:"headphones-connected"` ExpertPqEnabled string `xml:"expert-pq-enabled"` SupportsEcsTextedit bool `xml:"supports-ecs-textedit"` SupportsEcsMicrophone bool `xml:"supports-ecs-microphone"` SupportsWakeOnWlan bool `xml:"supports-wake-on-wlan"` HasPlayOnRoku bool `xml:"has-play-on-roku"` HasMobileScreensaver bool `xml:"has-mobile-screensaver"` SupportUrl string `xml:"support-url"` GrandcentralVersion string `xml:"grandcentral-version"` TrcVersion string `xml:"trc-version"` TrcChannelVersion string `xml:"trc-channel-version"` DavinciVersion string `xml:"davinci-version"` }
DeviceInfo is the information about the Roku The most useful fields are probably `PowerMode` (To know if device is On/Ready/etc) and maybe the Name and network information
type PlayerStatus ¶
type PlayerStatus struct { XMLName xml.Name `xml:"player"` Error bool `xml:"error,attr"` State string `xml:"state,attr"` Plugin Plugin `xml:"plugin"` Format Format `xml:"format"` Position string `xml:"position"` IsLive bool `xml:"is_live"` }
PlayerStatus holds the media status of the app currently running
type Remote ¶
type Remote struct { Addr string Device *DeviceInfo }
Remote is the base type for interacting with the Roku Device is populated when a `NewRemote` is called to create a new remote
func (*Remote) ChannelDown ¶
Equivalent of pressing Channel Down button on the remote not available on all devices
func (*Remote) ChannelUp ¶
Equivalent of pressing Channel Up button on the remote not available on all devices
func (*Remote) DeviceInfo ¶
func (r *Remote) DeviceInfo() (*DeviceInfo, error)
DeviceInfo shows the device info for connected device.
func (*Remote) InputString ¶
Input sends a string of input (useful for things like filling a search box)
func (*Remote) Install ¶
Install will install the given app. Thie requres already knowing the App Id of the App you want to install
func (*Remote) InstantReplay ¶
Equivalent of pressing Instant Replay button on the remote
func (*Remote) LaunchWithValues ¶
LaunchWithValues will launch a given App with exta arguments
func (*Remote) PlayerStatus ¶
func (r *Remote) PlayerStatus() (*PlayerStatus, error)
PlayerStatus returns the media player state
func (*Remote) PowerOff ¶
Equivalent of pressing Power button on the remote not available on all devices
func (*Remote) PowerOn ¶
Equivalent of pressing Power button on the remote not available on all devices
func (*Remote) VolumeDown ¶
Equivalent of pressing Volume Down button on the remote not available on all devices
func (*Remote) VolumeMute ¶
Equivalent of pressing Mute button on the remote not available on all devices
type RokuDevice ¶
RokuDevice is returned by FindRokuDevices For convenience finding Roku's on the network
func FindRokuDevices ¶
func FindRokuDevices() ([]*RokuDevice, error)
FindRokuDevices will do and SSDP search to find all Roku devices on the network