Documentation
¶
Index ¶
- Constants
- func Dial(rawURL string) (core.Producer, error)
- type AnswerFrame
- type AudioAttributes
- type CandidateFrame
- type Client
- func (c *Client) AddTrack(media *core.Media, codec *core.Codec, track *core.Receiver) error
- func (c *Client) GetMedias() []*core.Media
- func (c *Client) GetTrack(media *core.Media, codec *core.Codec) (*core.Receiver, error)
- func (c *Client) MarshalJSON() ([]byte, error)
- func (c *Client) Start() error
- func (c *Client) Stop() error
- type DisconnectFrame
- type MqttFrame
- type MqttFrameHeader
- type MqttMessage
- type OfferFrame
- type OpenApiICE
- type OpenIoTHubConfig
- type OpenIoTHubConfigRequest
- type OpenIoTHubConfigResponse
- type P2PConfig
- type RTSPRequest
- type RTSPResponse
- type ResolutionFrame
- type Skill
- type Token
- type TokenResponse
- type TuyaClient
- func (c *TuyaClient) Close()
- func (c *TuyaClient) GetRTSP() (err error)
- func (c *TuyaClient) InitDevice() (err error)
- func (c *TuyaClient) InitToken() (err error)
- func (c *TuyaClient) LoadHubConfig() (config *OpenIoTHubConfig, err error)
- func (c *TuyaClient) Request(method string, url string, body any) ([]byte, error)
- func (c *TuyaClient) StartMQTT() error
- func (c *TuyaClient) StopMQTT()
- type TuyaMQTT
- type WebICE
- type WebRTCConfigResponse
- type WebRTConfig
Constants ¶
View Source
const ( DefaultCnURL = "openapi.tuyacn.com" DefaultWestUsURL = "openapi.tuyaus.com" DefaultEastUsURL = "openapi-ueaz.tuyaus.com" DefaultCentralEuURL = "openapi.tuyaeu.com" DefaultWestEuURL = "openapi-weaz.tuyaeu.com" DefaultInURL = "openapi.tuyain.com" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AnswerFrame ¶
type AudioAttributes ¶
type CandidateFrame ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) MarshalJSON ¶
type DisconnectFrame ¶
type DisconnectFrame struct {
Mode string `json:"mode"`
}
type MqttFrame ¶
type MqttFrame struct {
Header MqttFrameHeader `json:"header"`
Message json.RawMessage `json:"msg"`
}
type MqttFrameHeader ¶
type MqttMessage ¶
type OfferFrame ¶
type OpenApiICE ¶
type OpenIoTHubConfig ¶
type OpenIoTHubConfig struct {
Url string `json:"url"`
ClientID string `json:"client_id"`
Username string `json:"username"`
Password string `json:"password"`
SinkTopic struct {
IPC string `json:"ipc"`
} `json:"sink_topic"`
SourceSink struct {
IPC string `json:"ipc"`
} `json:"source_topic"`
ExpireTime int `json:"expire_time"`
}
type OpenIoTHubConfigRequest ¶
type OpenIoTHubConfigResponse ¶
type OpenIoTHubConfigResponse struct {
Success bool `json:"success"`
Result OpenIoTHubConfig `json:"result"`
}
type P2PConfig ¶
type P2PConfig struct {
Ices []OpenApiICE `json:"ices"`
}
type RTSPRequest ¶
type RTSPRequest struct {
Type string `json:"type"`
}
type RTSPResponse ¶
type ResolutionFrame ¶
type Skill ¶
type Skill struct {
WebRTC int `json:"webrtc"`
Audios []struct {
Channels int `json:"channels"`
DataBit int `json:"dataBit"`
CodecType int `json:"codecType"`
SampleRate int `json:"sampleRate"`
} `json:"audios"`
Videos []struct {
StreamType int `json:"streamType"` // streamType = 2 => H265 and streamType = 4 => H264
ProfileId string `json:"profileId"`
Width int `json:"width"`
CodecType int `json:"codecType"`
SampleRate int `json:"sampleRate"`
Height int `json:"height"`
} `json:"videos"`
}
type TokenResponse ¶
type TokenResponse struct {
Result Token `json:"result"`
}
type TuyaClient ¶
type TuyaClient struct {
// contains filtered or unexported fields
}
func NewTuyaClient ¶
func (*TuyaClient) Close ¶
func (c *TuyaClient) Close()
func (*TuyaClient) GetRTSP ¶
func (c *TuyaClient) GetRTSP() (err error)
func (*TuyaClient) InitDevice ¶
func (c *TuyaClient) InitDevice() (err error)
func (*TuyaClient) InitToken ¶
func (c *TuyaClient) InitToken() (err error)
func (*TuyaClient) LoadHubConfig ¶
func (c *TuyaClient) LoadHubConfig() (config *OpenIoTHubConfig, err error)
func (*TuyaClient) StartMQTT ¶
func (c *TuyaClient) StartMQTT() error
func (*TuyaClient) StopMQTT ¶
func (c *TuyaClient) StopMQTT()
type WebRTCConfigResponse ¶
type WebRTCConfigResponse struct {
Result WebRTConfig `json:"result"`
}
type WebRTConfig ¶
type WebRTConfig struct {
AudioAttributes AudioAttributes `json:"audio_attributes"`
Auth string `json:"auth"`
ID string `json:"id"`
MotoID string `json:"moto_id"`
P2PConfig P2PConfig `json:"p2p_config"`
Skill string `json:"skill"`
SupportsWebRTC bool `json:"supports_webrtc"`
VideoClaritiy int `json:"video_clarity"`
}
Click to show internal directories.
Click to hide internal directories.