summaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/audio-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-09-26 13:41:26 -0400
committerGitHub <noreply@github.com>2020-09-26 13:41:26 -0400
commit0b51488f1f639885b518fabf683b70db577afa67 (patch)
tree5fca858efdecb345e8bcabec5ff4f727c7f1dc20 /ext/bg/js/settings/audio-controller.js
parent22932e02cbd1fb16d0180c79a3c9b4d1790fbfda (diff)
Audio system refactor (#858)
* Refactor AudioUriBuilder * Add downloadAudio function * Refactor AudioSystem * Update API usage * Rename file * Update scripts * Add prepare calls
Diffstat (limited to 'ext/bg/js/settings/audio-controller.js')
-rw-r--r--ext/bg/js/settings/audio-controller.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/bg/js/settings/audio-controller.js b/ext/bg/js/settings/audio-controller.js
index d389acb5..bd7951f7 100644
--- a/ext/bg/js/settings/audio-controller.js
+++ b/ext/bg/js/settings/audio-controller.js
@@ -22,17 +22,16 @@
class AudioController {
constructor(settingsController) {
this._settingsController = settingsController;
- this._audioSystem = null;
+ this._audioSystem = new AudioSystem({
+ cacheSize: 0
+ });
this._audioSourceContainer = null;
this._audioSourceAddButton = null;
this._audioSourceEntries = [];
}
async prepare() {
- this._audioSystem = new AudioSystem({
- audioUriBuilder: null,
- useCache: true
- });
+ this._audioSystem.prepare();
this._audioSourceContainer = document.querySelector('.audio-source-list');
this._audioSourceAddButton = document.querySelector('.audio-source-add');