Fixed the audio mute states
This commit is contained in:
parent
6f56150e0b
commit
8e5966c04c
2 changed files with 16 additions and 7 deletions
|
@ -715,7 +715,9 @@ export class ConnectionHandler {
|
||||||
if(this.serverConnection.connected()) {
|
if(this.serverConnection.connected()) {
|
||||||
let localClientUpdates: {
|
let localClientUpdates: {
|
||||||
client_output_hardware?: boolean,
|
client_output_hardware?: boolean,
|
||||||
client_input_hardware?: boolean
|
client_input_hardware?: boolean,
|
||||||
|
client_input_muted?: boolean,
|
||||||
|
client_output_muted?: boolean
|
||||||
} = {};
|
} = {};
|
||||||
|
|
||||||
const currentChannel = this.getClient().currentChannel();
|
const currentChannel = this.getClient().currentChannel();
|
||||||
|
@ -751,6 +753,12 @@ export class ConnectionHandler {
|
||||||
shouldRecord = codecSupportEncode && !!voiceConnection.voiceRecorder()?.input;
|
shouldRecord = codecSupportEncode && !!voiceConnection.voiceRecorder()?.input;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
localClientUpdates.client_output_muted = this.client_status.output_muted;
|
||||||
|
localClientUpdates.client_input_muted = this.client_status.input_muted;
|
||||||
|
if(localClientUpdates.client_input_muted || localClientUpdates.client_output_muted) {
|
||||||
|
shouldRecord = false;
|
||||||
|
}
|
||||||
|
|
||||||
/* update our owns client properties */
|
/* update our owns client properties */
|
||||||
{
|
{
|
||||||
const currentClientProperties = this.getClient().properties;
|
const currentClientProperties = this.getClient().properties;
|
||||||
|
|
|
@ -47,6 +47,7 @@ import "./update/UpdaterWeb";
|
||||||
import ContextMenuEvent = JQuery.ContextMenuEvent;
|
import ContextMenuEvent = JQuery.ContextMenuEvent;
|
||||||
import {defaultConnectProfile, findConnectProfile} from "tc-shared/profiles/ConnectionProfile";
|
import {defaultConnectProfile, findConnectProfile} from "tc-shared/profiles/ConnectionProfile";
|
||||||
|
|
||||||
|
let preventWelcomeUI = false;
|
||||||
async function initialize() {
|
async function initialize() {
|
||||||
try {
|
try {
|
||||||
await i18n.initialize();
|
await i18n.initialize();
|
||||||
|
@ -126,8 +127,8 @@ export function handle_connect_request(properties: ConnectRequestData, connectio
|
||||||
const password = properties.password ? properties.password.value : "";
|
const password = properties.password ? properties.password.value : "";
|
||||||
const password_hashed = properties.password ? properties.password.hashed : false;
|
const password_hashed = properties.password ? properties.password.hashed : false;
|
||||||
|
|
||||||
debugger;
|
|
||||||
if(profile && profile.valid()) {
|
if(profile && profile.valid()) {
|
||||||
|
settings.changeGlobal(Settings.KEY_USER_IS_NEW, false);
|
||||||
connection.startConnection(properties.address, profile, true, {
|
connection.startConnection(properties.address, profile, true, {
|
||||||
nickname: username,
|
nickname: username,
|
||||||
password: password.length > 0 ? {
|
password: password.length > 0 ? {
|
||||||
|
@ -302,11 +303,9 @@ function main() {
|
||||||
//setTimeout(() => spawnPermissionEditorModal(server_connections.active_connection()), 3000);
|
//setTimeout(() => spawnPermissionEditorModal(server_connections.active_connection()), 3000);
|
||||||
//setTimeout(() => spawnGroupCreate(server_connections.active_connection(), "server"), 3000);
|
//setTimeout(() => spawnGroupCreate(server_connections.active_connection(), "server"), 3000);
|
||||||
|
|
||||||
if(server_connections.active_connection().getServerConnection().getConnectionState() === ConnectionState.UNCONNECTED) {
|
if(settings.static_global(Settings.KEY_USER_IS_NEW) && !preventWelcomeUI) {
|
||||||
if(settings.static_global(Settings.KEY_USER_IS_NEW)) {
|
const modal = openModalNewcomer();
|
||||||
const modal = openModalNewcomer();
|
modal.close_listener.push(() => settings.changeGlobal(Settings.KEY_USER_IS_NEW, false));
|
||||||
modal.close_listener.push(() => settings.changeGlobal(Settings.KEY_USER_IS_NEW, false));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//spawnVideoPopout(server_connections.active_connection(), "https://www.youtube.com/watch?v=9683D18fyvs");
|
//spawnVideoPopout(server_connections.active_connection(), "https://www.youtube.com/watch?v=9683D18fyvs");
|
||||||
|
@ -381,6 +380,7 @@ const task_connect_handler: loader.Task = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
preventWelcomeUI = true;
|
||||||
loader.register_task(loader.Stage.LOADED, {
|
loader.register_task(loader.Stage.LOADED, {
|
||||||
priority: 0,
|
priority: 0,
|
||||||
function: async () => handle_connect_request(connect_data, server_connections.active_connection() || server_connections.spawn_server_connection()),
|
function: async () => handle_connect_request(connect_data, server_connections.active_connection() || server_connections.spawn_server_connection()),
|
||||||
|
@ -394,6 +394,7 @@ const task_connect_handler: loader.Task = {
|
||||||
};
|
};
|
||||||
|
|
||||||
chandler.callback_execute = data => {
|
chandler.callback_execute = data => {
|
||||||
|
preventWelcomeUI = true;
|
||||||
handle_connect_request(data, server_connections.spawn_server_connection());
|
handle_connect_request(data, server_connections.spawn_server_connection());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue