webrtc

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

credit to https://github.com/poi5305/go-yuv2webRTC/blob/master/webrtc/webrtc.go

credit to https://github.com/poi5305/go-yuv2webRTC/blob/master/webrtc/webrtc.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(in string, obj interface{})

Decode decodes the input from base64 It can optionally unzip the input after decoding

func Encode

func Encode(obj interface{}) string

Encode encodes the input in base64 It can optionally zip the input before encoding

Types

type InputDataPair

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

type WebRTC

type WebRTC struct {
	ID string

	// for yuvI420 image
	ImageChannel chan []byte
	AudioChannel chan []byte
	InputChannel chan int

	Done bool

	RoomID string
	// contains filtered or unexported fields
}

WebRTC connection

func NewWebRTC

func NewWebRTC() *WebRTC

NewWebRTC create

func (*WebRTC) AddCandidate

func (w *WebRTC) AddCandidate(candidate webrtc.ICECandidateInit)

TODO: Take a look at this

func (*WebRTC) AttachRoomID

func (w *WebRTC) AttachRoomID(roomID string)

func (*WebRTC) IsConnected

func (w *WebRTC) IsConnected() bool

IsConnected comment

func (*WebRTC) StartClient

func (w *WebRTC) StartClient(remoteSession string, iceCandidates []string, width, height int) (string, error)

StartClient start webrtc

func (*WebRTC) StopClient

func (w *WebRTC) StopClient()

StopClient disconnect

Jump to

Keyboard shortcuts

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