|
@@ -100,7 +100,7 @@ function _endpointMessageReceived({ dispatch, getState }: IStore, next: Function
|
100
|
100
|
const language
|
101
|
101
|
= state['features/base/conference'].conference
|
102
|
102
|
?.getLocalParticipantProperty(P_NAME_TRANSLATION_LANGUAGE);
|
103
|
|
- const { skipInterimTranscriptions } = state['features/base/config'].testing ?? {};
|
|
103
|
+ const { dumpTranscript, skipInterimTranscriptions } = state['features/base/config'].testing ?? {};
|
104
|
104
|
|
105
|
105
|
const transcriptMessageID = json.message_id;
|
106
|
106
|
const { name, id, avatar_url: avatarUrl } = json.participant;
|
|
@@ -146,6 +146,22 @@ function _endpointMessageReceived({ dispatch, getState }: IStore, next: Function
|
146
|
146
|
participant,
|
147
|
147
|
...txt
|
148
|
148
|
});
|
|
149
|
+
|
|
150
|
+ // Dump transcript in a <transcript> element for debugging purposes.
|
|
151
|
+ if (!json.is_interim && dumpTranscript) {
|
|
152
|
+ try {
|
|
153
|
+ let elem = document.body.getElementsByTagName('transcript')[0];
|
|
154
|
+
|
|
155
|
+ if (!elem) {
|
|
156
|
+ elem = document.createElement('transcript');
|
|
157
|
+ document.body.appendChild(elem);
|
|
158
|
+ }
|
|
159
|
+
|
|
160
|
+ elem.append(`${new Date(json.timestamp).toISOString()} ${participant.name}: ${text}`);
|
|
161
|
+ } catch (_) {
|
|
162
|
+ // Ignored.
|
|
163
|
+ }
|
|
164
|
+ }
|
149
|
165
|
}
|
150
|
166
|
|
151
|
167
|
// If the suer is not requesting transcriptions just bail.
|