package webrtc

import "errors"

// Sentinel errors returned by package functions.
var (
	// ErrStreamNotFound indicates a WHEP subscribe referenced a stream_id
	// that has no registered source. Maps to HTTP 404.
	ErrStreamNotFound = errors.New("webrtc: stream not found")

	// ErrPeerCapReached indicates max_peers_total has been exceeded.
	// Maps to HTTP 503.
	ErrPeerCapReached = errors.New("webrtc: peer capacity reached")

	// ErrCodecMismatch indicates the viewer's SDP offer does not include
	// a codec the source can serve (expected H.264 + Opus). Maps to HTTP 406.
	ErrCodecMismatch = errors.New("webrtc: codec mismatch")

	// ErrInvalidSDP indicates the request body was not a parseable SDP offer.
	// Maps to HTTP 400.
	ErrInvalidSDP = errors.New("webrtc: invalid SDP")

	// ErrICETimeout indicates ICE gathering did not complete within the
	// configured timeout. Maps to HTTP 500.
	ErrICETimeout = errors.New("webrtc: ICE gathering timeout")
)
