mocks

package
v0.0.0-...-4c68550 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Answer                      = &webrtc.SessionDescription{Type: webrtc.SDPTypeAnswer, SDP: "--a--"}
	Offer                       = &webrtc.SessionDescription{Type: webrtc.SDPTypeOffer, SDP: "--o--"}
	OnQuitSessionInternallyStub = func(ctx context.Context, user uuid.UUID) bool {
		return true
	}
)

Functions

func NewEndpoint

func NewEndpoint(answer *webrtc.SessionDescription) *rtp.Endpoint

func NewIdelEndpoint

func NewIdelEndpoint() *rtp.Endpoint

Types

type LiveSenderMock

type LiveSenderMock struct {
	Tracks map[string]webrtc.TrackLocal
}

func NewLiveSender

func NewLiveSender() *LiveSenderMock

func (*LiveSenderMock) AddTrack

func (sf *LiveSenderMock) AddTrack(track webrtc.TrackLocal)

func (*LiveSenderMock) GetTracks

func (sf *LiveSenderMock) GetTracks() []webrtc.TrackLocal

func (*LiveSenderMock) RemoveTrack

func (sf *LiveSenderMock) RemoveTrack(track webrtc.TrackLocal)

type RtpEngineMock

type RtpEngineMock struct {
	Conn *rtp.Endpoint
	Err  error
}

func NewRtpEngine

func NewRtpEngine() *RtpEngineMock

func NewRtpEngineForOffer

func NewRtpEngineForOffer(answer *webrtc.SessionDescription) *RtpEngineMock

func (*RtpEngineMock) EstablishEndpoint

func (e *RtpEngineMock) EstablishEndpoint(_ context.Context, _ context.Context, _ uuid.UUID, _ uuid.UUID, _ webrtc.SessionDescription, _ rtp.EndpointType, o ...rtp.EndpointOption) (*rtp.Endpoint, error)

func (*RtpEngineMock) OfferEndpoint

func (e *RtpEngineMock) OfferEndpoint(ctx context.Context, sessionCtx context.Context, sessionId uuid.UUID, liveStream uuid.UUID, endpointType rtp.EndpointType, options ...rtp.EndpointOption) (*rtp.Endpoint, error)

Jump to

Keyboard shortcuts

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