diff --git a/client/client.go b/client/client.go index 1c89229..27a3a12 100644 --- a/client/client.go +++ b/client/client.go @@ -24,6 +24,7 @@ const ( WSDisconnectEvent = "WSDisconnect" WSCallJoinEvent = "WSCallJoin" WSCallRecordingState = "WSCallRecordingState" + WSJobStopEvent = "WSStopJobEvent" RTCConnectEvent = "RTCConnect" RTCDisconnectEvent = "RTCDisconnect" RTCTrackEvent = "RTCTrack" diff --git a/client/websocket.go b/client/websocket.go index ea0fbfd..01aedec 100644 --- a/client/websocket.go +++ b/client/websocket.go @@ -38,6 +38,7 @@ const ( wsEventUserLeft = wsEvPrefix + "user_left" wsEventCallEnd = wsEvPrefix + "call_end" wsEventCallRecordingState = wsEvPrefix + "call_recording_state" + wsEventJobStop = wsEvPrefix + "job_stop" ) var ( @@ -190,6 +191,9 @@ func (c *Client) handleWSMsg(msg ws.Message) error { var recState CallJobState recState.FromMap(data) c.emit(WSCallRecordingState, recState) + case wsEventJobStop: + jobID, _ := ev.GetData()["job_id"].(string) + c.emit(WSJobStopEvent, jobID) default: } case ws.BinaryMessage: