Documentation
¶
Index ¶
- Constants
- func NewAddedEvent(source gopi.Unit, device mutablehome.CastDevice) gopi.Event
- func NewRemovedEvent(source gopi.Unit, device mutablehome.CastDevice) gopi.Event
- func NewUpdatedEvent(source gopi.Unit, device mutablehome.CastDevice) gopi.Event
- type Cast
- type Device
- type LaunchAppRequest
- type LoadMediaRequest
- type LoadQueueItem
- type LoadQueueRequest
- type MediaStatusResponse
- type Payload
- type PayloadHeader
- type ReceiverStatusResponse
- type SetVolumeRequest
Constants ¶
View Source
const ( SERVICE_TYPE_GOOGLECAST = "_googlecast._tcp" DELTA_LOOKUP_TIME = 60 * time.Second )
View Source
const ( CAST_DEFAULT_SENDER = "sender-0" CAST_DEFAULT_RECEIVER = "receiver-0" CAST_NS_CONN = "urn:x-cast:com.google.cast.tp.connection" CAST_NS_HEARTBEAT = "urn:x-cast:com.google.cast.tp.heartbeat" CAST_NS_RECV = "urn:x-cast:com.google.cast.receiver" CAST_NS_MEDIA = "urn:x-cast:com.google.cast.media" )
View Source
const ( READ_TIMEOUT = 500 * time.Millisecond STATUS_INTERVAL = 5 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func NewAddedEvent ¶
func NewAddedEvent(source gopi.Unit, device mutablehome.CastDevice) gopi.Event
func NewRemovedEvent ¶
func NewRemovedEvent(source gopi.Unit, device mutablehome.CastDevice) gopi.Event
func NewUpdatedEvent ¶
func NewUpdatedEvent(source gopi.Unit, device mutablehome.CastDevice) gopi.Event
Types ¶
type Device ¶
type Device struct {
Service gopi.RPCServiceRecord
}
type LaunchAppRequest ¶
type LaunchAppRequest struct {
PayloadHeader
AppId string `json:"appId"`
}
func (*LaunchAppRequest) WithId ¶
func (this *LaunchAppRequest) WithId(id int) Payload
type LoadMediaRequest ¶
type LoadMediaRequest struct {
PayloadHeader
Media mediaItem `json:"media"`
CurrentTime int `json:"currentTime,omitempty"`
Autoplay bool `json:"autoplay,omitempty"`
}
func (*LoadMediaRequest) WithId ¶
func (this *LoadMediaRequest) WithId(id int) Payload
type LoadQueueItem ¶
type LoadQueueRequest ¶
type LoadQueueRequest struct {
PayloadHeader
RepeatMode string `json:"repeatMode"`
Items []LoadQueueItem `json:"items"`
}
type MediaStatusResponse ¶
type MediaStatusResponse struct {
PayloadHeader
Status []media `json:"status"`
}
type PayloadHeader ¶
func (*PayloadHeader) WithId ¶
func (this *PayloadHeader) WithId(id int) Payload
type ReceiverStatusResponse ¶
type ReceiverStatusResponse struct {
PayloadHeader
Status struct {
Applications []application `json:"applications"`
Volume volume `json:"volume"`
} `json:"status"`
}
type SetVolumeRequest ¶
type SetVolumeRequest struct {
PayloadHeader
Volume volume `json:"volume"`
}
func (*SetVolumeRequest) WithId ¶
func (this *SetVolumeRequest) WithId(id int) Payload
Click to show internal directories.
Click to hide internal directories.