Removed the voice echo test for the native client
parent
987db2cebc
commit
9dd8eec7ae
|
@ -415,6 +415,7 @@ export class ConnectionHandler {
|
||||||
logError(LogCategory.CLIENT, tr("Failed to start local echo: %o"), error);
|
logError(LogCategory.CLIENT, tr("Failed to start local echo: %o"), error);
|
||||||
});
|
});
|
||||||
*/
|
*/
|
||||||
|
if(__build.target === "web") {
|
||||||
this.serverFeatures.awaitFeatures().then(result => {
|
this.serverFeatures.awaitFeatures().then(result => {
|
||||||
if(!result) {
|
if(!result) {
|
||||||
return;
|
return;
|
||||||
|
@ -423,6 +424,7 @@ export class ConnectionHandler {
|
||||||
spawnEchoTestModal(this);
|
spawnEchoTestModal(this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.setInputHardwareState(this.getVoiceRecorder() ? InputHardwareState.VALID : InputHardwareState.MISSING);
|
this.setInputHardwareState(this.getVoiceRecorder() ? InputHardwareState.VALID : InputHardwareState.MISSING);
|
||||||
}
|
}
|
||||||
|
@ -726,6 +728,8 @@ export class ConnectionHandler {
|
||||||
/* Don't update the voice state, firstly await for us to be fully connected */
|
/* Don't update the voice state, firstly await for us to be fully connected */
|
||||||
} else if(voiceConnection.getConnectionState() !== VoiceConnectionStatus.Connected) {
|
} else if(voiceConnection.getConnectionState() !== VoiceConnectionStatus.Connected) {
|
||||||
/* We're currently not having a valid voice connection. We need to await that. */
|
/* We're currently not having a valid voice connection. We need to await that. */
|
||||||
|
localClientUpdates.client_input_hardware = false;
|
||||||
|
localClientUpdates.client_output_hardware = false;
|
||||||
} else {
|
} else {
|
||||||
let codecSupportEncode = voiceConnection.encodingSupported(currentChannel.properties.channel_codec);
|
let codecSupportEncode = voiceConnection.encodingSupported(currentChannel.properties.channel_codec);
|
||||||
let codecSupportDecode = voiceConnection.decodingSupported(currentChannel.properties.channel_codec);
|
let codecSupportDecode = voiceConnection.decodingSupported(currentChannel.properties.channel_codec);
|
||||||
|
@ -753,6 +757,7 @@ export class ConnectionHandler {
|
||||||
shouldRecord = codecSupportEncode && !!voiceConnection.voiceRecorder()?.input;
|
shouldRecord = codecSupportEncode && !!voiceConnection.voiceRecorder()?.input;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
localClientUpdates.client_input_hardware = localClientUpdates.client_input_hardware && this.inputHardwareState === InputHardwareState.VALID;
|
||||||
localClientUpdates.client_output_muted = this.client_status.output_muted;
|
localClientUpdates.client_output_muted = this.client_status.output_muted;
|
||||||
localClientUpdates.client_input_muted = this.client_status.input_muted;
|
localClientUpdates.client_input_muted = this.client_status.input_muted;
|
||||||
if(localClientUpdates.client_input_muted || localClientUpdates.client_output_muted) {
|
if(localClientUpdates.client_input_muted || localClientUpdates.client_output_muted) {
|
||||||
|
@ -787,6 +792,7 @@ export class ConnectionHandler {
|
||||||
/* update the recorder state */
|
/* update the recorder state */
|
||||||
const currentInput = voiceConnection.voiceRecorder()?.input;
|
const currentInput = voiceConnection.voiceRecorder()?.input;
|
||||||
if(currentInput) {
|
if(currentInput) {
|
||||||
|
console.error("Should record: %o | %o", shouldRecord, this.getInputHardwareState());
|
||||||
if(shouldRecord || this.echoTestRunning) {
|
if(shouldRecord || this.echoTestRunning) {
|
||||||
if(this.getInputHardwareState() !== InputHardwareState.START_FAILED) {
|
if(this.getInputHardwareState() !== InputHardwareState.START_FAILED) {
|
||||||
this.startVoiceRecorder(Date.now() - this._last_record_error_popup > 10 * 1000).then(() => {
|
this.startVoiceRecorder(Date.now() - this._last_record_error_popup > 10 * 1000).then(() => {
|
||||||
|
@ -847,10 +853,14 @@ export class ConnectionHandler {
|
||||||
|
|
||||||
async startVoiceRecorder(notifyError: boolean) : Promise<{ state: "success" | "no-input" } | { state: "error", message: string }> {
|
async startVoiceRecorder(notifyError: boolean) : Promise<{ state: "success" | "no-input" } | { state: "error", message: string }> {
|
||||||
const input = this.getVoiceRecorder()?.input;
|
const input = this.getVoiceRecorder()?.input;
|
||||||
|
console.error("Input: %o", input);
|
||||||
if(!input) {
|
if(!input) {
|
||||||
|
console.error("NO - INPUT");
|
||||||
return { state: "no-input" };
|
return { state: "no-input" };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.error("XXX");
|
||||||
|
console.log("Input statuis: %o", input.currentState());
|
||||||
if(input.currentState() === InputState.PAUSED && this.connection_state === ConnectionState.CONNECTED) {
|
if(input.currentState() === InputState.PAUSED && this.connection_state === ConnectionState.CONNECTED) {
|
||||||
try {
|
try {
|
||||||
const result = await input.start();
|
const result = await input.start();
|
||||||
|
|
|
@ -27,8 +27,9 @@ export default function(program: ts.Program, config?: Config) : (context: ts.Tra
|
||||||
|
|
||||||
const target = path.isAbsolute(process_config.target_file) ? process_config.target_file : path.join(base_path, process_config.target_file);
|
const target = path.isAbsolute(process_config.target_file) ? process_config.target_file : path.join(base_path, process_config.target_file);
|
||||||
if(process_config.target_file) {
|
if(process_config.target_file) {
|
||||||
if(process_config.verbose)
|
if(process_config.verbose) {
|
||||||
console.log("Writing translation file to " + target);
|
console.log("Writing translation file to " + target);
|
||||||
|
}
|
||||||
|
|
||||||
mkdirp.sync(path.dirname(target));
|
mkdirp.sync(path.dirname(target));
|
||||||
writeFileSync(target, JSON.stringify(translations, null, 2));
|
writeFileSync(target, JSON.stringify(translations, null, 2));
|
||||||
|
|
Loading…
Reference in New Issue