Updated room URLs to include 'room/' prefix for access links
This commit is contained in:
parent
5974f2417e
commit
b7453f3271
@ -224,8 +224,8 @@ export class RoomService {
|
|||||||
numParticipants,
|
numParticipants,
|
||||||
maxParticipants,
|
maxParticipants,
|
||||||
expirationDate,
|
expirationDate,
|
||||||
moderatorRoomUrl: `${baseUrl}/${roomName}?secret=${secureUid(10)}`,
|
moderatorRoomUrl: `${baseUrl}/room/${roomName}?secret=${secureUid(10)}`,
|
||||||
publisherRoomUrl: `${baseUrl}/${roomName}?secret=${secureUid(10)}`,
|
publisherRoomUrl: `${baseUrl}/room/${roomName}?secret=${secureUid(10)}`,
|
||||||
preferences
|
preferences
|
||||||
};
|
};
|
||||||
return openviduRoom;
|
return openviduRoom;
|
||||||
|
|||||||
@ -12,7 +12,7 @@ export const checkParticipantNameGuard: CanActivateFn = async (route, state) =>
|
|||||||
// Check if participant name exists in the service
|
// Check if participant name exists in the service
|
||||||
if (!hasParticipantName) {
|
if (!hasParticipantName) {
|
||||||
// Redirect to a page where the participant can input their participant name
|
// Redirect to a page where the participant can input their participant name
|
||||||
return router.navigate([`${roomName}/participant-name`], {
|
return router.navigate([`room/${roomName}/participant-name`], {
|
||||||
queryParams: { originUrl: state.url, t: Date.now() },
|
queryParams: { originUrl: state.url, t: Date.now() },
|
||||||
skipLocationChange: true
|
skipLocationChange: true
|
||||||
});
|
});
|
||||||
|
|||||||
@ -76,7 +76,7 @@ export const baseRoutes: Routes = [
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: ':room-name',
|
path: 'room/:room-name',
|
||||||
component: VideoRoomComponent,
|
component: VideoRoomComponent,
|
||||||
canActivate: [
|
canActivate: [
|
||||||
applicationModeGuard,
|
applicationModeGuard,
|
||||||
@ -87,7 +87,7 @@ export const baseRoutes: Routes = [
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: ':room-name/participant-name',
|
path: 'room/:room-name/participant-name',
|
||||||
component: ParticipantNameFormComponent
|
component: ParticipantNameFormComponent
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -152,9 +152,11 @@ export class HomeComponent implements OnInit, OnDestroy {
|
|||||||
const isFirstParticipant = room.numParticipants === 0;
|
const isFirstParticipant = room.numParticipants === 0;
|
||||||
const accessRoomUrl = new URL(isFirstParticipant ? room.moderatorRoomUrl : room.publisherRoomUrl);
|
const accessRoomUrl = new URL(isFirstParticipant ? room.moderatorRoomUrl : room.publisherRoomUrl);
|
||||||
|
|
||||||
|
|
||||||
const secret = accessRoomUrl.searchParams.get('secret');
|
const secret = accessRoomUrl.searchParams.get('secret');
|
||||||
const path = accessRoomUrl.pathname;
|
const roomName = accessRoomUrl.pathname;
|
||||||
this.router.navigate([path], { queryParams: { secret } });
|
|
||||||
|
this.router.navigate([roomName], { queryParams: { secret } });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error creating room ', error);
|
console.error('Error creating room ', error);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user