reuse the same Participant ID within the same room/session

This commit is contained in:
David Zhao
2021-01-28 01:14:06 -08:00
parent 0e48711e4b
commit fe83baa662
10 changed files with 232 additions and 17 deletions
+12 -1
View File
@@ -1,8 +1,12 @@
package service
import (
"github.com/google/wire"
"net/http"
"github.com/google/wire"
"go.uber.org/zap"
"github.com/livekit/livekit-server/pkg/logger"
"github.com/livekit/livekit-server/pkg/routing"
"github.com/livekit/livekit-server/pkg/rtc"
"github.com/livekit/livekit-server/proto/livekit"
@@ -21,3 +25,10 @@ var ServiceSet = wire.NewSet(
func externalIpFromNode(currentNode routing.LocalNode) rtc.ExternalIP {
return rtc.ExternalIP(currentNode.Ip)
}
func handleError(w http.ResponseWriter, status int, msg string) {
l := logger.Desugar().WithOptions(zap.AddCallerSkip(1))
l.Debug("error handling request", zap.String("error", msg), zap.Int("status", status))
w.WriteHeader(status)
w.Write([]byte(msg))
}