wtn

package module
v0.0.0-...-7e2dd3c Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: MIT Imports: 7 Imported by: 0

README

wtn-go

wtn golang sdk

Documentation

Index

Constants

View Source
const WTNBaseURL = "https://signaling.rtc.qcloud.com"

Variables

This section is empty.

Functions

func GenSig

func GenSig(sdkappid int, secret string, userID string, expire int) (string, error)

Types

type Config

type Config struct {
	SDKAppID uint32
	Secret   string

	Audio bool
	Video bool

	// We can use this track to publish
	// If not set, we will create a new track
	AudioTrack webrtc.TrackLocal
	VideoTrack webrtc.TrackLocal
}

WTN config struct

type ConnectionState

type ConnectionState int
const (
	ConnectionStateNew ConnectionState = iota + 1
	ConnectionStateConnected
	ConnectionStateDisconnected
	ConnectionStateFailed
)

type WTNClient

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

func NewClient

func NewClient(config Config) *WTNClient

func (*WTNClient) OnConnectionStateChange

func (c *WTNClient) OnConnectionStateChange(f func(ConnectionState))

func (*WTNClient) Publish

func (c *WTNClient) Publish(streamID string, userID string, userSig string) error

func (*WTNClient) Stop

func (c *WTNClient) Stop() error

Directories

Path Synopsis
examples
rtsp2webrtc Module
wtn module

Jump to

Keyboard shortcuts

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