File tree Expand file tree Collapse file tree 3 files changed +3
-0
lines changed Expand file tree Collapse file tree 3 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,7 @@ export class StreamingClient {
273273 case SignalMessageAction . WARNING :
274274 const message = signalMessage . payload as string ;
275275 console . warn ( 'Warning received from server: ' + message ) ;
276+ this . publicEventEmitter . emit ( AnamEvent . SERVER_WARNING , message ) ;
276277 break ;
277278 case SignalMessageAction . TALK_STREAM_INTERRUPTED :
278279 const chatMessage =
Original file line number Diff line number Diff line change @@ -9,4 +9,5 @@ export enum AnamEvent {
99 AUDIO_STREAM_STARTED = 'AUDIO_STREAM_STARTED' ,
1010 TALK_STREAM_INTERRUPTED = 'TALK_STREAM_INTERRUPTED' ,
1111 SESSION_READY = 'SESSION_READY' ,
12+ SERVER_WARNING = 'SERVER_WARNING' ,
1213}
Original file line number Diff line number Diff line change @@ -13,4 +13,5 @@ export type EventCallbacks = {
1313 [ AnamEvent . AUDIO_STREAM_STARTED ] : ( audioStream : MediaStream ) => void ;
1414 [ AnamEvent . TALK_STREAM_INTERRUPTED ] : ( correlationId : string ) => void ;
1515 [ AnamEvent . SESSION_READY ] : ( sessionId : string ) => void ;
16+ [ AnamEvent . SERVER_WARNING ] : ( message : string ) => void ;
1617} ;
You can’t perform that action at this time.
0 commit comments