@eka-care/medassist-core 1.0.16 → 1.0.17
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Audio.d.ts","sourceRoot":"","sources":["../../../src/media/audio/Audio.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EAExB,MAAM,SAAS,CAAC;AAGjB,qBAAa,YAAY;IACvB,OAAO,CAAC,aAAa,CAA8B;IACnD,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,kBAAkB,CAAa;IACvC,OAAO,CAAC,cAAc,CAA8C;IAEpE,OAAO,CAAC,MAAM,CAAc;IAE5B,OAAO,CAAC,WAAW,CAAkC;IACrD,OAAO,CAAC,YAAY,CAAmC;IACvD,OAAO,CAAC,iBAAiB,CAAS;gBAEtB,MAAM,GAAE,OAAO,CAAC,WAAW,CAAM;YAU/B,2BAA2B;
|
|
1
|
+
{"version":3,"file":"Audio.d.ts","sourceRoot":"","sources":["../../../src/media/audio/Audio.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EAExB,MAAM,SAAS,CAAC;AAGjB,qBAAa,YAAY;IACvB,OAAO,CAAC,aAAa,CAA8B;IACnD,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,kBAAkB,CAAa;IACvC,OAAO,CAAC,cAAc,CAA8C;IAEpE,OAAO,CAAC,MAAM,CAAc;IAE5B,OAAO,CAAC,WAAW,CAAkC;IACrD,OAAO,CAAC,YAAY,CAAmC;IACvD,OAAO,CAAC,iBAAiB,CAAS;gBAEtB,MAAM,GAAE,OAAO,CAAC,WAAW,CAAM;YAU/B,2BAA2B;IAwB5B,KAAK,CAChB,WAAW,EAAE,iBAAiB,EAC9B,YAAY,CAAC,EAAE,kBAAkB,GAChC,OAAO,CAAC,IAAI,CAAC;YA0GF,iBAAiB;IAuB/B,OAAO,CAAC,gBAAgB;IA0BxB,OAAO,CAAC,WAAW;IAmBnB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,wBAAwB;IAsChC;;OAEG;IACH,OAAO,CAAC,YAAY;IA8BpB;;OAEG;IACH,IAAI,IAAI,IAAI;IA6BZ;;OAEG;IACH,MAAM,IAAI,IAAI;IAgCd,OAAO,IAAI,IAAI;CAiBhB"}
|
|
@@ -34,11 +34,9 @@ class AudioManager {
|
|
|
34
34
|
hint: "Ensure the browser has microphone access enabled for this site.",
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
console.log("Microphone permission state:", permission.state);
|
|
38
37
|
return permission.state;
|
|
39
38
|
}
|
|
40
39
|
catch (error) {
|
|
41
|
-
console.error("Error checking microphone permission:", error);
|
|
42
40
|
if (error instanceof Error && error.name === "NotSupportedError")
|
|
43
41
|
return "prompt";
|
|
44
42
|
}
|
|
@@ -84,7 +82,6 @@ class AudioManager {
|
|
|
84
82
|
this.onAudioData = onAudioData;
|
|
85
83
|
this.onAudioError = onAudioError ?? null;
|
|
86
84
|
this.suppressCallbacks = false; //reset the guard against late recorder events
|
|
87
|
-
console.log("Getting user media");
|
|
88
85
|
// Get user media
|
|
89
86
|
this.mediaStream = await navigator.mediaDevices.getUserMedia({
|
|
90
87
|
audio: {
|
|
@@ -95,7 +92,6 @@ class AudioManager {
|
|
|
95
92
|
channelCount: 1,
|
|
96
93
|
},
|
|
97
94
|
});
|
|
98
|
-
console.log("Got user media");
|
|
99
95
|
// Create MediaRecorder with fallback if the selected format fails
|
|
100
96
|
this.mediaRecorder = new MediaRecorder(this.mediaStream, {
|
|
101
97
|
mimeType: this.config.mimeType,
|
|
@@ -119,7 +115,6 @@ class AudioManager {
|
|
|
119
115
|
}
|
|
120
116
|
}
|
|
121
117
|
catch (error) {
|
|
122
|
-
console.error("Error starting audio recording in media devices:", error);
|
|
123
118
|
if (error instanceof Error && error.name === "NotAllowedError") {
|
|
124
119
|
throw new Error_1.RecordingError("Microphone permission denied", {
|
|
125
120
|
context: { permissionState: "denied" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eka-care/medassist-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"description": "TypeScript SDK for real-time medical chatbot experiences with session management, WebSocket connectivity, and media handling",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|