aboutsummaryrefslogtreecommitdiff
path: root/ext/js/display
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/display')
-rw-r--r--ext/js/display/display.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/js/display/display.js b/ext/js/display/display.js
index b0805aca..3ae55da0 100644
--- a/ext/js/display/display.js
+++ b/ext/js/display/display.js
@@ -126,6 +126,7 @@ class Display extends EventDispatcher {
['addNoteTermKana', () => { this._tryAddAnkiNoteForSelectedDefinition('term-kana'); }],
['viewNote', () => { this._tryViewAnkiNoteForSelectedDefinition(); }],
['playAudio', () => { this._playAudioCurrent(); }],
+ ['playAudioFromSource', this._onHotkeyActionPlayAudioFromSource.bind(this)],
['copyHostSelection', () => this._copyHostSelection()],
['nextEntryDifferentDictionary', () => { this._focusEntryWithDifferentDictionary(1, true); }],
['previousEntryDifferentDictionary', () => { this._focusEntryWithDifferentDictionary(-1, true); }]
@@ -1830,6 +1831,10 @@ class Display extends EventDispatcher {
this._focusEntry(this._index + count * sign, true);
}
+ _onHotkeyActionPlayAudioFromSource(source) {
+ this._displayAudio.playAudio(this._index, 0, [source]);
+ }
+
_closeAllPopupMenus() {
for (const popupMenu of PopupMenu.openMenus) {
popupMenu.close();