@flowengage/react-chatbot 5.0.14 → 5.0.15
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.
|
@@ -2900,7 +2900,31 @@ function Nr({ siteId: e, config: t, children: n, language: r = "en" }) {
|
|
|
2900
2900
|
let i = window.MediaRecorder.isTypeSupported("audio/webm") ? "audio/webm" : "audio/mp4", a = new window.MediaRecorder(r.stream, { mimeType: i });
|
|
2901
2901
|
a.ondataavailable = (e) => {
|
|
2902
2902
|
e.data && e.data.size > 0 && St.current.push(e.data);
|
|
2903
|
-
}, bt.current = a, Ct.current = Date.now(), a.start(1e3)
|
|
2903
|
+
}, bt.current = a, Ct.current = Date.now(), a.start(1e3), setTimeout(() => {
|
|
2904
|
+
try {
|
|
2905
|
+
if (!window.speechSynthesis) return;
|
|
2906
|
+
let e = new SpeechSynthesisUtterance("This call is being recorded.");
|
|
2907
|
+
if (e.rate = .95, e.pitch = 1, e.volume = 1, window.MediaStreamTrackGenerator || window.AudioContext) try {
|
|
2908
|
+
let t = n.createMediaStreamDestination();
|
|
2909
|
+
e.onstart = () => {
|
|
2910
|
+
try {
|
|
2911
|
+
let i = document.createElement("audio");
|
|
2912
|
+
i.style.display = "none", i.srcObject = t.stream, document.body.appendChild(i), i.play().catch(() => {});
|
|
2913
|
+
let a = n.createMediaStreamSource(t.stream);
|
|
2914
|
+
a.connect(r), e.onend = () => {
|
|
2915
|
+
try {
|
|
2916
|
+
a.disconnect();
|
|
2917
|
+
} catch {}
|
|
2918
|
+
try {
|
|
2919
|
+
i.remove();
|
|
2920
|
+
} catch {}
|
|
2921
|
+
};
|
|
2922
|
+
} catch {}
|
|
2923
|
+
};
|
|
2924
|
+
} catch {}
|
|
2925
|
+
window.speechSynthesis.speak(e);
|
|
2926
|
+
} catch {}
|
|
2927
|
+
}, 200);
|
|
2904
2928
|
}
|
|
2905
2929
|
} catch {}
|
|
2906
2930
|
}
|
|
@@ -30023,7 +30047,7 @@ function Ak({ orbColors: e, onEnterChat: t, onEndChat: n, agentId: r, voiceId: i
|
|
|
30023
30047
|
if (!e && (v(t === "speaking" ? "speaking" : "listening"), t === "listening" && S && !x)) {
|
|
30024
30048
|
x = !0;
|
|
30025
30049
|
try {
|
|
30026
|
-
C.current?.
|
|
30050
|
+
C.current?.sendUserMessage?.("continue with the tour");
|
|
30027
30051
|
} catch {}
|
|
30028
30052
|
}
|
|
30029
30053
|
},
|