@sawport/react-sdk 0.1.0-alpha.57 → 0.1.0-alpha.57.1
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/index.js +5 -2
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -72991,8 +72991,10 @@ function useVideoCalling({ userId, conversation_id }) {
|
|
|
72991
72991
|
const playSound = react.exports.useCallback(
|
|
72992
72992
|
(src2, callOn) => {
|
|
72993
72993
|
sound.src = src2;
|
|
72994
|
-
|
|
72995
|
-
|
|
72994
|
+
sound.addEventListener("canplaythrough", () => {
|
|
72995
|
+
callOn && callOn(sound);
|
|
72996
|
+
sound.play();
|
|
72997
|
+
});
|
|
72996
72998
|
},
|
|
72997
72999
|
[sound]
|
|
72998
73000
|
);
|
|
@@ -73001,6 +73003,7 @@ function useVideoCalling({ userId, conversation_id }) {
|
|
|
73001
73003
|
const stopSound = react.exports.useCallback(() => {
|
|
73002
73004
|
sound.pause();
|
|
73003
73005
|
sound.srcObject = null;
|
|
73006
|
+
sound.src = null;
|
|
73004
73007
|
}, [sound]);
|
|
73005
73008
|
const getMediaStream = react.exports.useCallback(() => {
|
|
73006
73009
|
try {
|