nest

package
v1.9.13 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial added in v1.9.4

func Dial(rawURL string) (core.Producer, error)

Types

type API

type API struct {
	Token     string
	ExpiresAt time.Time

	StreamProjectID string
	StreamDeviceID  string
	StreamExpiresAt time.Time

	// WebRTC
	StreamSessionID string

	// RTSP
	StreamToken          string
	StreamExtensionToken string
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(clientID, clientSecret, refreshToken string) (*API, error)

func (*API) ExchangeSDP

func (a *API) ExchangeSDP(projectID, deviceID, offer string) (string, error)

func (*API) ExtendStream added in v1.9.0

func (a *API) ExtendStream() error

func (*API) GenerateRtspStream added in v1.9.9

func (a *API) GenerateRtspStream(projectID, deviceID string) (string, error)

func (*API) GetDevices

func (a *API) GetDevices(projectID string) ([]DeviceInfo, error)

func (*API) StartExtendStreamTimer added in v1.9.0

func (a *API) StartExtendStreamTimer()

func (*API) StopExtendStreamTimer added in v1.9.0

func (a *API) StopExtendStreamTimer()

func (*API) StopRTSPStream added in v1.9.9

func (a *API) StopRTSPStream() error

type Auth

type Auth struct {
	AccessToken string
}

type Device

type Device struct {
	Name string `json:"name"`
	Type string `json:"type"`
	//Assignee string `json:"assignee"`
	Traits struct {
		SdmDevicesTraitsInfo struct {
			CustomName string `json:"customName"`
		} `json:"sdm.devices.traits.Info"`
		SdmDevicesTraitsCameraLiveStream struct {
			VideoCodecs        []string `json:"videoCodecs"`
			AudioCodecs        []string `json:"audioCodecs"`
			SupportedProtocols []string `json:"supportedProtocols"`
		} `json:"sdm.devices.traits.CameraLiveStream"`
	} `json:"traits"`
	ParentRelations []struct {
		Parent      string `json:"parent"`
		DisplayName string `json:"displayName"`
	} `json:"parentRelations"`
}

type DeviceInfo added in v1.9.9

type DeviceInfo struct {
	Name      string
	DeviceID  string
	Protocols []string
}

type RTSPClient added in v1.9.9

type RTSPClient struct {
	// contains filtered or unexported fields
}

func (*RTSPClient) GetMedias added in v1.9.9

func (c *RTSPClient) GetMedias() []*core.Media

func (*RTSPClient) GetTrack added in v1.9.9

func (c *RTSPClient) GetTrack(media *core.Media, codec *core.Codec) (*core.Receiver, error)

func (*RTSPClient) MarshalJSON added in v1.9.9

func (c *RTSPClient) MarshalJSON() ([]byte, error)

func (*RTSPClient) Start added in v1.9.9

func (c *RTSPClient) Start() error

func (*RTSPClient) Stop added in v1.9.9

func (c *RTSPClient) Stop() error

type WebRTCClient added in v1.9.9

type WebRTCClient struct {
	// contains filtered or unexported fields
}

func (*WebRTCClient) AddTrack added in v1.9.9

func (c *WebRTCClient) AddTrack(media *core.Media, codec *core.Codec, track *core.Receiver) error

func (*WebRTCClient) GetMedias added in v1.9.9

func (c *WebRTCClient) GetMedias() []*core.Media

func (*WebRTCClient) GetTrack added in v1.9.9

func (c *WebRTCClient) GetTrack(media *core.Media, codec *core.Codec) (*core.Receiver, error)

func (*WebRTCClient) MarshalJSON added in v1.9.9

func (c *WebRTCClient) MarshalJSON() ([]byte, error)

func (*WebRTCClient) Start added in v1.9.9

func (c *WebRTCClient) Start() error

func (*WebRTCClient) Stop added in v1.9.9

func (c *WebRTCClient) Stop() error

Jump to

Keyboard shortcuts

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