+ {$t( + "%{name} has invited you to join their stream. When you're ready to join, click the button below.", + { name: hostName }, + )} +
+ > + ); +} diff --git a/app/i18n/en-US/guest-cam.json b/app/i18n/en-US/guest-cam.json index b361817cbf7d..5a64ece31b7e 100644 --- a/app/i18n/en-US/guest-cam.json +++ b/app/i18n/en-US/guest-cam.json @@ -26,5 +26,10 @@ "Don't share your invite link with anyone you don't want on your stream. You can invalidate an old link by generating a new one. Do not show this window on stream.": "Don't share your invite link with anyone you don't want on your stream. You can invalidate an old link by generating a new one. Do not show this window on stream.", "Start Collab Cam": "Start Collab Cam", "Collab Cam is not yet sending your video and audio to guests. Start Collab Cam?": "Collab Cam is not yet sending your video and audio to guests. Start Collab Cam?", - "Copy Link": "Copy Link" + "Copy Link": "Copy Link", + "You're about to join %{name}": "You're about to join %{name}", + "%{name} has invited you to join their stream. When you're ready to join, click the button below.": "%{name} has invited you to join their stream. When you're ready to join, click the button below.", + "Waiting for host to begin": "Waiting for host to begin", + "Connected To Host:": "Connected To Host:", + "You are connected as a guest using someone else's invite link. To leave, click the Disconnect button.": "You are connected as a guest using someone else's invite link. To leave, click the Disconnect button." } diff --git a/app/services/guest-cam/index.ts b/app/services/guest-cam/index.ts index 9c7768f5a87e..03812b88c698 100644 --- a/app/services/guest-cam/index.ts +++ b/app/services/guest-cam/index.ts @@ -69,6 +69,9 @@ interface IRoomResponse { interface IIoConfigResponse { url: string; token: string; + host: { + name: string; + }; } type TWebRTCSocketEvent = @@ -144,6 +147,17 @@ interface IGuestCamServiceState { audioSourceId: string; inviteHash: string; guestInfo: IGuest; + + /** + * If we are connecting to as a guest to someone else's stream, this will + * be set to the hash. + */ + joinAsGuestHash: string | null; + + /** + * Name of the host of the room + */ + hostName: string; } interface IInviteLink { @@ -213,6 +227,8 @@ export class GuestCamService extends StatefulService