diff --git a/pkg/errors/errors.go b/pkg/errors/errors.go index b18469cf..7b85b3d4 100644 --- a/pkg/errors/errors.go +++ b/pkg/errors/errors.go @@ -18,6 +18,7 @@ var ( ErrNoCompatibleCodec = psrpc.NewErrorf(psrpc.InvalidArgument, "no supported codec is compatible with all outputs") ErrNoCompatibleFileOutputType = psrpc.NewErrorf(psrpc.InvalidArgument, "no supported file output type is compatible with the selected codecs") ErrResourceExhausted = psrpc.NewErrorf(psrpc.ResourceExhausted, "not enough CPU") + ErrVideoWebsocket = psrpc.NewErrorf(psrpc.InvalidArgument, "cannot send video over websocket") ) func New(err string) error { diff --git a/pkg/pipeline/source/sdk.go b/pkg/pipeline/source/sdk.go index 0fcb948b..6df12001 100644 --- a/pkg/pipeline/source/sdk.go +++ b/pkg/pipeline/source/sdk.go @@ -174,6 +174,11 @@ func (s *SDKSource) joinRoom(p *config.PipelineConfig) error { p.TrackKind = "audio" } else { p.TrackKind = "video" + // check for video over websocket + if p.Outputs[types.EgressTypeWebsocket] != nil { + onSubscribeErr = errors.ErrVideoWebsocket + return + } } p.TrackSource = strings.ToLower(pub.Source().String())