Skip to content

Commit

Permalink
Initial add of <main/> element
Browse files Browse the repository at this point in the history
for transcript chunks
  • Loading branch information
mrose17 committed Dec 13, 2023
1 parent f6b8c9d commit 10ac92e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
check your browser settings, and also verify it's not blocked by a
third-party extension.
</noscript>
<div id="root"></div>
<div id="root">
<main style="visibility=hidden"></main>
</div>
</body>
</html>
7 changes: 7 additions & 0 deletions src/jitsi/event-handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,5 +292,12 @@ export const transcriptionChunkReceivedHander = {
transcript += chunk.final || chunk.stable || chunk.unstable;
}
console.log(`transcript: ${transcript}`);

const mainNode = document.getElementById("main");
if (mainNode) {
mainNode.innerHTML = `<pre>${transcript
.replace(/</g, "&lt;")
.replace(/&/g, "&amp;")}</pre>`;
}
},
};

0 comments on commit 10ac92e

Please sign in to comment.