@voicemaster/react 1.0.2 → 1.0.4
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 +2 -3
- package/dist/index.mjs +2 -3
- package/package.json +1 -1
- package/src/useVoice.ts +2 -4
package/dist/index.js
CHANGED
|
@@ -43,6 +43,7 @@ function useVoice(options) {
|
|
|
43
43
|
autoConnect: false
|
|
44
44
|
});
|
|
45
45
|
client.on("connected", () => {
|
|
46
|
+
console.log("connected event received");
|
|
46
47
|
setIsConnected(true);
|
|
47
48
|
});
|
|
48
49
|
client.on("disconnected", () => {
|
|
@@ -79,9 +80,7 @@ function useVoice(options) {
|
|
|
79
80
|
});
|
|
80
81
|
clientRef.current = client;
|
|
81
82
|
if (options.autoConnect !== false) {
|
|
82
|
-
|
|
83
|
-
client.connect();
|
|
84
|
-
}, 100);
|
|
83
|
+
client.connect();
|
|
85
84
|
}
|
|
86
85
|
return () => {
|
|
87
86
|
client.disconnect();
|
package/dist/index.mjs
CHANGED
|
@@ -17,6 +17,7 @@ function useVoice(options) {
|
|
|
17
17
|
autoConnect: false
|
|
18
18
|
});
|
|
19
19
|
client.on("connected", () => {
|
|
20
|
+
console.log("connected event received");
|
|
20
21
|
setIsConnected(true);
|
|
21
22
|
});
|
|
22
23
|
client.on("disconnected", () => {
|
|
@@ -53,9 +54,7 @@ function useVoice(options) {
|
|
|
53
54
|
});
|
|
54
55
|
clientRef.current = client;
|
|
55
56
|
if (options.autoConnect !== false) {
|
|
56
|
-
|
|
57
|
-
client.connect();
|
|
58
|
-
}, 100);
|
|
57
|
+
client.connect();
|
|
59
58
|
}
|
|
60
59
|
return () => {
|
|
61
60
|
client.disconnect();
|
package/package.json
CHANGED
package/src/useVoice.ts
CHANGED
|
@@ -24,6 +24,7 @@ export function useVoice(options: UseVoiceOptions) {
|
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
client.on('connected', () => {
|
|
27
|
+
console.log('connected event received'); // Добавь для отладки
|
|
27
28
|
setIsConnected(true);
|
|
28
29
|
});
|
|
29
30
|
|
|
@@ -69,10 +70,7 @@ export function useVoice(options: UseVoiceOptions) {
|
|
|
69
70
|
clientRef.current = client;
|
|
70
71
|
|
|
71
72
|
if (options.autoConnect !== false) {
|
|
72
|
-
|
|
73
|
-
setTimeout(() => {
|
|
74
|
-
client.connect();
|
|
75
|
-
}, 100);
|
|
73
|
+
client.connect();
|
|
76
74
|
}
|
|
77
75
|
|
|
78
76
|
return () => {
|