diff --git a/src/snek/static/chat-input.js b/src/snek/static/chat-input.js index 8b1b762..ff8972d 100644 --- a/src/snek/static/chat-input.js +++ b/src/snek/static/chat-input.js @@ -269,7 +269,14 @@ textToLeetAdvanced(text) { this.appendChild(this.textarea); this.ttsButton = document.createElement("stt-button"); - + + this.snekSpeaker = document.createElement("snek-speaker"); + this.appendChild(this.snekSpeaker); + + this.ttsButton.addEventListener("click", (e) => { + this.snekSpeaker.enable() + }); + this.appendChild(this.ttsButton); this.uploadButton = document.createElement("upload-button"); this.uploadButton.setAttribute("channel", this.channelUid); diff --git a/src/snek/templates/app.html b/src/snek/templates/app.html index 050712f..7069816 100644 --- a/src/snek/templates/app.html +++ b/src/snek/templates/app.html @@ -7,8 +7,8 @@