Play self logon sound after welcome media setup
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
// Maintainer-controlled web client version.
|
// Maintainer-controlled web client version.
|
||||||
// Format: YYYY.MM.DD Rn (example: 2026.02.20 R2)
|
// Format: YYYY.MM.DD Rn (example: 2026.02.20 R2)
|
||||||
window.CHGRID_WEB_VERSION = "2026.02.28 R312";
|
window.CHGRID_WEB_VERSION = "2026.02.28 R313";
|
||||||
// Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid.
|
// Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid.
|
||||||
window.CHGRID_TIME_ZONE = "America/Detroit";
|
window.CHGRID_TIME_ZONE = "America/Detroit";
|
||||||
|
|||||||
@@ -1551,7 +1551,6 @@ async function handleAuthResult(message: Extract<IncomingMessage, { type: 'auth_
|
|||||||
dom.authPassword.value = '';
|
dom.authPassword.value = '';
|
||||||
dom.registerPassword.value = '';
|
dom.registerPassword.value = '';
|
||||||
dom.registerPasswordConfirm.value = '';
|
dom.registerPasswordConfirm.value = '';
|
||||||
void audio.playSample(SYSTEM_SOUND_URLS.logon, 1);
|
|
||||||
setConnectionStatus('Authenticated. Joining world...');
|
setConnectionStatus('Authenticated. Joining world...');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1871,6 +1870,7 @@ async function onSignalingMessage(message: IncomingMessage): Promise<void> {
|
|||||||
}
|
}
|
||||||
let restartAnnouncement: string | null = null;
|
let restartAnnouncement: string | null = null;
|
||||||
let connectedAnnouncement: string | null = null;
|
let connectedAnnouncement: string | null = null;
|
||||||
|
let playSelfLoginSound = false;
|
||||||
if (message.type === 'welcome') {
|
if (message.type === 'welcome') {
|
||||||
applyAuthPolicy(message.auth?.policy);
|
applyAuthPolicy(message.auth?.policy);
|
||||||
applyAuthPermissions(message.auth?.role, message.auth?.permissions);
|
applyAuthPermissions(message.auth?.role, message.auth?.permissions);
|
||||||
@@ -1883,6 +1883,7 @@ async function onSignalingMessage(message: IncomingMessage): Promise<void> {
|
|||||||
connectedAnnouncement = reconnectInFlight
|
connectedAnnouncement = reconnectInFlight
|
||||||
? `Reconnected to server. Version ${incomingVersion}.`
|
? `Reconnected to server. Version ${incomingVersion}.`
|
||||||
: `Connected to server. Version ${incomingVersion}.`;
|
: `Connected to server. Version ${incomingVersion}.`;
|
||||||
|
playSelfLoginSound = !reconnectInFlight;
|
||||||
if (
|
if (
|
||||||
!reloadScheduledForVersionMismatch &&
|
!reloadScheduledForVersionMismatch &&
|
||||||
APP_VERSION &&
|
APP_VERSION &&
|
||||||
@@ -1905,7 +1906,10 @@ async function onSignalingMessage(message: IncomingMessage): Promise<void> {
|
|||||||
}
|
}
|
||||||
await onAppMessage(message);
|
await onAppMessage(message);
|
||||||
if (message.type === 'welcome') {
|
if (message.type === 'welcome') {
|
||||||
void setupMediaAfterAuth();
|
await setupMediaAfterAuth();
|
||||||
|
if (playSelfLoginSound) {
|
||||||
|
void audio.playSample(SYSTEM_SOUND_URLS.logon, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
itemBehaviorRegistry.onUseResultMessage(message);
|
itemBehaviorRegistry.onUseResultMessage(message);
|
||||||
itemBehaviorRegistry.onWorldUpdate();
|
itemBehaviorRegistry.onWorldUpdate();
|
||||||
|
|||||||
Reference in New Issue
Block a user