@nainudhin/video-meeting-sdk 1.0.2 → 1.5.0
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/meet-sdk.d.ts +152 -0
- package/dist/meet-sdk.mjs +1359 -802
- package/dist/meet-sdk.umd.js +52 -22
- package/package.json +4 -2
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
// Type definitions for @nainudhin/video-meeting-sdk
|
|
2
|
+
|
|
3
|
+
export interface MeetUser {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface PeerServerConfig {
|
|
9
|
+
host: string;
|
|
10
|
+
port: number;
|
|
11
|
+
path?: string;
|
|
12
|
+
secure?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface AiConfig {
|
|
16
|
+
/** Bring-your-own Whisper key (rare; usually leave undefined). */
|
|
17
|
+
whisperKey?: string;
|
|
18
|
+
whisperUrl?: string;
|
|
19
|
+
/** Bring-your-own LLM key (rare; usually leave undefined). */
|
|
20
|
+
llmKey?: string;
|
|
21
|
+
llmUrl?: string;
|
|
22
|
+
llmModel?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type RecordingMode = 'auto' | 'manual' | 'off';
|
|
26
|
+
export type RecordingSource = 'local' | 'composite';
|
|
27
|
+
|
|
28
|
+
export interface IceServer {
|
|
29
|
+
urls: string | string[];
|
|
30
|
+
username?: string;
|
|
31
|
+
credential?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface MeetSDKConfig {
|
|
35
|
+
workspace: string;
|
|
36
|
+
roomId: string;
|
|
37
|
+
user: MeetUser;
|
|
38
|
+
|
|
39
|
+
/** Overrides the built-in default host. */
|
|
40
|
+
host?: string;
|
|
41
|
+
apiUrl?: string;
|
|
42
|
+
socketUrl?: string;
|
|
43
|
+
peerServer?: PeerServerConfig;
|
|
44
|
+
|
|
45
|
+
/** TURN/STUN — merged with the built-in Google STUN defaults. */
|
|
46
|
+
iceServers?: IceServer[];
|
|
47
|
+
|
|
48
|
+
ai?: AiConfig;
|
|
49
|
+
|
|
50
|
+
/** When and how recording starts. Default 'off'. */
|
|
51
|
+
recording?: RecordingMode;
|
|
52
|
+
/** What gets recorded. Default 'local'. */
|
|
53
|
+
recordingMode?: RecordingSource;
|
|
54
|
+
/** Whisper transcription of the recording. Requires recording !== 'off'. */
|
|
55
|
+
transcribe?: boolean;
|
|
56
|
+
/** LLM summary of the transcript. Requires transcribe: true. */
|
|
57
|
+
summarize?: boolean;
|
|
58
|
+
/** Restrict recording to the meeting host. Default true. */
|
|
59
|
+
recordOnlyIfHost?: boolean;
|
|
60
|
+
|
|
61
|
+
/** Show the built-in screen-share button. Default true. */
|
|
62
|
+
screenShare?: boolean;
|
|
63
|
+
|
|
64
|
+
/** Composite recording canvas size. Defaults 1280 / 720 / 30. */
|
|
65
|
+
compositeWidth?: number;
|
|
66
|
+
compositeHeight?: number;
|
|
67
|
+
compositeFps?: number;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface RecordingSummary {
|
|
71
|
+
executiveSummary?: string | null;
|
|
72
|
+
actionItems?: string[];
|
|
73
|
+
decisions?: string[];
|
|
74
|
+
speakerHighlights?: Array<{ speaker?: string; highlight?: string }>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface RecordingRow {
|
|
78
|
+
recordingId: string;
|
|
79
|
+
fileName: string;
|
|
80
|
+
fileSize: number;
|
|
81
|
+
contentType: string;
|
|
82
|
+
durationSec: number | null;
|
|
83
|
+
recordedBy: string | null;
|
|
84
|
+
startedAt: string | null;
|
|
85
|
+
endedAt: string | null;
|
|
86
|
+
createdAt: string;
|
|
87
|
+
playbackUrl: string;
|
|
88
|
+
transcriptionStatus: 'skipped' | 'pending' | 'complete' | 'failed';
|
|
89
|
+
transcript?: string | null;
|
|
90
|
+
transcriptError?: string | null;
|
|
91
|
+
summaryStatus: 'skipped' | 'pending' | 'complete' | 'failed';
|
|
92
|
+
summary?: RecordingSummary | null;
|
|
93
|
+
summaryError?: string | null;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface FinalizeResult {
|
|
97
|
+
success: boolean;
|
|
98
|
+
recordingId: string;
|
|
99
|
+
fileName: string;
|
|
100
|
+
fileSize: number;
|
|
101
|
+
contentType: string;
|
|
102
|
+
durationSec: number | null;
|
|
103
|
+
playbackUrl: string;
|
|
104
|
+
transcriptionStatus: string;
|
|
105
|
+
summaryStatus: string;
|
|
106
|
+
createdAt: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface ChatAttachment {
|
|
110
|
+
attachmentId: string;
|
|
111
|
+
fileName: string;
|
|
112
|
+
fileSize: number;
|
|
113
|
+
contentType: string;
|
|
114
|
+
url: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface ChatMessageRow {
|
|
118
|
+
userId: string;
|
|
119
|
+
userName: string;
|
|
120
|
+
message: string;
|
|
121
|
+
attachments: ChatAttachment[];
|
|
122
|
+
timestamp: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export default class MeetSDK {
|
|
126
|
+
constructor();
|
|
127
|
+
|
|
128
|
+
init(config: MeetSDKConfig): void;
|
|
129
|
+
mount(target: string | Element): Promise<void>;
|
|
130
|
+
leave(): Promise<void>;
|
|
131
|
+
|
|
132
|
+
setAiConfig(ai: Partial<AiConfig>): void;
|
|
133
|
+
|
|
134
|
+
startRecording(): Promise<void>;
|
|
135
|
+
stopRecording(): Promise<FinalizeResult | null>;
|
|
136
|
+
|
|
137
|
+
listRecordings(): Promise<{ success: boolean; recordings: RecordingRow[] }>;
|
|
138
|
+
getRecording(recordingId: string): Promise<{ success: boolean; recording: RecordingRow }>;
|
|
139
|
+
|
|
140
|
+
fetchChatHistory(opts?: { limit?: number; before?: string; after?: string }): Promise<{ success: boolean; messages: ChatMessageRow[] }>;
|
|
141
|
+
uploadChatAttachment(file: File): Promise<ChatAttachment & { success: boolean }>;
|
|
142
|
+
|
|
143
|
+
getSummary(): Promise<any>;
|
|
144
|
+
generateSummary(): Promise<any>;
|
|
145
|
+
transcribeAudio(blob: Blob, filename?: string): Promise<any>;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
declare global {
|
|
149
|
+
interface Window {
|
|
150
|
+
MeetSDK: MeetSDK;
|
|
151
|
+
}
|
|
152
|
+
}
|