mediasfu-angular 2.2.1 → 2.2.3
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 +970 -40
- package/USAGE_COOKBOOK.md +202 -0
- package/dist/LICENSE +21 -0
- package/dist/README.md +970 -40
- package/dist/fesm2022/mediasfu-angular.mjs +30595 -16317
- package/dist/fesm2022/mediasfu-angular.mjs.map +1 -1
- package/dist/lib/@types/types.d.ts +28 -2
- package/dist/lib/@types/ui-overrides.types.d.ts +314 -0
- package/dist/lib/components/background-components/background-modal/background-modal.component.d.ts +1053 -5
- package/dist/lib/components/breakout-components/breakout-rooms-modal.component.d.ts +2126 -51
- package/dist/lib/components/breakout-components/edit-room-modal/edit-room-modal.component.d.ts +1587 -45
- package/dist/lib/components/breakout-components/room-list/room-list.component.d.ts +5 -1
- 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 +98 -28
- package/dist/lib/components/display-components/audio-card/audio-card.component.d.ts +17 -7
- package/dist/lib/components/display-components/audio-grid/audio-grid.component.d.ts +591 -11
- package/dist/lib/components/display-components/card-video-display/card-video-display.component.d.ts +3 -0
- package/dist/lib/components/display-components/control-buttons-alt-component/control-buttons-alt-component.component.d.ts +1 -1
- package/dist/lib/components/display-components/control-buttons-component/control-buttons-component.component.d.ts +34 -2
- package/dist/lib/components/display-components/control-buttons-component-touch/control-buttons-component-touch.component.d.ts +19 -0
- package/dist/lib/components/display-components/control-widgets/control-icon-badge-widget.component.d.ts +13 -0
- package/dist/lib/components/display-components/control-widgets/menu-participants-widget.component.d.ts +1 -0
- package/dist/lib/components/display-components/control-widgets/menu-widget.component.d.ts +2 -2
- package/dist/lib/components/display-components/control-widgets/message-widget.component.d.ts +2 -2
- package/dist/lib/components/display-components/control-widgets/record-timer-widget.component.d.ts +2 -0
- package/dist/lib/components/display-components/control-widgets/screenshare-widget.component.d.ts +5 -3
- package/dist/lib/components/display-components/flexible-grid/flexible-grid.component.d.ts +617 -26
- package/dist/lib/components/display-components/flexible-video/flexible-video.component.d.ts +41 -1
- package/dist/lib/components/display-components/loading-modal/loading-modal.component.d.ts +2024 -10
- 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 +507 -8
- package/dist/lib/components/display-components/main-screen-component/main-screen-component.component.d.ts +508 -7
- package/dist/lib/components/display-components/meeting-progress-timer/meeting-progress-timer.component.d.ts +18 -11
- package/dist/lib/components/display-components/mini-audio/mini-audio.component.d.ts +11 -3
- package/dist/lib/components/display-components/mini-card/mini-card.component.d.ts +1026 -999
- package/dist/lib/components/display-components/mini-card-audio/mini-card-audio.component.d.ts +9 -3
- package/dist/lib/components/display-components/other-grid-component/other-grid-component.component.d.ts +517 -1
- package/dist/lib/components/display-components/pagination/pagination.component.d.ts +34 -1
- package/dist/lib/components/display-components/sub-aspect-component/sub-aspect-component.component.d.ts +513 -2
- package/dist/lib/components/display-components/subtitle-overlay/subtitle-overlay.component.d.ts +6 -0
- package/dist/lib/components/display-components/video-card/video-card.component.d.ts +10 -6
- package/dist/lib/components/display-settings-components/display-settings-modal.component.d.ts +1108 -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 +2622 -4793
- package/dist/lib/components/mediasfu-components/mediasfu-chat.component.d.ts +602 -4140
- package/dist/lib/components/mediasfu-components/mediasfu-conference.component.d.ts +864 -5707
- package/dist/lib/components/mediasfu-components/mediasfu-generic.component.d.ts +2087 -6304
- package/dist/lib/components/mediasfu-components/mediasfu-webinar.component.d.ts +650 -5707
- package/dist/lib/components/menu-components/custom-buttons/custom-buttons.component.d.ts +26 -4
- package/dist/lib/components/menu-components/meeting-id-component/meeting-id-component.component.d.ts +80 -1
- package/dist/lib/components/menu-components/meeting-passcode-component/meeting-passcode-component.component.d.ts +46 -1
- package/dist/lib/components/menu-components/menu-modal/menu-modal.component.d.ts +706 -15
- package/dist/lib/components/menu-components/share-buttons-component/share-buttons-component.component.d.ts +49 -2
- package/dist/lib/components/message-components/messages-modal/messages-modal.component.d.ts +79 -16
- package/dist/lib/components/misc-components/confirm-here-modal/confirm-here-modal.component.d.ts +1113 -17
- package/dist/lib/components/misc-components/pre-join-page/pre-join-page.component.d.ts +4 -0
- package/dist/lib/components/misc-components/share-event-modal/share-event-modal.component.d.ts +1114 -29
- package/dist/lib/components/panelists-components/panelists-modal/panelists-modal.component.d.ts +73 -0
- package/dist/lib/components/participants-components/participants-modal/participants-modal.component.d.ts +1084 -6
- package/dist/lib/components/permissions-components/permissions-modal/permissions-modal.component.d.ts +89 -0
- 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 +1055 -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/translation-components/translation-settings-modal/translation-settings-modal.component.d.ts +124 -0
- 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 +2117 -22
- package/dist/lib/components/whiteboard-components/whiteboard/whiteboard.component.d.ts +3 -15
- package/dist/lib/consumers/add-videos-grid.service.d.ts +3 -0
- package/dist/lib/consumers/auto-adjust.service.d.ts +0 -11
- package/dist/lib/consumers/calculate-rows-and-columns.service.d.ts +0 -7
- package/dist/lib/consumers/change-vids.service.d.ts +1 -1
- package/dist/lib/consumers/check-permission.service.d.ts +4 -1
- package/dist/lib/consumers/check-screen-share.service.d.ts +0 -18
- package/dist/lib/consumers/compare-active-names.service.d.ts +0 -16
- package/dist/lib/consumers/compare-screen-states.service.d.ts +0 -18
- package/dist/lib/consumers/connect-ips.service.d.ts +5 -26
- package/dist/lib/consumers/connect-local-ips.service.d.ts +1 -28
- 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/disp-streams.service.d.ts +1 -110
- package/dist/lib/consumers/generate-page-content.service.d.ts +0 -17
- package/dist/lib/consumers/get-estimate.service.d.ts +0 -21
- package/dist/lib/consumers/mix-streams.service.d.ts +0 -19
- package/dist/lib/consumers/on-screen-changes.service.d.ts +1 -21
- package/dist/lib/consumers/prepopulate-user-media.service.d.ts +3 -0
- package/dist/lib/consumers/process-consumer-transports-audio.service.d.ts +1 -14
- package/dist/lib/consumers/process-consumer-transports.service.d.ts +3 -57
- package/dist/lib/consumers/re-update-inter.service.d.ts +1 -39
- package/dist/lib/consumers/reorder-streams.service.d.ts +1 -35
- 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 +5 -14
- package/dist/lib/consumers/socket-receive-methods/new-pipe-producer.service.d.ts +4 -14
- package/dist/lib/consumers/socket-receive-methods/producer-closed.service.d.ts +1 -8
- 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/consumers/translation-consumer-switch.service.d.ts +68 -0
- package/dist/lib/consumers/trigger.service.d.ts +0 -79
- package/dist/lib/consumers/update-mini-cards-grid.service.d.ts +0 -24
- package/dist/lib/directives/with-override.directive.d.ts +76 -0
- package/dist/lib/methods/background-methods/launch-background.service.d.ts +2 -5
- package/dist/lib/methods/breakout-room-methods/launch-breakout-rooms.service.d.ts +2 -5
- package/dist/lib/methods/co-host-methods/launch-co-host.service.d.ts +2 -5
- package/dist/lib/methods/co-host-methods/modify-co-host-settings.service.d.ts +1 -1
- package/dist/lib/methods/display-settings-methods/launch-display-settings.service.d.ts +2 -5
- package/dist/lib/methods/display-settings-methods/modify-display-settings.service.d.ts +2 -0
- package/dist/lib/methods/exit-methods/launch-confirm-exit.service.d.ts +2 -5
- package/dist/lib/methods/menu-methods/launch-menu-modal.service.d.ts +2 -5
- package/dist/lib/methods/message-methods/launch-messages.service.d.ts +2 -5
- package/dist/lib/methods/panelists-methods/add-panelist.service.d.ts +19 -0
- package/dist/lib/methods/panelists-methods/focus-panelists.service.d.ts +19 -0
- package/dist/lib/methods/panelists-methods/remove-panelist.service.d.ts +17 -0
- package/dist/lib/methods/participants-methods/launch-participants.service.d.ts +2 -5
- package/dist/lib/methods/permissions-methods/bulk-update-participant-permissions.service.d.ts +20 -0
- package/dist/lib/methods/permissions-methods/update-participant-permission.service.d.ts +19 -0
- package/dist/lib/methods/permissions-methods/update-permission-config.service.d.ts +29 -0
- package/dist/lib/methods/polls-methods/handle-create-poll.service.d.ts +1 -1
- package/dist/lib/methods/polls-methods/handle-end-poll.service.d.ts +1 -1
- package/dist/lib/methods/polls-methods/handle-vote-poll.service.d.ts +1 -1
- package/dist/lib/methods/polls-methods/poll-updated.service.d.ts +1 -1
- package/dist/lib/methods/recording-methods/check-pause-state.service.d.ts +1 -12
- package/dist/lib/methods/recording-methods/check-resume-state.service.d.ts +1 -11
- package/dist/lib/methods/recording-methods/confirm-recording.service.d.ts +0 -94
- package/dist/lib/methods/recording-methods/launch-recording.service.d.ts +1 -20
- package/dist/lib/methods/recording-methods/record-pause-timer.service.d.ts +1 -12
- package/dist/lib/methods/recording-methods/record-resume-timer.service.d.ts +0 -66
- package/dist/lib/methods/recording-methods/record-start-timer.service.d.ts +1 -33
- package/dist/lib/methods/recording-methods/record-update-timer.service.d.ts +1 -17
- package/dist/lib/methods/recording-methods/start-recording.service.d.ts +1 -92
- package/dist/lib/methods/recording-methods/stop-recording.service.d.ts +1 -42
- package/dist/lib/methods/recording-methods/update-recording.service.d.ts +1 -94
- package/dist/lib/methods/requests-methods/launch-requests.service.d.ts +2 -5
- package/dist/lib/methods/settings-methods/launch-settings.service.d.ts +2 -5
- package/dist/lib/methods/settings-methods/modify-settings.service.d.ts +1 -1
- package/dist/lib/methods/stream-methods/click-chat.service.d.ts +1 -1
- package/dist/lib/methods/utils/get-modal-position.util.d.ts +0 -3
- package/dist/lib/methods/utils/initial-values.util.d.ts +25 -3
- package/dist/lib/methods/utils/mini-audio-player/mini-audio-player.component.d.ts +11 -1
- package/dist/lib/methods/utils/producer/a-params.service.d.ts +2 -5
- package/dist/lib/methods/utils/producer/h-params.service.d.ts +2 -5
- package/dist/lib/methods/utils/producer/screen-params.service.d.ts +2 -5
- package/dist/lib/methods/utils/producer/v-params.service.d.ts +2 -5
- package/dist/lib/methods/utils/sound-player.service.d.ts +1 -1
- package/dist/lib/methods/utils/translation-languages.util.d.ts +341 -0
- package/dist/lib/methods/waiting-methods/launch-waiting.service.d.ts +2 -5
- package/dist/lib/methods/whiteboard-methods/capture-canvas-stream.service.d.ts +3 -1
- package/dist/lib/modern/display-components/modern-alert.component.d.ts +40 -0
- package/dist/lib/modern/display-components/modern-loading-modal.component.d.ts +37 -0
- package/dist/lib/modern/display-components/modern-meeting-progress-timer.component.d.ts +40 -0
- package/dist/lib/modern/display-components/modern-mini-card.component.d.ts +1064 -0
- package/dist/lib/modern/display-components/modern-pagination.component.d.ts +91 -0
- package/dist/lib/modern/display-components/modern-participants-counter-badge.component.d.ts +16 -0
- package/dist/lib/modern/modal-components/modern-co-host-modal.component.d.ts +63 -0
- package/dist/lib/modern/modal-components/modern-confirm-exit-modal.component.d.ts +42 -0
- package/dist/lib/modern/modal-components/modern-confirm-here-modal.component.d.ts +39 -0
- package/dist/lib/modern/modal-components/modern-display-settings-modal.component.d.ts +59 -0
- package/dist/lib/modern/modal-components/modern-event-settings-modal.component.d.ts +80 -0
- package/dist/lib/modern/modal-components/modern-media-settings-modal.component.d.ts +72 -0
- package/dist/lib/modern/modal-components/modern-menu-modal.component.d.ts +48 -0
- package/dist/lib/modern/modal-components/modern-messages-modal.component.d.ts +58 -0
- package/dist/lib/modern/modal-components/modern-participants-modal.component.d.ts +49 -0
- package/dist/lib/modern/modal-components/modern-poll-modal.component.d.ts +54 -0
- package/dist/lib/modern/modal-components/modern-recording-modal.component.d.ts +39 -0
- package/dist/lib/modern/modal-components/modern-requests-modal.component.d.ts +61 -0
- package/dist/lib/modern/modal-components/modern-share-event-modal.component.d.ts +39 -0
- package/dist/lib/modern/modal-components/modern-waiting-room-modal.component.d.ts +55 -0
- package/dist/lib/modern/primitives/modern-button.component.d.ts +10 -0
- package/dist/lib/modern/primitives/modern-entry-shell.component.d.ts +6 -0
- package/dist/lib/modern/primitives/modern-field.component.d.ts +32 -0
- package/dist/lib/modern/primitives/modern-sidebar-panel.component.d.ts +24 -0
- package/dist/lib/modern/primitives/modern-surface.component.d.ts +7 -0
- package/dist/lib/modern/utils/render-mode.utils.d.ts +3 -0
- package/dist/lib/producer-client/producer-client-emits/create-device-client.service.d.ts +4 -10
- package/dist/lib/producer-client/producer-client-emits/join-room-client.service.d.ts +0 -19
- package/dist/lib/producer-client/producer-client-emits/update-room-parameters-client.service.d.ts +8 -63
- package/dist/lib/producers/producer-emits/join-con-room.service.d.ts +3 -19
- package/dist/lib/producers/producer-emits/join-local-room.service.d.ts +3 -106
- package/dist/lib/producers/producer-emits/join-room.service.d.ts +0 -18
- package/dist/lib/producers/socket-receive-methods/added-as-panelist.service.d.ts +15 -0
- package/dist/lib/producers/socket-receive-methods/all-members-rest.service.d.ts +1 -90
- package/dist/lib/producers/socket-receive-methods/all-members.service.d.ts +1 -88
- package/dist/lib/producers/socket-receive-methods/control-media-host.service.d.ts +1 -66
- package/dist/lib/producers/socket-receive-methods/get-domains.service.d.ts +3 -1
- package/dist/lib/producers/socket-receive-methods/meeting-still-there.service.d.ts +1 -1
- package/dist/lib/producers/socket-receive-methods/panelist-focus-changed.service.d.ts +25 -0
- package/dist/lib/producers/socket-receive-methods/panelists-updated.service.d.ts +19 -0
- package/dist/lib/producers/socket-receive-methods/permission-config-updated.service.d.ts +15 -0
- package/dist/lib/producers/socket-receive-methods/permission-updated.service.d.ts +17 -0
- package/dist/lib/producers/socket-receive-methods/person-joined.service.d.ts +1 -1
- package/dist/lib/producers/socket-receive-methods/producer-media-paused.service.d.ts +0 -80
- package/dist/lib/producers/socket-receive-methods/producer-media-resumed.service.d.ts +1 -1
- package/dist/lib/producers/socket-receive-methods/receive-control-media.service.d.ts +21 -0
- package/dist/lib/producers/socket-receive-methods/recording-notice.service.d.ts +1 -5
- package/dist/lib/producers/socket-receive-methods/removed-from-panelists.service.d.ts +15 -0
- package/dist/lib/producers/socket-receive-methods/room-record-params.service.d.ts +1 -1
- package/dist/lib/producers/socket-receive-methods/translation-receive-methods.service.d.ts +20 -0
- package/dist/lib/services/live-subtitle.service.d.ts +15 -0
- package/dist/lib/services/ui-override-resolver.service.d.ts +91 -0
- package/dist/lib/sockets/socket-manager.service.d.ts +1 -2
- package/dist/public-api.d.ts +46 -1
- package/package.json +106 -95
- package/dist/lib/methods/utils/producer/video-capture-constraints.service.d.ts +0 -177
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# MediaSFU Angular Usage Cookbook
|
|
2
|
+
|
|
3
|
+
Recipe-oriented examples for the most common MediaSFU Angular integration paths.
|
|
4
|
+
|
|
5
|
+
MediaSFU Angular is still a frontend SDK, so every recipe assumes you have either:
|
|
6
|
+
|
|
7
|
+
- MediaSFU Cloud credentials, or
|
|
8
|
+
- a self-hosted MediaSFU Open deployment reachable through `localLink`.
|
|
9
|
+
|
|
10
|
+
## Recipe 1: Ship the Prebuilt Room Fast
|
|
11
|
+
|
|
12
|
+
Use this when you want the quickest path to a production-ready room with the bundled prejoin and room shell.
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { Component } from '@angular/core';
|
|
16
|
+
import { MediasfuGeneric } from 'mediasfu-angular';
|
|
17
|
+
|
|
18
|
+
@Component({
|
|
19
|
+
selector: 'app-root',
|
|
20
|
+
standalone: true,
|
|
21
|
+
imports: [MediasfuGeneric],
|
|
22
|
+
template: `
|
|
23
|
+
<app-mediasfu-generic
|
|
24
|
+
[credentials]="credentials"
|
|
25
|
+
[connectMediaSFU]="true">
|
|
26
|
+
</app-mediasfu-generic>
|
|
27
|
+
`,
|
|
28
|
+
})
|
|
29
|
+
export class AppComponent {
|
|
30
|
+
readonly credentials = {
|
|
31
|
+
apiUserName: 'your-api-username',
|
|
32
|
+
apiKey: 'your-64-char-api-key',
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Use this path for conference rooms, webinars, broadcasts, or chat when you want MediaSFU to own the UI and real-time orchestration.
|
|
38
|
+
|
|
39
|
+
## Recipe 2: Point the Same UI at MediaSFU Open
|
|
40
|
+
|
|
41
|
+
Use this when you want the bundled Angular UI but your own backend deployment.
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
import { Component } from '@angular/core';
|
|
45
|
+
import { MediasfuGeneric } from 'mediasfu-angular';
|
|
46
|
+
|
|
47
|
+
@Component({
|
|
48
|
+
selector: 'app-root',
|
|
49
|
+
standalone: true,
|
|
50
|
+
imports: [MediasfuGeneric],
|
|
51
|
+
template: `
|
|
52
|
+
<app-mediasfu-generic
|
|
53
|
+
[localLink]="localLink"
|
|
54
|
+
[connectMediaSFU]="true">
|
|
55
|
+
</app-mediasfu-generic>
|
|
56
|
+
`,
|
|
57
|
+
})
|
|
58
|
+
export class AppComponent {
|
|
59
|
+
readonly localLink = 'http://localhost:3000';
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Set `localLink` to your MediaSFU Open server and keep the rest of the Angular room shell intact.
|
|
64
|
+
|
|
65
|
+
## Recipe 3: Run Headless and Capture Runtime Helpers
|
|
66
|
+
|
|
67
|
+
Use this when you want MediaSFU transports, sockets, and room lifecycle helpers, but you plan to render your own Angular UI.
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
import { Component } from '@angular/core';
|
|
71
|
+
import { MediasfuGeneric } from 'mediasfu-angular';
|
|
72
|
+
|
|
73
|
+
@Component({
|
|
74
|
+
selector: 'app-root',
|
|
75
|
+
standalone: true,
|
|
76
|
+
imports: [MediasfuGeneric],
|
|
77
|
+
template: `
|
|
78
|
+
<app-mediasfu-generic
|
|
79
|
+
[credentials]="credentials"
|
|
80
|
+
[returnUI]="false"
|
|
81
|
+
[noUIPreJoinOptions]="preJoinOptions"
|
|
82
|
+
[sourceParameters]="sourceParameters"
|
|
83
|
+
[updateSourceParameters]="handleSourceParameters">
|
|
84
|
+
</app-mediasfu-generic>
|
|
85
|
+
|
|
86
|
+
<app-custom-room-shell
|
|
87
|
+
[helpers]="sourceParameters">
|
|
88
|
+
</app-custom-room-shell>
|
|
89
|
+
`,
|
|
90
|
+
})
|
|
91
|
+
export class AppComponent {
|
|
92
|
+
readonly credentials = {
|
|
93
|
+
apiUserName: 'your-api-username',
|
|
94
|
+
apiKey: 'your-64-char-api-key',
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
sourceParameters: Record<string, unknown> = {};
|
|
98
|
+
|
|
99
|
+
readonly preJoinOptions = {
|
|
100
|
+
action: 'join' as const,
|
|
101
|
+
meetingID: 'demo-room',
|
|
102
|
+
userName: 'Ada',
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
handleSourceParameters = (data: Record<string, unknown>): void => {
|
|
106
|
+
this.sourceParameters = data;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
This is the easiest bridge from the packaged SDK to a fully custom Angular room experience.
|
|
112
|
+
|
|
113
|
+
## Recipe 4: Keep the Runtime, Replace the Main Shell
|
|
114
|
+
|
|
115
|
+
Use this when you want MediaSFU to keep its room state and media helpers, but you want your own workspace layout instead of the default main container.
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
import { Component } from '@angular/core';
|
|
119
|
+
import { MediasfuGeneric } from 'mediasfu-angular';
|
|
120
|
+
import { CustomRoomShellComponent } from './custom-room-shell.component';
|
|
121
|
+
|
|
122
|
+
@Component({
|
|
123
|
+
selector: 'app-root',
|
|
124
|
+
standalone: true,
|
|
125
|
+
imports: [MediasfuGeneric],
|
|
126
|
+
template: `
|
|
127
|
+
<app-mediasfu-generic
|
|
128
|
+
[credentials]="credentials"
|
|
129
|
+
[customMainComponent]="customRoomShell"
|
|
130
|
+
[connectMediaSFU]="true">
|
|
131
|
+
</app-mediasfu-generic>
|
|
132
|
+
`,
|
|
133
|
+
})
|
|
134
|
+
export class AppComponent {
|
|
135
|
+
readonly credentials = {
|
|
136
|
+
apiUserName: 'your-api-username',
|
|
137
|
+
apiKey: 'your-64-char-api-key',
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
readonly customRoomShell = CustomRoomShellComponent;
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Use `customMainComponent` when you want dashboards, CRM panels, or product-specific workflow chrome wrapped around the MediaSFU runtime.
|
|
145
|
+
|
|
146
|
+
## Recipe 5: Override Specific UI Surfaces
|
|
147
|
+
|
|
148
|
+
Use this when the default room is close to what you need and you only want to replace selected cards, modals, or layout surfaces.
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
import { Component } from '@angular/core';
|
|
152
|
+
import {
|
|
153
|
+
MediasfuGeneric,
|
|
154
|
+
type MediasfuUICustomOverrides,
|
|
155
|
+
} from 'mediasfu-angular';
|
|
156
|
+
import { CustomMiniCardComponent } from './custom-mini-card.component';
|
|
157
|
+
|
|
158
|
+
@Component({
|
|
159
|
+
selector: 'app-root',
|
|
160
|
+
standalone: true,
|
|
161
|
+
imports: [MediasfuGeneric],
|
|
162
|
+
template: `
|
|
163
|
+
<app-mediasfu-generic
|
|
164
|
+
[credentials]="credentials"
|
|
165
|
+
[customMiniCard]="customMiniCard"
|
|
166
|
+
[uiOverrides]="uiOverrides"
|
|
167
|
+
[containerStyle]="containerStyle">
|
|
168
|
+
</app-mediasfu-generic>
|
|
169
|
+
`,
|
|
170
|
+
})
|
|
171
|
+
export class AppComponent {
|
|
172
|
+
readonly credentials = {
|
|
173
|
+
apiUserName: 'your-api-username',
|
|
174
|
+
apiKey: 'your-64-char-api-key',
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
readonly customMiniCard = CustomMiniCardComponent;
|
|
178
|
+
|
|
179
|
+
readonly containerStyle = {
|
|
180
|
+
minHeight: '100vh',
|
|
181
|
+
background: '#0f172a',
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
readonly uiOverrides: MediasfuUICustomOverrides = {
|
|
185
|
+
chat: {
|
|
186
|
+
props: {
|
|
187
|
+
title: 'Support Chat',
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
This path is usually the best middle ground when you want product branding and selective behavior changes without re-owning the whole room shell.
|
|
195
|
+
|
|
196
|
+
## Recipe Picker
|
|
197
|
+
|
|
198
|
+
- Choose Recipe 1 if speed matters more than customization.
|
|
199
|
+
- Choose Recipe 2 if you already run MediaSFU Open.
|
|
200
|
+
- Choose Recipe 3 if you want a fully bespoke Angular UI.
|
|
201
|
+
- Choose Recipe 4 if you want a custom shell but still want the packaged runtime to drive it.
|
|
202
|
+
- Choose Recipe 5 if you only need targeted visual or workflow overrides.
|
package/dist/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 MediaSFU
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|