@videosdk.live/react-sdk 0.8.0 → 0.8.2

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.
@@ -117,7 +117,8 @@ export class AgentParticipant {
117
117
  | "stream-disabled"
118
118
  | "media-status-changed"
119
119
  | "agent-state-changed"
120
- | "transcription-received",
120
+ | "transcription-received"
121
+ | 'agent-metrics',
121
122
  listener: (data: any) => void
122
123
  ): void;
123
124
  /**
@@ -131,7 +132,8 @@ export class AgentParticipant {
131
132
  | "stream-disabled"
132
133
  | "media-status-changed"
133
134
  | "agent-state-changed"
134
- | "transcription-received",
135
+ | "transcription-received"
136
+ | 'agent-metrics',
135
137
  listener: (data: any) => void
136
138
  ): void;
137
139
  }
@@ -708,7 +708,8 @@ export function useAgentParticipant(
708
708
  onStreamDisabled,
709
709
  onMediaStatusChanged,
710
710
  onAgentTranscriptionReceived,
711
- onAgentStateChanged
711
+ onAgentStateChanged,
712
+ onAgentMetrics
712
713
  }?: {
713
714
  onStreamDisabled?: (stream: Stream) => void;
714
715
  onStreamEnabled?: (stream: Stream) => void;
@@ -717,28 +718,32 @@ export function useAgentParticipant(
717
718
  peerId,
718
719
  newStatus
719
720
  }: {
720
- kind: 'audio' | 'video' | 'share' | 'shareAudio';
721
+ kind: 'audio' | 'video' | 'share' | 'shareAudio';
721
722
  peerId: string;
722
723
  newStatus: boolean;
723
724
  }) => void;
724
- onAgentTranscriptionReceived? :({
725
- segment : {
726
- text,
727
- timestamp
728
- },
725
+ onAgentTranscriptionReceived?: ({
726
+ segment: { text, timestamp },
729
727
  participant
730
- }:{
731
- segment :{
728
+ }: {
729
+ segment: {
732
730
  text: string;
733
731
  timestamp: number;
734
- }
735
- participant: Participant | AgentParticipant,
732
+ };
733
+ participant: Participant | AgentParticipant;
734
+ }) => void;
735
+ onAgentStateChanged?: ({ state }: { state: string }) => void;
736
+ onAgentMetrics?: ({
737
+ latency,
738
+ speech,
739
+ providers,
740
+ systemInstructions
741
+ }: {
742
+ latency: object;
743
+ speech: object;
744
+ providers?: object;
745
+ systemInstructions?: object;
736
746
  }) => void;
737
- onAgentStateChanged?:({
738
- state
739
- }:{
740
- state: string;
741
- })=>void;
742
747
  }
743
748
  ): {
744
749
  displayName: string;
@@ -750,7 +755,7 @@ export function useAgentParticipant(
750
755
  isActiveSpeaker: boolean;
751
756
  pinState: any;
752
757
  agentState: string;
753
- mode: 'SEND_AND_RECV' | 'SIGNALLING_ONLY' | 'RECV_ONLY'
758
+ mode: 'SEND_AND_RECV' | 'SIGNALLING_ONLY' | 'RECV_ONLY';
754
759
  remove: () => void;
755
760
  pin: (data: 'SHARE_AND_CAM' | 'CAM' | 'SHARE') => void;
756
761
  unpin: (data: 'SHARE_AND_CAM' | 'CAM' | 'SHARE') => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@videosdk.live/react-sdk",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.modern.js",
@@ -40,7 +40,7 @@
40
40
  "prettier": "^1.17.1",
41
41
  "react": "^16.13.1",
42
42
  "test-listen": "^1.1.0",
43
- "typedoc": "^0.28.15",
43
+ "typedoc": "^0.26.0",
44
44
  "typescript": "^4.7.4"
45
45
  },
46
46
  "eslintConfig": {
@@ -76,7 +76,7 @@
76
76
  }
77
77
  },
78
78
  "dependencies": {
79
- "@videosdk.live/js-sdk": "0.7.0",
79
+ "@videosdk.live/js-sdk": "0.7.1",
80
80
  "events": "^3.3.0"
81
81
  }
82
82
  }