mediasfu-angular 2.2.0 → 2.2.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.
- package/README.md +2288 -375
- package/dist/README.md +2288 -375
- package/dist/fesm2022/mediasfu-angular.mjs +9519 -4188
- package/dist/fesm2022/mediasfu-angular.mjs.map +1 -1
- package/dist/lib/@types/types.d.ts +6 -1
- package/dist/lib/@types/ui-overrides.types.d.ts +310 -0
- package/dist/lib/components/background-components/background-modal/background-modal.component.d.ts +1023 -2
- package/dist/lib/components/breakout-components/breakout-rooms-modal.component.d.ts +1069 -45
- package/dist/lib/components/breakout-components/edit-room-modal/edit-room-modal.component.d.ts +1054 -42
- package/dist/lib/components/co-host-components/co-host-modal/co-host-modal.component.d.ts +1067 -56
- package/dist/lib/components/display-components/alert-component/alert.component.component.d.ts +80 -24
- package/dist/lib/components/display-components/audio-grid/audio-grid.component.d.ts +83 -11
- package/dist/lib/components/display-components/flexible-grid/flexible-grid.component.d.ts +96 -33
- package/dist/lib/components/display-components/loading-modal/loading-modal.component.d.ts +16 -26
- package/dist/lib/components/display-components/main-aspect-component/main-aspect-component.component.d.ts +6 -2
- package/dist/lib/components/display-components/main-container-component/main-container-component.component.d.ts +6 -2
- package/dist/lib/components/display-components/main-grid-component/main-grid-component.component.d.ts +7 -13
- package/dist/lib/components/display-components/main-screen-component/main-screen-component.component.d.ts +508 -7
- package/dist/lib/components/display-components/other-grid-component/other-grid-component.component.d.ts +7 -1
- package/dist/lib/components/display-components/sub-aspect-component/sub-aspect-component.component.d.ts +7 -2
- package/dist/lib/components/display-settings-components/display-settings-modal.component.d.ts +1107 -27
- package/dist/lib/components/event-settings-components/event-settings-modal/event-settings-modal.component.d.ts +1134 -49
- package/dist/lib/components/exit-components/confirm-exit-modal/confirm-exit-modal.component.d.ts +94 -32
- package/dist/lib/components/media-settings-components/media-settings-modal/media-settings-modal.component.d.ts +1123 -47
- package/dist/lib/components/mediasfu-components/mediasfu-broadcast.component.d.ts +24966 -73
- package/dist/lib/components/mediasfu-components/mediasfu-chat.component.d.ts +276 -73
- package/dist/lib/components/mediasfu-components/mediasfu-conference.component.d.ts +18132 -93
- package/dist/lib/components/mediasfu-components/mediasfu-generic.component.d.ts +56344 -93
- package/dist/lib/components/mediasfu-components/mediasfu-webinar.component.d.ts +20849 -93
- package/dist/lib/components/menu-components/custom-buttons/custom-buttons.component.d.ts +23 -4
- package/dist/lib/components/menu-components/meeting-id-component/meeting-id-component.component.d.ts +78 -1
- package/dist/lib/components/menu-components/meeting-passcode-component/meeting-passcode-component.component.d.ts +37 -1
- package/dist/lib/components/menu-components/menu-modal/menu-modal.component.d.ts +689 -9
- package/dist/lib/components/menu-components/share-buttons-component/share-buttons-component.component.d.ts +46 -2
- package/dist/lib/components/message-components/messages-modal/messages-modal.component.d.ts +76 -13
- package/dist/lib/components/misc-components/confirm-here-modal/confirm-here-modal.component.d.ts +1113 -17
- package/dist/lib/components/misc-components/share-event-modal/share-event-modal.component.d.ts +1114 -29
- package/dist/lib/components/participants-components/participants-modal/participants-modal.component.d.ts +1084 -6
- package/dist/lib/components/polls-components/poll-modal/poll-modal.component.d.ts +1060 -21
- package/dist/lib/components/recording-components/recording-modal/recording-modal.component.d.ts +1054 -35
- package/dist/lib/components/requests-components/requests-modal/requests-modal.component.d.ts +1117 -45
- package/dist/lib/components/screenboard-components/screenboard-modal/screenboard-modal.component.d.ts +1059 -47
- package/dist/lib/components/waiting-components/waiting-room-modal.component.d.ts +1119 -46
- package/dist/lib/components/whiteboard-components/configure-whiteboard-modal/configure-whiteboard-modal.component.d.ts +1049 -16
- package/dist/lib/consumers/add-videos-grid.service.d.ts +3 -0
- package/dist/lib/consumers/connect-ips.service.d.ts +3 -1
- package/dist/lib/consumers/connect-recv-transport.service.d.ts +4 -1
- package/dist/lib/consumers/connect-send-transport-audio.service.d.ts +5 -1
- package/dist/lib/consumers/connect-send-transport-screen.service.d.ts +6 -1
- package/dist/lib/consumers/connect-send-transport-video.service.d.ts +6 -1
- package/dist/lib/consumers/connect-send-transport.service.d.ts +3 -1
- package/dist/lib/consumers/consumer-resume.service.d.ts +2 -1
- package/dist/lib/consumers/create-send-transport.service.d.ts +4 -1
- package/dist/lib/consumers/disconnect-send-transport-audio.service.d.ts +3 -1
- package/dist/lib/consumers/disconnect-send-transport-screen.service.d.ts +3 -1
- package/dist/lib/consumers/disconnect-send-transport-video.service.d.ts +3 -1
- package/dist/lib/consumers/prepopulate-user-media.service.d.ts +3 -0
- package/dist/lib/consumers/resume-send-transport-audio.service.d.ts +3 -1
- package/dist/lib/consumers/signal-new-consumer-transport.service.d.ts +3 -1
- package/dist/lib/consumers/socket-receive-methods/join-consume-room.service.d.ts +3 -1
- package/dist/lib/consumers/socket-receive-methods/new-pipe-producer.service.d.ts +3 -1
- package/dist/lib/consumers/stream-success-audio-switch.service.d.ts +5 -1
- package/dist/lib/consumers/stream-success-audio.service.d.ts +3 -1
- package/dist/lib/consumers/stream-success-video.service.d.ts +5 -1
- package/dist/lib/directives/with-override.directive.d.ts +76 -0
- package/dist/lib/methods/utils/initial-values.util.d.ts +7 -2
- package/dist/lib/methods/utils/mini-audio-player/mini-audio-player.component.d.ts +3 -1
- package/dist/lib/methods/utils/producer/a-params.service.d.ts +4 -1
- package/dist/lib/methods/utils/producer/h-params.service.d.ts +4 -1
- package/dist/lib/methods/utils/producer/screen-params.service.d.ts +4 -1
- package/dist/lib/methods/utils/producer/v-params.service.d.ts +4 -1
- package/dist/lib/methods/whiteboard-methods/capture-canvas-stream.service.d.ts +3 -1
- package/dist/lib/producer-client/producer-client-emits/create-device-client.service.d.ts +4 -1
- package/dist/lib/producer-client/producer-client-emits/update-room-parameters-client.service.d.ts +3 -1
- package/dist/lib/producers/producer-emits/join-con-room.service.d.ts +3 -1
- package/dist/lib/producers/socket-receive-methods/get-domains.service.d.ts +3 -1
- package/dist/lib/services/ui-override-resolver.service.d.ts +91 -0
- package/dist/public-api.d.ts +4 -0
- package/package.json +2 -2
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { Socket } from 'socket.io-client';
|
|
2
|
-
import {
|
|
2
|
+
import { types } from 'mediasoup-client';
|
|
3
|
+
type Consumer = types.Consumer;
|
|
4
|
+
type DtlsParameters = types.DtlsParameters;
|
|
5
|
+
type IceCandidate = types.IceCandidate;
|
|
6
|
+
type IceParameters = types.IceParameters;
|
|
7
|
+
type RtpCapabilities = types.RtpCapabilities;
|
|
3
8
|
import { IconDefinition } from '@fortawesome/free-solid-svg-icons';
|
|
4
9
|
import { CustomComponent } from '../components/display-components/control-buttons-component/control-buttons-component.component';
|
|
5
10
|
import { CustomButton } from '../components/menu-components/custom-buttons/custom-buttons.component';
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MediaSFU UI Overrides - Angular Implementation
|
|
3
|
+
*
|
|
4
|
+
* This file provides TypeScript interfaces for the UI override system,
|
|
5
|
+
* mirroring the React SDK's customization capabilities.
|
|
6
|
+
*
|
|
7
|
+
* The override system allows three customization strategies:
|
|
8
|
+
* 1. Component overrides - Replace entire components with custom Angular components
|
|
9
|
+
* 2. Render overrides - Wrap or enhance existing component rendering
|
|
10
|
+
* 3. Function overrides - Replace or wrap helper functions with custom logic
|
|
11
|
+
*/
|
|
12
|
+
import { Type, InjectionToken, TemplateRef } from '@angular/core';
|
|
13
|
+
/**
|
|
14
|
+
* Base interface for component overrides
|
|
15
|
+
* Allows replacing a component or wrapping its render output
|
|
16
|
+
*/
|
|
17
|
+
export interface CustomComponentOverride<TComponent = any, TProps = any> {
|
|
18
|
+
/**
|
|
19
|
+
* Replace the component entirely with a custom Angular component
|
|
20
|
+
*/
|
|
21
|
+
component?: Type<TComponent>;
|
|
22
|
+
/**
|
|
23
|
+
* Wrap or enhance the default render output
|
|
24
|
+
* @param props - Props passed to the component
|
|
25
|
+
* @param defaultRender - Function that returns the default component
|
|
26
|
+
*/
|
|
27
|
+
render?: (props: TProps, defaultRender?: () => any) => TemplateRef<any> | Type<any>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Base interface for function overrides
|
|
31
|
+
* Allows replacing a function or wrapping its execution
|
|
32
|
+
*/
|
|
33
|
+
export interface CustomFunctionOverride<TFunction extends (...args: any[]) => any> {
|
|
34
|
+
/**
|
|
35
|
+
* Completely replace the function implementation
|
|
36
|
+
*/
|
|
37
|
+
implementation?: TFunction;
|
|
38
|
+
/**
|
|
39
|
+
* Wrap the original function to add pre/post logic
|
|
40
|
+
* @param original - The original function implementation
|
|
41
|
+
* @returns Wrapped function with custom logic
|
|
42
|
+
*/
|
|
43
|
+
wrap?: (original: TFunction) => TFunction;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Main UI Overrides interface
|
|
47
|
+
* Contains all customizable components and functions in MediaSFU
|
|
48
|
+
*/
|
|
49
|
+
export interface MediasfuUICustomOverrides {
|
|
50
|
+
/**
|
|
51
|
+
* Main container component - Root wrapper for the entire UI
|
|
52
|
+
*/
|
|
53
|
+
mainContainer?: CustomComponentOverride;
|
|
54
|
+
/**
|
|
55
|
+
* Main aspect component - Controls aspect ratio and layout
|
|
56
|
+
*/
|
|
57
|
+
mainAspect?: CustomComponentOverride;
|
|
58
|
+
/**
|
|
59
|
+
* Main screen component - Primary video/content display area
|
|
60
|
+
*/
|
|
61
|
+
mainScreen?: CustomComponentOverride;
|
|
62
|
+
/**
|
|
63
|
+
* Main grid component - Grid layout for participants
|
|
64
|
+
*/
|
|
65
|
+
mainGrid?: CustomComponentOverride;
|
|
66
|
+
/**
|
|
67
|
+
* Sub aspect component - Secondary layout container
|
|
68
|
+
*/
|
|
69
|
+
subAspect?: CustomComponentOverride;
|
|
70
|
+
/**
|
|
71
|
+
* Other grid component - Additional participant grid
|
|
72
|
+
*/
|
|
73
|
+
otherGrid?: CustomComponentOverride;
|
|
74
|
+
/**
|
|
75
|
+
* Flexible grid component - Dynamic participant grid
|
|
76
|
+
*/
|
|
77
|
+
flexibleGrid?: CustomComponentOverride;
|
|
78
|
+
/**
|
|
79
|
+
* Alternative flexible grid component
|
|
80
|
+
*/
|
|
81
|
+
flexibleGridAlt?: CustomComponentOverride;
|
|
82
|
+
/**
|
|
83
|
+
* Flexible video component - Individual video display
|
|
84
|
+
*/
|
|
85
|
+
flexibleVideo?: CustomComponentOverride;
|
|
86
|
+
/**
|
|
87
|
+
* Audio grid component - Grid for audio-only participants
|
|
88
|
+
*/
|
|
89
|
+
audioGrid?: CustomComponentOverride;
|
|
90
|
+
/**
|
|
91
|
+
* Pagination component - Page navigation controls
|
|
92
|
+
*/
|
|
93
|
+
pagination?: CustomComponentOverride;
|
|
94
|
+
/**
|
|
95
|
+
* Primary control buttons component
|
|
96
|
+
*/
|
|
97
|
+
controlButtons?: CustomComponentOverride;
|
|
98
|
+
/**
|
|
99
|
+
* Alternative control buttons component
|
|
100
|
+
*/
|
|
101
|
+
controlButtonsAlt?: CustomComponentOverride;
|
|
102
|
+
/**
|
|
103
|
+
* Touch-optimized control buttons component
|
|
104
|
+
*/
|
|
105
|
+
controlButtonsTouch?: CustomComponentOverride;
|
|
106
|
+
/**
|
|
107
|
+
* Video card component - Individual video participant display
|
|
108
|
+
*/
|
|
109
|
+
videoCard?: CustomComponentOverride;
|
|
110
|
+
/**
|
|
111
|
+
* Audio card component - Individual audio-only participant display
|
|
112
|
+
*/
|
|
113
|
+
audioCard?: CustomComponentOverride;
|
|
114
|
+
/**
|
|
115
|
+
* Mini card component - Minimized participant display
|
|
116
|
+
*/
|
|
117
|
+
miniCard?: CustomComponentOverride;
|
|
118
|
+
/**
|
|
119
|
+
* Mini audio component - Minimized audio indicator
|
|
120
|
+
*/
|
|
121
|
+
miniAudio?: CustomComponentOverride;
|
|
122
|
+
/**
|
|
123
|
+
* Meeting progress timer widget
|
|
124
|
+
*/
|
|
125
|
+
meetingProgressTimer?: CustomComponentOverride;
|
|
126
|
+
/**
|
|
127
|
+
* Mini audio player widget
|
|
128
|
+
*/
|
|
129
|
+
miniAudioPlayer?: CustomComponentOverride;
|
|
130
|
+
/**
|
|
131
|
+
* Loading modal - Displayed during connection/loading
|
|
132
|
+
*/
|
|
133
|
+
loadingModal?: CustomComponentOverride;
|
|
134
|
+
/**
|
|
135
|
+
* Alert component - System notifications and alerts
|
|
136
|
+
*/
|
|
137
|
+
alert?: CustomComponentOverride;
|
|
138
|
+
/**
|
|
139
|
+
* Menu modal - Quick actions menu
|
|
140
|
+
*/
|
|
141
|
+
menuModal?: CustomComponentOverride;
|
|
142
|
+
/**
|
|
143
|
+
* Event settings modal - Host controls and settings
|
|
144
|
+
*/
|
|
145
|
+
eventSettingsModal?: CustomComponentOverride;
|
|
146
|
+
/**
|
|
147
|
+
* Requests modal - Media access requests
|
|
148
|
+
*/
|
|
149
|
+
requestsModal?: CustomComponentOverride;
|
|
150
|
+
/**
|
|
151
|
+
* Waiting room modal - Participant admission queue
|
|
152
|
+
*/
|
|
153
|
+
waitingRoomModal?: CustomComponentOverride;
|
|
154
|
+
/**
|
|
155
|
+
* Co-host modal - Co-host management
|
|
156
|
+
*/
|
|
157
|
+
coHostModal?: CustomComponentOverride;
|
|
158
|
+
/**
|
|
159
|
+
* Media settings modal - Camera/microphone settings
|
|
160
|
+
*/
|
|
161
|
+
mediaSettingsModal?: CustomComponentOverride;
|
|
162
|
+
/**
|
|
163
|
+
* Participants modal - Participant list and management
|
|
164
|
+
*/
|
|
165
|
+
participantsModal?: CustomComponentOverride;
|
|
166
|
+
/**
|
|
167
|
+
* Messages modal - Chat interface
|
|
168
|
+
*/
|
|
169
|
+
messagesModal?: CustomComponentOverride;
|
|
170
|
+
/**
|
|
171
|
+
* Display settings modal - Layout and display preferences
|
|
172
|
+
*/
|
|
173
|
+
displaySettingsModal?: CustomComponentOverride;
|
|
174
|
+
/**
|
|
175
|
+
* Confirm exit modal - Exit confirmation dialog
|
|
176
|
+
*/
|
|
177
|
+
confirmExitModal?: CustomComponentOverride;
|
|
178
|
+
/**
|
|
179
|
+
* Confirm here modal - Attendance confirmation
|
|
180
|
+
*/
|
|
181
|
+
confirmHereModal?: CustomComponentOverride;
|
|
182
|
+
/**
|
|
183
|
+
* Share event modal - Event sharing interface
|
|
184
|
+
*/
|
|
185
|
+
shareEventModal?: CustomComponentOverride;
|
|
186
|
+
/**
|
|
187
|
+
* Recording modal - Recording controls
|
|
188
|
+
*/
|
|
189
|
+
recordingModal?: CustomComponentOverride;
|
|
190
|
+
/**
|
|
191
|
+
* Poll modal - Polling interface
|
|
192
|
+
*/
|
|
193
|
+
pollModal?: CustomComponentOverride;
|
|
194
|
+
/**
|
|
195
|
+
* Background modal - Virtual background settings
|
|
196
|
+
*/
|
|
197
|
+
backgroundModal?: CustomComponentOverride;
|
|
198
|
+
/**
|
|
199
|
+
* Breakout rooms modal - Breakout room management
|
|
200
|
+
*/
|
|
201
|
+
breakoutRoomsModal?: CustomComponentOverride;
|
|
202
|
+
/**
|
|
203
|
+
* Configure whiteboard modal - Whiteboard settings
|
|
204
|
+
*/
|
|
205
|
+
configureWhiteboardModal?: CustomComponentOverride;
|
|
206
|
+
/**
|
|
207
|
+
* Whiteboard component - Collaborative whiteboard
|
|
208
|
+
*/
|
|
209
|
+
whiteboard?: CustomComponentOverride;
|
|
210
|
+
/**
|
|
211
|
+
* Screenboard component - Screen annotation layer
|
|
212
|
+
*/
|
|
213
|
+
screenboard?: CustomComponentOverride;
|
|
214
|
+
/**
|
|
215
|
+
* Screenboard modal - Screen sharing annotation controls
|
|
216
|
+
*/
|
|
217
|
+
screenboardModal?: CustomComponentOverride;
|
|
218
|
+
/**
|
|
219
|
+
* Welcome page - Pre-join welcome/marketing page
|
|
220
|
+
*/
|
|
221
|
+
welcomePage?: CustomComponentOverride;
|
|
222
|
+
/**
|
|
223
|
+
* Pre-join page - Room entry wizard
|
|
224
|
+
*/
|
|
225
|
+
preJoinPage?: CustomComponentOverride;
|
|
226
|
+
/**
|
|
227
|
+
* Custom menu buttons renderer - Custom button group renderer
|
|
228
|
+
*/
|
|
229
|
+
customMenuButtonsRenderer?: CustomComponentOverride;
|
|
230
|
+
/**
|
|
231
|
+
* Consumer resume function - Handles resuming paused media consumers
|
|
232
|
+
*/
|
|
233
|
+
consumerResume?: CustomFunctionOverride<(params: any) => Promise<void>>;
|
|
234
|
+
/**
|
|
235
|
+
* Add videos grid function - Handles adding videos to the grid layout
|
|
236
|
+
*/
|
|
237
|
+
addVideosGrid?: CustomFunctionOverride<(params: any) => Promise<void>>;
|
|
238
|
+
/**
|
|
239
|
+
* Prepopulate user media function - Handles initial setup of user media streams
|
|
240
|
+
*/
|
|
241
|
+
prepopulateUserMedia?: CustomFunctionOverride<(params: any) => Promise<any>>;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Injection token for UI overrides
|
|
245
|
+
* Use this token to provide overrides at the component or module level
|
|
246
|
+
*/
|
|
247
|
+
export declare const MEDIASFU_UI_OVERRIDES: InjectionToken<MediasfuUICustomOverrides>;
|
|
248
|
+
/**
|
|
249
|
+
* Injection token for container styling
|
|
250
|
+
* Allows injecting custom styles for the root container
|
|
251
|
+
*/
|
|
252
|
+
export declare const MEDIASFU_CONTAINER_STYLE: InjectionToken<Record<string, any>>;
|
|
253
|
+
/**
|
|
254
|
+
* Props structure for custom video card components
|
|
255
|
+
*/
|
|
256
|
+
export interface CustomVideoCardProps {
|
|
257
|
+
participant: any;
|
|
258
|
+
showControls?: boolean;
|
|
259
|
+
showInfo?: boolean;
|
|
260
|
+
customStyle?: Record<string, any>;
|
|
261
|
+
parameters?: any;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Type definition for custom video card component
|
|
265
|
+
*/
|
|
266
|
+
export type CustomVideoCardType = Type<any>;
|
|
267
|
+
/**
|
|
268
|
+
* Props structure for custom audio card components
|
|
269
|
+
*/
|
|
270
|
+
export interface CustomAudioCardProps {
|
|
271
|
+
participant: any;
|
|
272
|
+
showControls?: boolean;
|
|
273
|
+
showInfo?: boolean;
|
|
274
|
+
barColor?: string;
|
|
275
|
+
customStyle?: Record<string, any>;
|
|
276
|
+
parameters?: any;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Type definition for custom audio card component
|
|
280
|
+
*/
|
|
281
|
+
export type CustomAudioCardType = Type<any>;
|
|
282
|
+
/**
|
|
283
|
+
* Props structure for custom mini card components
|
|
284
|
+
*/
|
|
285
|
+
export interface CustomMiniCardProps {
|
|
286
|
+
participant: any;
|
|
287
|
+
showControls?: boolean;
|
|
288
|
+
customStyle?: Record<string, any>;
|
|
289
|
+
parameters?: any;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Type definition for custom mini card component
|
|
293
|
+
*/
|
|
294
|
+
export type CustomMiniCardType = Type<any>;
|
|
295
|
+
/**
|
|
296
|
+
* Type definition for custom component that replaces entire UI
|
|
297
|
+
*/
|
|
298
|
+
export type CustomFullComponentType = Type<any>;
|
|
299
|
+
/**
|
|
300
|
+
* Helper type for component override props
|
|
301
|
+
*/
|
|
302
|
+
export type OverrideComponentProps<T = any> = T;
|
|
303
|
+
/**
|
|
304
|
+
* Helper type for extracting component type from override
|
|
305
|
+
*/
|
|
306
|
+
export type ExtractComponentType<T> = T extends CustomComponentOverride<infer C> ? C : never;
|
|
307
|
+
/**
|
|
308
|
+
* Helper type for extracting props type from override
|
|
309
|
+
*/
|
|
310
|
+
export type ExtractPropsType<T> = T extends CustomComponentOverride<any, infer P> ? P : never;
|