@@ -485,6 +485,7 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
|
|||||||
this.viewport.syncScrollArea();
|
this.viewport.syncScrollArea();
|
||||||
break;
|
break;
|
||||||
case 'tabStopWidth': this.setupStops(); break;
|
case 'tabStopWidth': this.setupStops(); break;
|
||||||
|
case 'bellSound': this.syncBellSound(); break;
|
||||||
case 'bellStyle': this.preloadBellSound(); break;
|
case 'bellStyle': this.preloadBellSound(); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2303,6 +2304,12 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
|
|||||||
this.helperContainer.removeChild(this.bellAudioElement);
|
this.helperContainer.removeChild(this.bellAudioElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private syncBellSound(): void {
|
||||||
|
if (this.soundBell() && this.bellAudioElement) {
|
||||||
|
this.bellAudioElement.setAttribute('src', this.options.bellSound);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ export type BooleanOption =
|
|||||||
export type StringOption =
|
export type StringOption =
|
||||||
'cursorStyle' |
|
'cursorStyle' |
|
||||||
'bellStyle' |
|
'bellStyle' |
|
||||||
|
'bellSound' |
|
||||||
'termName';
|
'termName';
|
||||||
export type StringArrayOption = 'colors';
|
export type StringArrayOption = 'colors';
|
||||||
export type NumberOption =
|
export type NumberOption =
|
||||||
|
|||||||
Reference in New Issue
Block a user