Preload bell audio

Allow the bellSound to be more easily configurable. You can pass false
to the bellSound and no sound will be played or you can pass it any
source you'd like.
This commit is contained in:
npezza93
2017-08-16 20:39:26 -04:00
parent 0eab4d68f6
commit fd51d0acf3
+2 -2
View File
@@ -108,8 +108,8 @@ export class InputHandler implements IInputHandler {
*/
public bell(): void {
this._terminal.emit('bell');
if (this._terminal.playDefaultBell) {
(new Audio(Bell)).play();
if (this._terminal.bellSound) {
this._terminal.bellAudioElement.play();
}
if (!this._terminal.visualBell) {
return;