responses

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2019 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const TypeAppAvailability = "GET_APP_AVAILABILITY"
View Source
const TypeClose = "CLOSE"
View Source
const TypeInvalid = "INVALID_REQUEST"
View Source
const TypeLaunchError = "LAUNCH_ERROR"
View Source
const TypeLoadFailed = "LOAD_FAILED"
View Source
const TypeMediaStatus = "MEDIA_STATUS"
View Source
const TypePing = "PING"
View Source
const TypePong = "PONG"
View Source
const TypeStatus = "RECEIVER_STATUS"

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationSession

type ApplicationSession struct {
	AppID        string      `json:"appId,omitempty"`
	DisplayName  string      `json:"displayName,omitempty"`
	IsIdleScreen bool        `json:"isIdleScreen"`
	Namespaces   []Namespace `json:"namespaces"`
	SessionID    string      `json:"sessionId,omitempty"`
	StatusText   string      `json:"statusText,omitempty"`
	TransportId  string      `json:"transportId,omitempty"`
}

func (*ApplicationSession) HasNamespace

func (as *ApplicationSession) HasNamespace(ns string) bool

type Headers

type Headers struct {
	Type      string `json:"type"`
	RequestId *int   `json:"requestId,omitempty"`
}

func (*Headers) GetRequestId

func (h *Headers) GetRequestId() int

func (*Headers) SetRequestId

func (h *Headers) SetRequestId(id int)

type LoadMediaCommand

type LoadMediaCommand struct {
	Headers
	Media       MediaItem   `json:"media"`
	CurrentTime int         `json:"currentTime"`
	Autoplay    bool        `json:"autoplay"`
	CustomData  interface{} `json:"customData"`
}

type MediaCommand

type MediaCommand struct {
	Headers
	MediaSessionID int `json:"mediaSessionId"`
}

type MediaItem

type MediaItem struct {
	ContentId   string        `json:"contentId"`
	StreamType  string        `json:"streamType"`
	ContentType string        `json:"contentType"`
	MetaData    MediaItemMeta `json:"metadata"`
}

type MediaItemMeta

type MediaItemMeta struct {
	Title    string               `json:"title"`
	SubTitle string               `json:"subtitle"`
	Images   []MediaItemMetaImage `json:"images"`
}

type MediaItemMetaImage

type MediaItemMetaImage struct {
	Url    string `json:"url"`
	Width  int    `json:"width"`
	Height int    `json:"height"`
}

type MediaStatus

type MediaStatus struct {
	Headers
	MediaSessionID         int                    `json:"mediaSessionId"`
	PlaybackRate           float64                `json:"playbackRate"`
	PlayerState            string                 `json:"playerState"`
	CurrentTime            float64                `json:"currentTime"`
	SupportedMediaCommands int                    `json:"supportedMediaCommands"`
	Volume                 *Volume                `json:"volume,omitempty"`
	Media                  *MediaStatusMedia      `json:"media"`
	CustomData             map[string]interface{} `json:"customData"`
	RepeatMode             string                 `json:"repeatMode"`
	IdleReason             string                 `json:"idleReason"`
}

type MediaStatusMedia

type MediaStatusMedia struct {
	ContentId   string        `json:"contentId"`
	StreamType  string        `json:"streamType"`
	ContentType string        `json:"contentType"`
	Duration    float64       `json:"duration"`
	MetaData    MediaItemMeta `json:"metadata"`
}

type MediaStatusResponse

type MediaStatusResponse struct {
	Headers
	Status []*MediaStatus `json:"status,omitempty"`
}

type Namespace

type Namespace struct {
	Name string `json:"name"`
}

type Payload

type Payload interface {
	SetRequestId(id int)
	GetRequestId() int
}

type ReceiverResponse

type ReceiverResponse struct {
	Headers
	Status *ReceiverStatus `json:"status,omitempty"`
}

type ReceiverStatus

type ReceiverStatus struct {
	Headers
	Applications  []*ApplicationSession `json:"applications"`
	Volume        *Volume               `json:"volume,omitempty"`
	IsStandBy     bool                  `json:"isStandby,omitempty"`
	IsActiveInput bool                  `json:"isActiveInput,omitempty"`
}

type SeekMediaCommand

type SeekMediaCommand struct {
	Headers
	CurrentTime    int `json:"currentTime"`
	MediaSessionID int `json:"mediaSessionId"`
}

type Volume

type Volume struct {
	Level float64 `json:"level,omitempty"`
	Muted bool    `json:"muted,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL