Skip to content

Commit

Permalink
Add WHIP Simulcast Support (#209)
Browse files Browse the repository at this point in the history
* Fix linter errors

* Add Simulcast support for WebRTC
  • Loading branch information
Sean-Der authored Feb 1, 2024
1 parent 5962a89 commit 218e0c7
Show file tree
Hide file tree
Showing 6 changed files with 306 additions and 155 deletions.
2 changes: 2 additions & 0 deletions pkg/errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ var (
ErrIngressClosing = psrpc.NewErrorf(psrpc.Unavailable, "ingress closing")
ErrMissingStreamKey = psrpc.NewErrorf(psrpc.InvalidArgument, "missing stream key")
ErrPrerollBufferReset = psrpc.NewErrorf(psrpc.Internal, "preroll buffer reset")
ErrInvalidSimulcast = psrpc.NewErrorf(psrpc.NotAcceptable, "invalid simulcast configuration")
ErrSimulcastTranscode = psrpc.NewErrorf(psrpc.NotAcceptable, "simulcast is not supported when transcoding")
)

func New(err string) error {
Expand Down
2 changes: 1 addition & 1 deletion pkg/whip/relay_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (h *WHIPRelayHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
}()

path := strings.TrimLeft(r.URL.Path, "/whip/")
path := strings.TrimLeft(r.URL.Path, "/whip/") //nolint
v := strings.Split(path, "/")
if len(v) != 2 {
err = psrpc.NewErrorf(psrpc.NotFound, "invalid path")
Expand Down
Loading

0 comments on commit 218e0c7

Please sign in to comment.