From fd51d0acf380f0a2008248e76d7d1705da09dd6c Mon Sep 17 00:00:00 2001 From: npezza93 Date: Wed, 9 Aug 2017 23:17:32 -0400 Subject: [PATCH] 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. --- src/InputHandler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/InputHandler.ts b/src/InputHandler.ts index 4b633e7d..6ee081d2 100644 --- a/src/InputHandler.ts +++ b/src/InputHandler.ts @@ -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;