Make new path for signalling v1.5 support. (#4180)

* Make new path for signalling v1.5 support.

To be able to support newer clients to interact with older servers, move
signalling v1.5 to new path (`/rtc1`). On the new path, `join_request`
is required and single peer connection is used.

With the existing path `/rtc`, single peer connection is still supported
if `join_request` is used.

Newer clients connecting to old server should follow
1. Try new path WebSocket
2. If that fails, try new path validate at `/rtc1/validate`.
3. If the above gets a 404 which will happen with older server, revert
   back to old path and signalling 1.0.

Open to suggestions on path name.

* test on both paths

* change path from /rtc1 -> /rtc/v1

* test all rtc service path combinations
This commit is contained in:
Raja Subramanian
2025-12-20 01:02:22 +05:30
committed by GitHub
parent 32cd0370c7
commit cd99fec2e7
10 changed files with 249 additions and 160 deletions
+12 -12
View File
@@ -61,12 +61,12 @@ func TestMultiNodeUpdateRoomMetadata(t *testing.T) {
})
t.Run("when room has a participant", func(t *testing.T) {
for _, useSinglePeerConnection := range []bool{false, true} {
t.Run(fmt.Sprintf("singlePeerConnection=%+v", useSinglePeerConnection), func(t *testing.T) {
for _, testRTCServicePath := range testRTCServicePaths {
t.Run(fmt.Sprintf("testRTCServicePath=%s", testRTCServicePath.String()), func(t *testing.T) {
_, _, finish := setupMultiNodeTest("TestMultiNodeUpdateRoomMetadata_with_participant")
defer finish()
c1 := createRTCClient("c1", defaultServerPort, useSinglePeerConnection, nil)
c1 := createRTCClient("c1", defaultServerPort, testRTCServicePath, nil)
waitUntilConnected(t, c1)
defer c1.Stop()
@@ -93,12 +93,12 @@ func TestMultiNodeRemoveParticipant(t *testing.T) {
return
}
for _, useSinglePeerConnection := range []bool{false, true} {
t.Run(fmt.Sprintf("singlePeerConnection=%+v", useSinglePeerConnection), func(t *testing.T) {
for _, testRTCServicePath := range testRTCServicePaths {
t.Run(fmt.Sprintf("testRTCServicePath=%s", testRTCServicePath.String()), func(t *testing.T) {
_, _, finish := setupMultiNodeTest("TestMultiNodeRemoveParticipant")
defer finish()
c1 := createRTCClient("mn_remove_participant", defaultServerPort, useSinglePeerConnection, nil)
c1 := createRTCClient("mn_remove_participant", defaultServerPort, testRTCServicePath, nil)
defer c1.Stop()
waitUntilConnected(t, c1)
@@ -121,12 +121,12 @@ func TestMultiNodeRemoveParticipant(t *testing.T) {
// update participant metadata
func TestMultiNodeUpdateParticipantMetadata(t *testing.T) {
for _, useSinglePeerConnection := range []bool{false, true} {
t.Run(fmt.Sprintf("singlePeerConnection=%+v", useSinglePeerConnection), func(t *testing.T) {
for _, testRTCServicePath := range testRTCServicePaths {
t.Run(fmt.Sprintf("testRTCServicePath=%s", testRTCServicePath.String()), func(t *testing.T) {
_, _, finish := setupMultiNodeTest("TestMultiNodeUpdateParticipantMetadata")
defer finish()
c1 := createRTCClient("update_participant_metadata", defaultServerPort, useSinglePeerConnection, nil)
c1 := createRTCClient("update_participant_metadata", defaultServerPort, testRTCServicePath, nil)
defer c1.Stop()
waitUntilConnected(t, c1)
@@ -144,13 +144,13 @@ func TestMultiNodeUpdateParticipantMetadata(t *testing.T) {
// admin mute published track
func TestMultiNodeMutePublishedTrack(t *testing.T) {
for _, useSinglePeerConnection := range []bool{false, true} {
t.Run(fmt.Sprintf("singlePeerConnection=%+v", useSinglePeerConnection), func(t *testing.T) {
for _, testRTCServicePath := range testRTCServicePaths {
t.Run(fmt.Sprintf("testRTCServicePath=%s", testRTCServicePath.String()), func(t *testing.T) {
_, _, finish := setupMultiNodeTest("TestMultiNodeMutePublishedTrack")
defer finish()
identity := "mute_published_track"
c1 := createRTCClient(identity, defaultServerPort, useSinglePeerConnection, nil)
c1 := createRTCClient(identity, defaultServerPort, testRTCServicePath, nil)
defer c1.Stop()
waitUntilConnected(t, c1)