@snapcall/stream-ui 1.9.0 → 1.10.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/stream-ui.esm.js +332 -77
- package/dist/stream-ui.js +332 -77
- package/dist/stream-ui.umd.js +207 -114
- package/dist/types.d.ts +23 -16
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -87,6 +87,8 @@ interface Config {
|
|
|
87
87
|
streamerApi: string;
|
|
88
88
|
iceServers: RTCIceServer[];
|
|
89
89
|
}
|
|
90
|
+
type Permission = 'share_link' | 'direct_pay' | 'quick_connect' | 'virtual_background' | 'screen_sharing' | 'instant_picture' | 'request_input' | 'recording';
|
|
91
|
+
type Permissions = Array<Permission>;
|
|
90
92
|
declare global {
|
|
91
93
|
interface Window {
|
|
92
94
|
webkitAudioContext: Function;
|
|
@@ -155,67 +157,70 @@ interface CustomMessage {
|
|
|
155
157
|
}
|
|
156
158
|
declare global {
|
|
157
159
|
export namespace SnapCall {
|
|
158
|
-
|
|
159
|
-
type
|
|
160
|
+
export { Permissions, Permission };
|
|
161
|
+
export type SnapcallEvent<T> = CustomEvent<T>;
|
|
162
|
+
export type PeersInfoEvent = SnapcallEvent<{
|
|
160
163
|
peerId: string;
|
|
164
|
+
plan?: string;
|
|
165
|
+
permissions: Permissions;
|
|
161
166
|
peers: {
|
|
162
167
|
peerId: string;
|
|
163
168
|
displayName: string;
|
|
164
169
|
profile: Profile;
|
|
165
170
|
}[];
|
|
166
171
|
}>;
|
|
167
|
-
type PeerInfoEvent = SnapcallEvent<{
|
|
172
|
+
export type PeerInfoEvent = SnapcallEvent<{
|
|
168
173
|
peerId: string;
|
|
169
174
|
displayName?: string;
|
|
170
175
|
profile: Profile;
|
|
171
176
|
}>;
|
|
172
|
-
type ProfileUpdateEvent = SnapcallEvent<{
|
|
177
|
+
export type ProfileUpdateEvent = SnapcallEvent<{
|
|
173
178
|
peerId: string;
|
|
174
179
|
profile: Profile;
|
|
175
180
|
}>;
|
|
176
|
-
type RequestDeviceEvent = SnapcallEvent<{
|
|
181
|
+
export type RequestDeviceEvent = SnapcallEvent<{
|
|
177
182
|
peerId: string;
|
|
178
183
|
deviceType: DeviceType;
|
|
179
184
|
}>;
|
|
180
|
-
type RequestDeviceResultEvent = SnapcallEvent<{
|
|
185
|
+
export type RequestDeviceResultEvent = SnapcallEvent<{
|
|
181
186
|
result: {
|
|
182
187
|
peerId: string;
|
|
183
188
|
result: boolean;
|
|
184
189
|
};
|
|
185
190
|
}>;
|
|
186
|
-
type BaseEvent = SnapcallEvent<{}>;
|
|
187
|
-
type StreamEvent = SnapcallEvent<{
|
|
191
|
+
export type BaseEvent = SnapcallEvent<{}>;
|
|
192
|
+
export type StreamEvent = SnapcallEvent<{
|
|
188
193
|
peerId: string;
|
|
189
194
|
}>;
|
|
190
|
-
type RequestResultEvent = SnapcallEvent<{
|
|
195
|
+
export type RequestResultEvent = SnapcallEvent<{
|
|
191
196
|
success: Boolean;
|
|
192
197
|
}>;
|
|
193
|
-
type AudioDeviceEvent = SnapcallEvent<MediaDeviceInfo>;
|
|
194
|
-
type MediaEvent = SnapcallEvent<{
|
|
198
|
+
export type AudioDeviceEvent = SnapcallEvent<MediaDeviceInfo>;
|
|
199
|
+
export type MediaEvent = SnapcallEvent<{
|
|
195
200
|
peerId: string;
|
|
196
201
|
mediaId: string;
|
|
197
202
|
deviceType: DeviceType;
|
|
198
203
|
paused: boolean;
|
|
199
204
|
}>;
|
|
200
|
-
type WebcamUpdateEvent = SnapcallEvent<{
|
|
205
|
+
export type WebcamUpdateEvent = SnapcallEvent<{
|
|
201
206
|
numberOfAvailableWebcams: number;
|
|
202
207
|
}>;
|
|
203
|
-
type CriticalErrorEvent = SnapcallEvent<{
|
|
208
|
+
export type CriticalErrorEvent = SnapcallEvent<{
|
|
204
209
|
code: string;
|
|
205
210
|
}>;
|
|
206
|
-
type CustomMessageEvent = SnapcallEvent<{
|
|
211
|
+
export type CustomMessageEvent = SnapcallEvent<{
|
|
207
212
|
peerId: string;
|
|
208
213
|
event: {
|
|
209
214
|
type: string;
|
|
210
215
|
} & Record<string, any>;
|
|
211
216
|
}>;
|
|
212
|
-
type localVideoChangeEvent = SnapcallEvent<{
|
|
217
|
+
export type localVideoChangeEvent = SnapcallEvent<{
|
|
213
218
|
camera: {
|
|
214
219
|
device: MediaDeviceInfo | null;
|
|
215
220
|
resolution: VideoResolution;
|
|
216
221
|
};
|
|
217
222
|
}>;
|
|
218
|
-
type AgentIdentityEvent = SnapcallEvent<{
|
|
223
|
+
export type AgentIdentityEvent = SnapcallEvent<{
|
|
219
224
|
success: boolean;
|
|
220
225
|
email?: string;
|
|
221
226
|
}>;
|
|
@@ -392,6 +397,7 @@ declare class StreamerClient extends StreamerEventTargetType implements AudioLev
|
|
|
392
397
|
setAudioSink(sinkId: string): Promise<void>;
|
|
393
398
|
dispatchEvent(event: SnapcallEvent<keyof StreamerEventMap>): boolean;
|
|
394
399
|
setConfig(config: Partial<Config>): void;
|
|
400
|
+
getPermissions(): Permissions;
|
|
395
401
|
}
|
|
396
402
|
declare const streamerClient: StreamerClient;
|
|
397
403
|
interface NotificationOptions {
|
|
@@ -444,6 +450,7 @@ interface StreamUIMethods {
|
|
|
444
450
|
setProfile: typeof streamerClient.setProfile;
|
|
445
451
|
setConfig: typeof streamerClient.setConfig;
|
|
446
452
|
setLogLevel: (level: number) => void;
|
|
453
|
+
getPermissions: () => Permissions;
|
|
447
454
|
}
|
|
448
455
|
interface ControlSettings {
|
|
449
456
|
available?: boolean;
|