1
1
/*! (C) The Hyperaudio Project. MIT @license: en.wikipedia.org/wiki/MIT_License. */
2
- /*! Version 0.0.5 (wp patch) */
2
+ /*! Version 0.0.6 (caption editor patch) */
3
3
4
4
class WhisperService extends HTMLElement {
5
5
@@ -47,12 +47,13 @@ customElements.define('client-whisper-service', WhisperService);
47
47
48
48
function loadWhisperClient ( modal , workerBaseUrl ) {
49
49
50
+ console . log ( "loading whisper client" ) ;
51
+
50
52
const fileUploadBtn = document . getElementById ( "file-input" ) ;
51
53
const formSubmitBtn = document . getElementById ( "form-submit-btn" ) ;
52
54
const modelNameSelectionInput = document . getElementById ( "model-name-input" ) ;
53
55
const videoPlayer = document . getElementById ( "hyperplayer" ) ;
54
- const resultsContainer = document . getElementById ( "hypertranscript" ) ;
55
- const loadingMessageContainer = document . getElementById ( "hypertranscript" ) ;
56
+
56
57
57
58
if ( workerBaseUrl === undefined || workerBaseUrl === null ) {
58
59
workerBaseUrl = "./" ;
@@ -113,6 +114,7 @@ function loadWhisperClient(modal, workerBaseUrl) {
113
114
}
114
115
} ) ;
115
116
117
+ const resultsContainer = document . getElementById ( "hypertranscript" ) ;
116
118
resultsContainer . innerHTML = "<article>\n <section>\n <p>\n" + hypertranscript + " </p>\n </section>\n</article>\n" ;
117
119
118
120
const initEvent = new CustomEvent ( 'hyperaudioInit' ) ;
@@ -139,6 +141,11 @@ function loadWhisperClient(modal, workerBaseUrl) {
139
141
document . querySelector ( '#transcribe-dialog' ) . close ( ) ;
140
142
}
141
143
144
+ const loadingMessageContainer = document . getElementById ( "hypertranscript" ) ;
145
+
146
+ console . log ( "show spinner" ) ;
147
+ console . log ( loadingMessageContainer ) ;
148
+
142
149
loadingMessageContainer . innerHTML = '<div class="vertically-centre"><center class="transcribing-msg">Transcribing.... </center><br/><img src="' + transcribingSvg + '" width="50" alt="transcribing" style="margin: auto; display: block;"></div>' ;
143
150
}
144
151
0 commit comments