feat(names): Add dynamic name generation for peer

This commit is contained in:
zarazaex69
2026-04-09 16:34:32 +03:00
parent ca571e4294
commit 2cb4eb2dfe
4 changed files with 78 additions and 2 deletions

View File

@@ -14,6 +14,7 @@ import (
"github.com/pion/webrtc/v4"
"github.com/openlibrecommunity/olcrtc/internal/crypto"
"github.com/openlibrecommunity/olcrtc/internal/mux"
"github.com/openlibrecommunity/olcrtc/internal/names"
"github.com/openlibrecommunity/olcrtc/internal/telemost"
)
@@ -66,7 +67,7 @@ func Run(roomURL, keyHex string) error {
return s.peer.Send(encrypted)
})
peer, err := telemost.NewPeer(roomURL, "OlcRTC-Server", s.onData)
peer, err := telemost.NewPeer(roomURL, names.Generate(), s.onData)
if err != nil {
return err
}