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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
simplepush module
wtn module

Jump to

Keyboard shortcuts

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