diff options
Diffstat (limited to 'BrowserSource')
| -rw-r--r-- | BrowserSource/index.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/BrowserSource/index.html b/BrowserSource/index.html new file mode 100644 index 0000000..decdba2 --- /dev/null +++ b/BrowserSource/index.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<html> + <head> + <title>TaSTT</title> + <script src="https://code.jquery.com/jquery-3.6.3.min.js"></script> + </head> + <body> + <div id="transcript"></div> + <script> + function getTranscript() { + $.ajax({ + // TODO(yum) parameterize the port + url: 'http://localhost:9517/api/transcript', + method: 'GET', + dataType: 'json', + success: function(data) { + var transcript = data.transcript; + $('#transcript').html(transcript); + }, + error: function(jqXHR, textStatus, errorThrown) { + console.error('Error getting transcript: ', textStatus, errorThrown); + } + }); + } + setInterval(getTranscript, /*interval_ms=*/100); + </script> + </body> +</html> |
