scribe-widget 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/scribe-widget.es.js +9557 -9576
- package/dist/scribe-widget.umd.js +371 -371
- package/package.json +1 -1
- package/src/hooks/useScribeSession.ts +10 -7
package/package.json
CHANGED
|
@@ -25,11 +25,14 @@ export function useScribeSession(config: ScribeWidgetConfig): UseScribeSessionRe
|
|
|
25
25
|
const startTimeRef = useRef<number>(0);
|
|
26
26
|
const pausedTimeRef = useRef<number>(0);
|
|
27
27
|
|
|
28
|
-
const log = useCallback(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
const log = useCallback(
|
|
29
|
+
(...args: unknown[]) => {
|
|
30
|
+
if (config.debug) {
|
|
31
|
+
console.log('[EkaScribe]', ...args);
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
[config.debug]
|
|
35
|
+
);
|
|
33
36
|
|
|
34
37
|
// Initialize SDK client only when baseUrl is provided
|
|
35
38
|
useEffect(() => {
|
|
@@ -88,7 +91,7 @@ export function useScribeSession(config: ScribeWidgetConfig): UseScribeSessionRe
|
|
|
88
91
|
const requestMicrophonePermission = async (): Promise<boolean> => {
|
|
89
92
|
try {
|
|
90
93
|
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
|
|
91
|
-
stream.getTracks().forEach(track => track.stop());
|
|
94
|
+
stream.getTracks().forEach((track) => track.stop());
|
|
92
95
|
return true;
|
|
93
96
|
} catch (error) {
|
|
94
97
|
log('Microphone permission denied', error);
|
|
@@ -127,7 +130,7 @@ export function useScribeSession(config: ScribeWidgetConfig): UseScribeSessionRe
|
|
|
127
130
|
setState('recording');
|
|
128
131
|
|
|
129
132
|
await clientRef.current.startRecording({
|
|
130
|
-
templates: config.templates || ['
|
|
133
|
+
templates: config.templates || ['eka_emr_template'],
|
|
131
134
|
languageHint: config.languageHint,
|
|
132
135
|
});
|
|
133
136
|
|