add multilingual, language & task option in Chrome extension

This commit is contained in:
makaveli10
2023-07-17 22:13:03 +05:30
parent 8e9baaea8f
commit f6dce0e008
5 changed files with 196 additions and 10 deletions
+7 -2
View File
@@ -79,11 +79,16 @@ async function startRecord(option) {
stream.oninactive = () => {
window.close();
};
const socket = new WebSocket(`ws://${option.host}:${option.port}/`);
let isServerReady = false;
socket.onopen = function(e) {
socket.send("handshake");
socket.send(
JSON.stringify({
multilingual: option.multilingual,
language: option.language,
task: option.task
})
);
};
socket.onmessage = async (event) => {