Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't play audio after the loading screen has been hidden #6091

Merged
merged 2 commits into from
Jun 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/hub.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,10 +574,25 @@ function handleHubChannelJoined(entryManager, hubChannel, messageDispatch, data)

console.log(`Dialog host: ${hub.host}:${hub.port}`);

// Mute media until the scene has been fully loaded.
// We intentionally want voice to be unmuted.
const { globalMediaVolume } = APP.store.state.preferences;
APP.store.update({
preferences: {
globalMediaVolume: 0
}
});
remountUI({
messageDispatch: messageDispatch,
onSendMessage: messageDispatch.dispatch,
onLoaded: () => store.executeOnLoadActions(scene),
onLoaded: () => {
APP.store.update({
preferences: {
globalMediaVolume
}
});
store.executeOnLoadActions(scene);
},
onMediaSearchResultEntrySelected: (entry, selectAction) =>
scene.emit("action_selected_media_result_entry", { entry, selectAction }),
onMediaSearchCancelled: entry => scene.emit("action_media_search_cancelled", entry),
Expand Down
Loading