When bellSound changes, update the bellAudioElements src

Fixes #904
This commit is contained in:
npezza93
2017-08-19 16:55:24 -04:00
parent 9ab17dec80
commit 81cb30833f
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -485,6 +485,7 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
this.viewport.syncScrollArea();
break;
case 'tabStopWidth': this.setupStops(); break;
case 'bellSound': this.syncBellSound(); break;
case 'bellStyle': this.preloadBellSound(); break;
}
}
@@ -2303,6 +2304,12 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
this.helperContainer.removeChild(this.bellAudioElement);
}
}
private syncBellSound(): void {
if (this.soundBell() && this.bellAudioElement) {
this.bellAudioElement.setAttribute('src', this.options.bellSound);
}
}
}
/**
+1
View File
@@ -31,6 +31,7 @@ export type BooleanOption =
export type StringOption =
'cursorStyle' |
'bellStyle' |
'bellSound' |
'termName';
export type StringArrayOption = 'colors';
export type NumberOption =