Documentation ¶
Index ¶
- Constants
- type Functions
- type MediaPlayer
- func (s *MediaPlayer) ADBConnect() (connection adb_wrapper.Wrapper)
- func (s *MediaPlayer) Get(key string) (result string)
- func (s *MediaPlayer) GetStatus() (result Status)
- func (s *MediaPlayer) Prepare()
- func (s *MediaPlayer) Run(player_name string, command string, args ...interface{}) (result string)
- func (s *MediaPlayer) Set(key string, value string) (result string)
- type Spotify
- func (mp *Spotify) ContinuousOpen()
- func (mp *Spotify) GetActiveButtonIndex() (result int)
- func (mp *Spotify) IsShuffleOn() (result bool)
- func (mp *Spotify) Item(item_id string)
- func (mp *Spotify) Next()
- func (mp *Spotify) NextItem(song_id string)
- func (mp *Spotify) NextPlaylist(playlist_id string)
- func (mp *Spotify) Pause()
- func (mp *Spotify) Play()
- func (mp *Spotify) PlayPlaylistWithShuffle(playlist_id string)
- func (mp *Spotify) Playlist(playlist_id string)
- func (mp *Spotify) PressPreviousButton()
- func (mp *Spotify) Previous()
- func (mp *Spotify) PreviousItem(song_id string)
- func (mp *Spotify) PreviousPlaylist(playlist_id string)
- func (mp *Spotify) ReopenSpotifyApp()
- func (mp *Spotify) Setup()
- func (mp *Spotify) ShuffleOff() (was_on bool)
- func (mp *Spotify) ShuffleOn() (was_on bool)
- func (mp *Spotify) Stop()
- func (mp *Spotify) Teardown()
- func (mp *Spotify) Update()
- type Status
- type Twitch
- func (t *Twitch) Next()
- func (t *Twitch) Pause()
- func (t *Twitch) Play()
- func (mp *Twitch) PlayPlaylist(playlist_id string)
- func (mp *Twitch) PlayPlaylistWithShuffle(playlist_id string)
- func (t *Twitch) Previous()
- func (t *Twitch) Setup()
- func (t *Twitch) Stop()
- func (t *Twitch) Teardown()
- func (t *Twitch) Update()
- type YouTube
- func (t *YouTube) Next()
- func (t *YouTube) Pause()
- func (t *YouTube) Play()
- func (mp *YouTube) PlayPlaylist(playlist_id string)
- func (mp *YouTube) PlayPlaylistWithShuffle(playlist_id string)
- func (t *YouTube) Previous()
- func (t *YouTube) Setup()
- func (t *YouTube) Stop()
- func (t *YouTube) Teardown()
- func (t *YouTube) Update()
Constants ¶
View Source
const ACTIVITY_BLANK = "com.amazon.tv.launcher/com.amazon.tv.launcher.ui.HomeActivity_vNext"
View Source
const ACTIVITY_SPOTIFY = "com.spotify.tv.android/com.spotify.tv.android.SpotifyTVActivity"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MediaPlayer ¶
type MediaPlayer struct { Config *types.ConfigFile `json:"config"` DB *bolt_api.DB `json:"-"` MediaPlayers map[string]Functions `json:"-"` ADB adb_wrapper.Wrapper `json:"-"` TV *tv.TV `json:"-"` Status Status `json:"status"` }
func New ¶
func New(db *bolt_api.DB, config *types.ConfigFile) (result *MediaPlayer)
func (*MediaPlayer) ADBConnect ¶
func (s *MediaPlayer) ADBConnect() (connection adb_wrapper.Wrapper)
func (*MediaPlayer) Get ¶
func (s *MediaPlayer) Get(key string) (result string)
func (*MediaPlayer) GetStatus ¶
func (s *MediaPlayer) GetStatus() (result Status)
func (*MediaPlayer) Prepare ¶
func (s *MediaPlayer) Prepare()
type Spotify ¶
type Spotify struct { *MediaPlayer Name string `yaml:"name"` }
func (*Spotify) ContinuousOpen ¶
func (mp *Spotify) ContinuousOpen()
func (*Spotify) GetActiveButtonIndex ¶
func (*Spotify) IsShuffleOn ¶
func (*Spotify) NextPlaylist ¶
func (*Spotify) PlayPlaylistWithShuffle ¶
func (*Spotify) PressPreviousButton ¶
func (mp *Spotify) PressPreviousButton()
func (*Spotify) PreviousItem ¶
func (*Spotify) PreviousPlaylist ¶
func (*Spotify) ReopenSpotifyApp ¶
func (mp *Spotify) ReopenSpotifyApp()
func (*Spotify) ShuffleOff ¶
type Status ¶
type Status struct { StartTime string `json:"start_time"` StartTimeOBJ time.Time `json:"-"` PreviousPlayerName string `json:"previous_player_name"` PreviousPlayerCommand string `json:"previous_player_command"` PreviousStartTime string `json:"previous_start_time"` PreviousStartTimeOBJ time.Time `json:"-"` PreviousStartTimeDuration time.Duration `json:"-"` PreviousStartTimeDurationSeconds float64 `json:"previous_start_time_duration_seconds"` ADBTopWindow string `json:"adb_top_window"` ADBVolume int `json:"adb_volume"` TV tv.Status `json:"tv"` }
type Twitch ¶
type Twitch struct { *MediaPlayer Name string `yaml:"name"` }
func (*Twitch) PlayPlaylist ¶
func (*Twitch) PlayPlaylistWithShuffle ¶
type YouTube ¶
type YouTube struct { *MediaPlayer Name string `yaml:"youtube"` }
func (*YouTube) PlayPlaylist ¶
func (*YouTube) PlayPlaylistWithShuffle ¶
Click to show internal directories.
Click to hide internal directories.