package chromecast import "forge.cadoles.com/arcad/edge/pkg/module/cast" type DeviceStatus struct { CurrentApp DeviceStatusCurrentApp `goja:"currentApp" json:"currentApp"` Volume DeviceStatusVolume `goja:"volume" json:"volume"` } // State implements cast.DeviceStatus. func (s *DeviceStatus) State() string { return s.CurrentApp.StatusText } // Title implements cast.DeviceStatus. func (s *DeviceStatus) Title() string { return s.CurrentApp.DisplayName } var _ cast.DeviceStatus = &DeviceStatus{} type DeviceStatusCurrentApp struct { ID string `goja:"id" json:"id"` DisplayName string `goja:"displayName" json:"displayName"` StatusText string `goja:"statusText" json:"statusText"` } type DeviceStatusVolume struct { Level float64 `goja:"level" json:"level"` Muted bool `goja:"muted" json:"muted"` }