File tree Expand file tree Collapse file tree 4 files changed +6
-11
lines changed Expand file tree Collapse file tree 4 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @humeai/voice-embed-react" ,
3
- "version" : " 0.2.0-beta.18 " ,
3
+ "version" : " 0.2.0-beta.19 " ,
4
4
"description" : " " ,
5
5
"main" : " ./dist/index.js" ,
6
6
"module" : " ./dist/index.mjs" ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @humeai/voice-embed" ,
3
- "version" : " 0.2.0-beta.18 " ,
3
+ "version" : " 0.2.0-beta.19 " ,
4
4
"description" : " " ,
5
5
"main" : " ./dist/index.js" ,
6
6
"module" : " ./dist/index.mjs" ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @humeai/voice-react" ,
3
- "version" : " 0.2.0-beta.18 " ,
3
+ "version" : " 0.2.0-beta.19 " ,
4
4
"description" : " " ,
5
5
"main" : " ./dist/index.js" ,
6
6
"module" : " ./dist/index.mjs" ,
Original file line number Diff line number Diff line change @@ -285,6 +285,9 @@ export const VoiceProvider: FC<VoiceProviderProps> = ({
285
285
const player = useSoundPlayer ( {
286
286
enableAudioWorklet,
287
287
onError : ( message , reason ) => {
288
+ if ( checkIsDisconnecting ( ) || checkIsDisconnected ( ) ) {
289
+ return ;
290
+ }
288
291
updateError ( { type : 'audio_error' , reason, message } ) ;
289
292
} ,
290
293
onPlayAudio : ( id : string ) => {
@@ -511,13 +514,6 @@ export const VoiceProvider: FC<VoiceProviderProps> = ({
511
514
return ;
512
515
}
513
516
514
- if ( checkIsDisconnecting ( ) ) {
515
- console . warn (
516
- 'Currently disconnecting from a chat. Cannot connect until the previous call is disconnected.' ,
517
- ) ;
518
- return ;
519
- }
520
-
521
517
updateError ( null ) ;
522
518
setStatus ( { value : 'connecting' } ) ;
523
519
resourceStatusRef . current . socket = 'connecting' ;
@@ -618,7 +614,6 @@ export const VoiceProvider: FC<VoiceProviderProps> = ({
618
614
isConnectingRef . current = false ;
619
615
} ,
620
616
[
621
- checkIsDisconnecting ,
622
617
checkShouldContinueConnecting ,
623
618
client ,
624
619
config ,
You can’t perform that action at this time.
0 commit comments