mediasfu-angular 2.2.2 → 2.2.4
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 +153 -54
- package/USAGE_COOKBOOK.md +202 -0
- package/dist/LICENSE +21 -0
- package/dist/README.md +153 -54
- package/dist/fesm2022/mediasfu-angular.mjs +21838 -12606
- package/dist/fesm2022/mediasfu-angular.mjs.map +1 -1
- package/dist/lib/@types/types.d.ts +22 -1
- package/dist/lib/@types/ui-overrides.types.d.ts +4 -0
- package/dist/lib/components/background-components/background-modal/background-modal.component.d.ts +1024 -997
- package/dist/lib/components/breakout-components/breakout-rooms-modal.component.d.ts +2052 -1001
- package/dist/lib/components/breakout-components/edit-room-modal/edit-room-modal.component.d.ts +1527 -997
- 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 +988 -988
- package/dist/lib/components/display-components/alert-component/alert.component.component.d.ts +20 -6
- 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 +509 -1
- 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 +530 -2
- 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 +2029 -5
- package/dist/lib/components/display-components/main-grid-component/main-grid-component.component.d.ts +506 -1
- package/dist/lib/components/display-components/main-screen-component/main-screen-component.component.d.ts +497 -497
- 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 +511 -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 +507 -1
- 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 +1010 -1009
- package/dist/lib/components/event-settings-components/event-settings-modal/event-settings-modal.component.d.ts +999 -999
- package/dist/lib/components/media-settings-components/media-settings-modal/media-settings-modal.component.d.ts +999 -999
- package/dist/lib/components/mediasfu-components/mediasfu-broadcast.component.d.ts +2318 -29330
- package/dist/lib/components/mediasfu-components/mediasfu-chat.component.d.ts +490 -4179
- package/dist/lib/components/mediasfu-components/mediasfu-conference.component.d.ts +576 -23394
- package/dist/lib/components/mediasfu-components/mediasfu-generic.component.d.ts +1292 -61696
- package/dist/lib/components/mediasfu-components/mediasfu-webinar.component.d.ts +524 -26273
- package/dist/lib/components/menu-components/custom-buttons/custom-buttons.component.d.ts +4 -1
- package/dist/lib/components/menu-components/meeting-id-component/meeting-id-component.component.d.ts +3 -1
- package/dist/lib/components/menu-components/meeting-passcode-component/meeting-passcode-component.component.d.ts +10 -1
- package/dist/lib/components/menu-components/menu-modal/menu-modal.component.d.ts +518 -507
- package/dist/lib/components/menu-components/share-buttons-component/share-buttons-component.component.d.ts +4 -1
- package/dist/lib/components/message-components/message-panel/message-panel.component.d.ts +1 -0
- package/dist/lib/components/message-components/messages-modal/messages-modal.component.d.ts +3 -3
- package/dist/lib/components/misc-components/confirm-here-modal/confirm-here-modal.component.d.ts +1004 -1004
- 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 +989 -989
- 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 +1004 -1004
- 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 +989 -989
- package/dist/lib/components/recording-components/recording-modal/recording-modal.component.d.ts +990 -989
- package/dist/lib/components/requests-components/requests-modal/requests-modal.component.d.ts +1004 -1004
- package/dist/lib/components/screenboard-components/screenboard-modal/screenboard-modal.component.d.ts +987 -987
- 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 +989 -989
- package/dist/lib/components/whiteboard-components/configure-whiteboard-modal/configure-whiteboard-modal.component.d.ts +2062 -1000
- package/dist/lib/components/whiteboard-components/whiteboard/whiteboard.component.d.ts +3 -15
- 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 +2 -25
- package/dist/lib/consumers/connect-local-ips.service.d.ts +1 -28
- 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/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/socket-receive-methods/join-consume-room.service.d.ts +2 -13
- package/dist/lib/consumers/socket-receive-methods/new-pipe-producer.service.d.ts +1 -13
- package/dist/lib/consumers/socket-receive-methods/producer-closed.service.d.ts +1 -8
- 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 +2 -2
- 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/message-methods/send-message.service.d.ts +1 -1
- 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 +18 -1
- package/dist/lib/methods/utils/mini-audio-player/mini-audio-player.component.d.ts +8 -0
- package/dist/lib/methods/utils/producer/a-params.service.d.ts +2 -8
- package/dist/lib/methods/utils/producer/h-params.service.d.ts +2 -8
- package/dist/lib/methods/utils/producer/screen-params.service.d.ts +2 -8
- package/dist/lib/methods/utils/producer/v-params.service.d.ts +2 -8
- 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/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 +0 -9
- 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 +5 -62
- package/dist/lib/producers/producer-emits/join-con-room.service.d.ts +0 -18
- 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/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/sockets/socket-manager.service.d.ts +1 -2
- package/dist/public-api.d.ts +42 -1
- package/package.json +106 -95
- package/dist/lib/methods/utils/producer/video-capture-constraints.service.d.ts +0 -177
package/README.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
# MediaSFU Angular SDK · [mediasfu-angular on npm](https://www.npmjs.com/package/mediasfu-angular)
|
|
2
|
+
|
|
3
|
+
**mediasfu-angular** is the Angular 17/18/19 WebRTC SDK for video conferencing, webinars, live streaming, broadcast, screen sharing, whiteboard, chat, recording, live subtitles, translation, and AI agent rooms — powered by MediaSFU Cloud or your self-hosted MediaSFU Open server. Install with `npm install mediasfu-angular`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
<p align="center">
|
|
2
8
|
<img src="https://www.mediasfu.com/logo192.png" width="100" alt="MediaSFU Logo">
|
|
3
9
|
</p>
|
|
@@ -37,49 +43,122 @@
|
|
|
37
43
|
|
|
38
44
|
---
|
|
39
45
|
|
|
40
|
-
|
|
46
|
+
# MediaSFU Angular SDK
|
|
41
47
|
|
|
42
|
-
|
|
43
|
-
- 🇺🇸 **+1 (785) 369-1724** - Mixed Support Demo
|
|
44
|
-
- 🇬🇧 **+44 7445 146575** - AI Conversation Demo
|
|
45
|
-
- 🇨🇦 **+1 (587) 407-1990** - Technical Support Demo
|
|
46
|
-
- 🇨🇦 **+1 (647) 558-6650** - Friendly AI Chat Demo
|
|
48
|
+
**Prebuilt Angular SDK for WebRTC video conferencing, webinars, livestreams, chat, screen sharing, recording, breakout rooms, whiteboards, polls, live subtitles, and translation.**
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
MediaSFU Angular is an Angular video conferencing SDK with prebuilt room components for meetings, webinars, livestream-style broadcasts, and chat-first rooms. It gives you production-ready room UI plus the lower-level helpers needed to move from a full prebuilt experience to a deeply customized Angular app without rewriting the media stack.
|
|
49
51
|
|
|
50
|
-
|
|
51
|
-
✅ **Works with ANY SIP provider** (Twilio, Telnyx, Zadarma, etc.)
|
|
52
|
-
✅ **Seamless AI-to-human handoffs**
|
|
53
|
-
✅ **Real-time call analytics & transcription**
|
|
52
|
+
## Quick Start: First Working Room
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
```bash
|
|
55
|
+
npm install mediasfu-angular
|
|
56
|
+
```
|
|
56
57
|
|
|
57
|
-
|
|
58
|
+
```typescript
|
|
59
|
+
credentials = {
|
|
60
|
+
apiUserName: 'your-user',
|
|
61
|
+
apiKey: 'your-key',
|
|
62
|
+
};
|
|
63
|
+
```
|
|
58
64
|
|
|
59
|
-
|
|
65
|
+
```html
|
|
66
|
+
<app-mediasfu-generic
|
|
67
|
+
[credentials]="credentials"
|
|
68
|
+
[connectMediaSFU]="true"
|
|
69
|
+
></app-mediasfu-generic>
|
|
70
|
+
```
|
|
60
71
|
|
|
61
|
-
|
|
72
|
+
That is the fastest path to a working Angular video conferencing room. Once the secure create/join path works, layer in branding, overrides, or a fully custom shell.
|
|
62
73
|
|
|
63
|
-
|
|
74
|
+
## Pick the Right Angular Room Component
|
|
64
75
|
|
|
65
|
-
|
|
76
|
+
Use this table to match each Angular room component to the product shape you are building.
|
|
66
77
|
|
|
67
|
-
|
|
78
|
+
| Component | Best for | What users get | When to choose it |
|
|
79
|
+
| --- | --- | --- | --- |
|
|
80
|
+
| `app-mediasfu-generic` | General meetings, team calls, product defaults | Balanced room layout with the broadest starter path | Start here if you are unsure which room type fits best. |
|
|
81
|
+
| `app-mediasfu-webinar` | Host-led presentations, audience participation, stage-centric events | Webinar-style room flow with participant management and moderation surfaces | Choose this when one or a few presenters lead a larger audience. |
|
|
82
|
+
| `app-mediasfu-broadcast` | Livestream-style shows, creator dashboards, host-first production flows | Broadcast-oriented shell with invite/share and host control emphasis | Choose this when the host workflow matters more than equal participant presence. |
|
|
83
|
+
| `app-mediasfu-chat` | Text-first support rooms, low-bandwidth collaboration, chat-centric experiences | Message-forward room UI with the same create/join/runtime foundation | Choose this when conversation is the product and audio/video are secondary. |
|
|
84
|
+
| `app-mediasfu-conference` | Collaborative multi-speaker events, panels, classes, workshops | Multi-participant conference layout with richer shared-presence expectations | Choose this when many participants are expected to be visibly active. |
|
|
85
|
+
|
|
86
|
+
## Least Confusing Start Path
|
|
87
|
+
|
|
88
|
+
1. Start with `app-mediasfu-generic` and validate one successful create/join flow.
|
|
89
|
+
2. Decide backend mode early: MediaSFU Cloud or self-hosted MediaSFU Open.
|
|
90
|
+
3. Move to `app-mediasfu-webinar`, `app-mediasfu-broadcast`, or `app-mediasfu-chat` only after the base room flow is working.
|
|
91
|
+
4. Use `uiOverrides`, custom cards, and `customMainComponent` before going fully headless.
|
|
92
|
+
5. Switch to `returnUI="false"` only when you already know which MediaSFU runtime helpers your product needs.
|
|
93
|
+
|
|
94
|
+
## Common Angular Product Shapes
|
|
95
|
+
|
|
96
|
+
Use MediaSFU Angular when you need one of these product patterns:
|
|
97
|
+
|
|
98
|
+
- Angular video meeting UI with secure create/join flow.
|
|
99
|
+
- Angular webinar UI with host, audience, and moderation surfaces.
|
|
100
|
+
- Angular broadcast UI for livestream or creator-style host workflows.
|
|
101
|
+
- Angular chat room UI with MediaSFU room orchestration behind it.
|
|
102
|
+
- Angular collaboration rooms with recording, screen share, whiteboard, polls, captions, and translation in one SDK.
|
|
103
|
+
|
|
104
|
+
## Why teams use MediaSFU Angular
|
|
68
105
|
|
|
69
|
-
|
|
106
|
+
- **Start fast** with prebuilt room components such as `MediasfuGeneric`, `MediasfuConference`, `MediasfuWebinar`, `MediasfuBroadcast`, and `MediasfuChat`.
|
|
107
|
+
- **Customize progressively** with `uiOverrides`, custom cards, custom layouts, and shared room helper state.
|
|
108
|
+
- **Go headless when needed** by setting `returnUI="false"` and wiring MediaSFU runtime helpers into your own Angular workspace.
|
|
109
|
+
- **Ship collaboration features together**: voice, video, screen share, recording, whiteboard, breakout rooms, chat, polls, and translation in one SDK.
|
|
70
110
|
|
|
71
|
-
##
|
|
111
|
+
## Choose Your Path
|
|
72
112
|
|
|
73
|
-
|
|
113
|
+
- **Beginner**: install the package, render a prebuilt room, and connect to MediaSFU Cloud or your self-hosted server.
|
|
114
|
+
- **Intermediate**: override cards, modals, and layout surfaces while keeping MediaSFU's room orchestration and transports.
|
|
115
|
+
- **Advanced**: run the runtime headless, consume `sourceParameters`, and build a fully custom Angular UI on top of the same media/session core.
|
|
74
116
|
|
|
75
|
-
|
|
117
|
+
## Important: Backend Required
|
|
76
118
|
|
|
77
|
-
|
|
78
|
-
|
|
119
|
+
MediaSFU Angular is a frontend SDK. You still need a MediaSFU-compatible backend for signaling, media routing, and room lifecycle.
|
|
120
|
+
|
|
121
|
+
| Option | Best for | Link |
|
|
122
|
+
| --- | --- | --- |
|
|
123
|
+
| **MediaSFU Cloud** | Managed production deployments, faster onboarding, less infrastructure work | [MediaSFU Cloud docs](https://www.mediasfu.com/documentation#rooms) |
|
|
124
|
+
| **MediaSFU Open** | Self-hosting, local control, private infrastructure | [MediaSFU Open](https://github.com/MediaSFU/MediaSFUOpen) |
|
|
125
|
+
|
|
126
|
+
## Start Here
|
|
127
|
+
|
|
128
|
+
- Want the fastest path to a running room? Jump to [Quick Start](#quick-start-5-minutes).
|
|
129
|
+
- Want copy-paste recipes for different integration levels? Use the [Usage Cookbook](#usage-cookbook) section just below.
|
|
130
|
+
- Want to understand the Angular surface area first? Read [Quick Reference: Component Props & UI Overrides](#quick-reference-component-props--ui-overrides).
|
|
131
|
+
- Want architecture and customization depth? Continue with the [Angular SDK Guide](#angular-sdk-guide).
|
|
132
|
+
- Want self-hosted deployment context? Review [MediaSFU Open](https://github.com/MediaSFU/MediaSFUOpen) alongside this SDK guide.
|
|
133
|
+
|
|
134
|
+
## Usage Cookbook
|
|
135
|
+
|
|
136
|
+
Need recipe-style Angular guidance instead of reading the full guide front to back? Use this quick picker:
|
|
137
|
+
|
|
138
|
+
| Goal | Recommended setup |
|
|
139
|
+
| --- | --- |
|
|
140
|
+
| Ship the bundled room fast | Render `app-mediasfu-generic` with `credentials` and `connectMediaSFU="true"`. |
|
|
141
|
+
| Use MediaSFU Open | Keep the same component and pass `localLink` to your self-hosted server. |
|
|
142
|
+
| Run the runtime headless | Set `returnUI="false"`, pass `noUIPreJoinOptions`, and capture helpers through `updateSourceParameters`. |
|
|
143
|
+
| Replace the main room shell | Keep MediaSFU's transports and room lifecycle, but pass `customMainComponent`. |
|
|
144
|
+
| Override selected surfaces | Keep the default shell and layer `uiOverrides`, `customVideoCard`, `customAudioCard`, `customMiniCard`, and `containerStyle`. |
|
|
145
|
+
|
|
146
|
+
Source-repo readers can also use the standalone `USAGE_COOKBOOK.md` file for copy-paste examples.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
# Angular SDK Guide
|
|
151
|
+
|
|
152
|
+
MediaSFU Community Edition remains available if you want to self-host the backend and keep full infrastructure control. If you want managed infrastructure, use MediaSFU Cloud with the same Angular SDK surface.
|
|
79
153
|
|
|
80
154
|
---
|
|
81
155
|
|
|
82
156
|
## Table of Contents
|
|
157
|
+
- [Why teams use MediaSFU Angular](#why-teams-use-mediasfu-angular)
|
|
158
|
+
- [Choose Your Path](#choose-your-path)
|
|
159
|
+
- [Important: Backend Required](#important-backend-required)
|
|
160
|
+
- [Start Here](#start-here)
|
|
161
|
+
- [Usage Cookbook](#usage-cookbook)
|
|
83
162
|
- [Quick Reference: Component Props & UI Overrides](#quick-reference-component-props--ui-overrides)
|
|
84
163
|
- [Features](#features)
|
|
85
164
|
- [Getting Started](#getting-started)
|
|
@@ -114,14 +193,15 @@ Every primary MediaSFU UI export—`MediasfuGeneric`, `MediasfuBroadcast`, `Medi
|
|
|
114
193
|
| `useLocalUIMode` | `boolean` | `false` | Run the interface in local/demo mode with no remote signaling. |
|
|
115
194
|
| `seedData`, `useSeed` | `SeedData`, `boolean` | `{}`, `false` | Pre-populate the UI for demos, snapshot tests, or onboarding tours. |
|
|
116
195
|
| `imgSrc` | `string` | `https://mediasfu.com/images/logo192.png` | Default artwork used across pre-join and modal flows. |
|
|
117
|
-
| `sourceParameters` | `Record<string, unknown>` | `
|
|
118
|
-
| `updateSourceParameters` | `
|
|
196
|
+
| `sourceParameters` | `Record<string, unknown>` | `{}` | Shared helper bag (media devices, participant helpers, layout handlers). Pair with `updateSourceParameters` to mirror the SDK's internal utilities. |
|
|
197
|
+
| `updateSourceParameters` | `(data: Record<string, unknown>) => void` | `() => {}` | Receive the latest helper bundle so you can bridge MediaSFU logic into your own components. |
|
|
119
198
|
| `returnUI` | `boolean` | `true` | When `false`, mount the logic only—a perfect stepping stone to a fully bespoke interface. |
|
|
120
|
-
| `noUIPreJoinOptions` | `
|
|
121
|
-
| `
|
|
122
|
-
| `
|
|
199
|
+
| `noUIPreJoinOptions` | `CreateMediaSFURoomOptions \| JoinMediaSFURoomOptions` | `undefined` | Feed pre-join data when `returnUI` is `false` and you want to bypass the on-screen wizard. |
|
|
200
|
+
| `joinMediaSFURoom`, `createMediaSFURoom` | `Function` | `undefined` | Inject your own networking layers for joining or creating rooms. |
|
|
201
|
+
| `canUsePersonalTranslation`, `personalTranslationUsername` | `boolean`, `string` | `false`, `undefined` | Seed translation-aware entry flows when you want personal translation defaults available at startup. |
|
|
202
|
+
| `customMainComponent` | `ComponentType` | `undefined` | Replace the main UI shell while retaining MediaSFU transports, sockets, and room helpers. |
|
|
123
203
|
| `customVideoCard`, `customAudioCard`, `customMiniCard` | `ComponentType` | `undefined` | Override participant card renders to add metadata, CTAs, or badges. |
|
|
124
|
-
| `[
|
|
204
|
+
| `[containerStyle]` | `Record<string, any>` | `undefined` | Apply inline styles to the root wrapper (dashboards, split views, etc.). |
|
|
125
205
|
| `[uiOverrides]` | `MediasfuUICustomOverrides` | `undefined` | Targeted component/function overrides described below. |
|
|
126
206
|
|
|
127
207
|
> **Power combo:** Set `returnUI="false"` to run MediaSFU logic headless, capture helpers via `updateSourceParameters` output, and selectively bring UI pieces back with `uiOverrides`. That gives you progressive migration with minimal code churn.
|
|
@@ -136,7 +216,7 @@ Bring the types into your project to unlock full IntelliSense for every override
|
|
|
136
216
|
|
|
137
217
|
### Custom UI Playbook
|
|
138
218
|
|
|
139
|
-
Use a toggle-driven "playbook" component to experiment with MediaSFU's customization layers. Flip a couple of booleans and you can watch the SDK jump between prebuilt layouts, headless logic, or a fully bespoke workspace driven by `
|
|
219
|
+
Use a toggle-driven "playbook" component to experiment with MediaSFU's customization layers. Flip a couple of booleans and you can watch the SDK jump between prebuilt layouts, headless logic, or a fully bespoke workspace driven by `customMainComponent`.
|
|
140
220
|
|
|
141
221
|
#### What the playbook demonstrates
|
|
142
222
|
|
|
@@ -144,7 +224,7 @@ Use a toggle-driven "playbook" component to experiment with MediaSFU's customiza
|
|
|
144
224
|
- **Experience selector**: the `selectedExperience` switch renders `MediasfuGeneric`, `MediasfuBroadcast`, `MediasfuWebinar`, `MediasfuConference`, or `MediasfuChat` without touching the rest of your stack.
|
|
145
225
|
- **UI strategy flags**: booleans like `showPrebuiltUI`, `enableFullCustomUI`, and `enableNoUIPreJoin` demonstrate how to run the MediaSFU logic with or without the bundled UI.
|
|
146
226
|
- **Layered overrides**: toggles enable the custom video/audio/mini cards, drop-in `uiOverrides` for layout and modal surfaces, container styling, and backend proxy helpers.
|
|
147
|
-
- **Custom workspace demo**: a `
|
|
227
|
+
- **Custom workspace demo**: a `customMainComponent` receives live MediaSFU helpers so you can build dashboards, CRM surfaces, or any bespoke host interface.
|
|
148
228
|
- **Debug panel & helpers**: optional JSON panel exposes the `updateSourceParameters` payload so you can see exactly what to wire into your own components.
|
|
149
229
|
|
|
150
230
|
#### Try it quickly
|
|
@@ -160,7 +240,7 @@ Use a toggle-driven "playbook" component to experiment with MediaSFU's customiza
|
|
|
160
240
|
[connectMediaSFU]="currentPreset.connectMediaSFU"
|
|
161
241
|
[returnUI]="showPrebuiltUI"
|
|
162
242
|
[uiOverrides]="overrides"
|
|
163
|
-
[
|
|
243
|
+
[containerStyle]="containerStyle">
|
|
164
244
|
</app-mediasfu-generic>
|
|
165
245
|
|
|
166
246
|
<app-mediasfu-broadcast *ngSwitchCase="'broadcast'"
|
|
@@ -209,7 +289,7 @@ export class CustomUIPlaybookComponent {
|
|
|
209
289
|
} : undefined,
|
|
210
290
|
};
|
|
211
291
|
|
|
212
|
-
|
|
292
|
+
containerStyle = {
|
|
213
293
|
background: 'linear-gradient(135deg, #0f172a, #1e3a8a)',
|
|
214
294
|
minHeight: '100vh'
|
|
215
295
|
};
|
|
@@ -231,8 +311,8 @@ Use the same playbook to validate bespoke cards, override bundles, and fully cus
|
|
|
231
311
|
[customVideoCard]="videoCard"
|
|
232
312
|
[customAudioCard]="audioCard"
|
|
233
313
|
[customMiniCard]="miniCard"
|
|
234
|
-
[
|
|
235
|
-
[
|
|
314
|
+
[customMainComponent]="enableFullCustomUI ? customWorkspace : undefined"
|
|
315
|
+
[containerStyle]="containerStyle"
|
|
236
316
|
[uiOverrides]="uiOverrides">
|
|
237
317
|
</app-mediasfu-generic>
|
|
238
318
|
`
|
|
@@ -247,7 +327,7 @@ export class AdvancedPlaybookComponent {
|
|
|
247
327
|
miniCard = MiniCardComponent;
|
|
248
328
|
customWorkspace = CustomWorkspaceComponent;
|
|
249
329
|
|
|
250
|
-
|
|
330
|
+
containerStyle = {
|
|
251
331
|
background: '#0f172a',
|
|
252
332
|
borderRadius: '32px',
|
|
253
333
|
overflow: 'hidden'
|
|
@@ -318,6 +398,7 @@ Each key accepts a `CustomComponentOverride<Props>` or `CustomFunctionOverride<F
|
|
|
318
398
|
| `alert` | `AlertComponent` | Route alerts through your notification system. |
|
|
319
399
|
| `menuModal` | `MenuModal` | Redesign quick-action trays. |
|
|
320
400
|
| `eventSettingsModal` | `EventSettingsModal` | Extend host tools with your own settings. |
|
|
401
|
+
| `translationSettingsModal` | `TranslationSettingsModal` | Customize spoken-language, subtitle, and listening-preference controls. |
|
|
321
402
|
| `requestsModal` | `RequestsModal` | Build moderation queues tailored to your workflows. |
|
|
322
403
|
| `waitingRoomModal` | `WaitingRoomModal` | Deliver custom waiting-room experiences. |
|
|
323
404
|
| `coHostModal` | `CoHostModal` | Manage co-hosts with bespoke UX. |
|
|
@@ -342,8 +423,8 @@ Each key accepts a `CustomComponentOverride<Props>` or `CustomFunctionOverride<F
|
|
|
342
423
|
| Key | Default component | Typical use |
|
|
343
424
|
| --- | --- | --- |
|
|
344
425
|
| `welcomePage` | `WelcomePage` | Provide a fully branded welcome/marketing splash. |
|
|
345
|
-
| `preJoinPage` | `
|
|
346
|
-
| `customMenuButtonsRenderer` | `
|
|
426
|
+
| `preJoinPage` | `PreJoinPage` | Override the wizard used before joining live sessions. |
|
|
427
|
+
| `customMenuButtonsRenderer` | `Menu button group renderer` | Supply a bespoke renderer for grouped menu actions without overriding each button one by one. |
|
|
347
428
|
|
|
348
429
|
#### Function overrides
|
|
349
430
|
|
|
@@ -526,12 +607,15 @@ Instructions on how to install the module using npm.
|
|
|
526
607
|
### 1. **Add the package to your project**
|
|
527
608
|
|
|
528
609
|
```bash
|
|
529
|
-
|
|
610
|
+
npm install mediasfu-angular bootstrap ngx-cookie-service socket.io-client mediasoup-client @fortawesome/angular-fontawesome @fortawesome/fontawesome-svg-core @fortawesome/free-solid-svg-icons @fortawesome/free-brands-svg-icons
|
|
611
|
+
|
|
612
|
+
# Optional but recommended for virtual backgrounds and scanner-based flows
|
|
613
|
+
npm install @mediapipe/selfie_segmentation @zxing/ngx-scanner
|
|
530
614
|
```
|
|
531
615
|
|
|
532
616
|
### 2. **Bootstrap Integration**
|
|
533
617
|
|
|
534
|
-
|
|
618
|
+
The `mediasfu-angular` package expects Bootstrap as a peer dependency. If your Angular app does not already ship with Bootstrap, install it and ensure Bootstrap's CSS is added to your project's styles.
|
|
535
619
|
|
|
536
620
|
1. **Check `angular.json`:**
|
|
537
621
|
|
|
@@ -557,12 +641,12 @@ Instructions on how to install the module using npm.
|
|
|
557
641
|
}
|
|
558
642
|
```
|
|
559
643
|
|
|
560
|
-
|
|
644
|
+
**Note:** `mediasfu-angular` does not bundle Bootstrap for you. Keep the CSS import explicit so your app and the SDK agree on styling.
|
|
561
645
|
|
|
562
646
|
|
|
563
647
|
### 3. **Configure MediaSFU's PreJoinPage Requirements**
|
|
564
648
|
|
|
565
|
-
If you intend to use MediaSFU's `PreJoinPage` component, additional configuration is required.
|
|
649
|
+
If you intend to use MediaSFU's `PreJoinPage` component, additional configuration is required. Provide `HttpClient` and `CookieService` in your application's configuration, and make sure `ngx-cookie-service` is installed in your Angular app.
|
|
566
650
|
|
|
567
651
|
#### Update `app.config.ts`
|
|
568
652
|
|
|
@@ -745,7 +829,7 @@ import {
|
|
|
745
829
|
|
|
746
830
|
MediaSFU offers three progressive levels of customization:
|
|
747
831
|
|
|
748
|
-
##### Mode 1: Default UI (
|
|
832
|
+
##### Mode 1: Default UI (Beginner / Fastest Path)
|
|
749
833
|
Use MediaSFU's complete pre-built interface - perfect for rapid development.
|
|
750
834
|
|
|
751
835
|
```typescript
|
|
@@ -768,7 +852,7 @@ export class AppComponent {
|
|
|
768
852
|
- ✅ Need a production-ready UI quickly
|
|
769
853
|
- ✅ Standard video conferencing features are sufficient
|
|
770
854
|
|
|
771
|
-
##### Mode 2:
|
|
855
|
+
##### Mode 2: Headless Runtime + Custom UI (Intermediate)
|
|
772
856
|
Build your own UI while using MediaSFU's powerful backend infrastructure.
|
|
773
857
|
|
|
774
858
|
```typescript
|
|
@@ -838,13 +922,14 @@ export class AppComponent implements OnInit {
|
|
|
838
922
|
- ✅ Building a custom branded experience
|
|
839
923
|
- ✅ Integrating into existing app design
|
|
840
924
|
|
|
841
|
-
##### Mode 3:
|
|
925
|
+
##### Mode 3: Custom Main Shell (Advanced)
|
|
842
926
|
Replace specific MediaSFU components while keeping the rest of the infrastructure.
|
|
843
927
|
|
|
844
928
|
```typescript
|
|
845
929
|
import { Component } from '@angular/core';
|
|
846
930
|
import {
|
|
847
931
|
MediasfuGeneric,
|
|
932
|
+
PreJoinPage,
|
|
848
933
|
FlexibleVideo,
|
|
849
934
|
FlexibleGrid
|
|
850
935
|
} from 'mediasfu-angular';
|
|
@@ -912,7 +997,7 @@ export class CustomMainComponent {
|
|
|
912
997
|
<app-mediasfu-generic
|
|
913
998
|
[credentials]="credentials"
|
|
914
999
|
[PrejoinPage]="PreJoinPage"
|
|
915
|
-
[
|
|
1000
|
+
[customMainComponent]="CustomMainComponent">
|
|
916
1001
|
</app-mediasfu-generic>
|
|
917
1002
|
`,
|
|
918
1003
|
})
|
|
@@ -968,11 +1053,11 @@ The `sourceParameters` object (or `parameters` in custom components) is your gat
|
|
|
968
1053
|
// In Mode 2 (Custom UI): Access via sourceParameters
|
|
969
1054
|
sourceParameters?.clickVideo({ parameters: sourceParameters });
|
|
970
1055
|
|
|
971
|
-
// In Mode 3 (
|
|
1056
|
+
// In Mode 3 (Custom Main Shell): Passed to your custom main component
|
|
972
1057
|
@Component({
|
|
973
1058
|
template: `<button (click)="toggleVideo()">Toggle</button>`
|
|
974
1059
|
})
|
|
975
|
-
export class
|
|
1060
|
+
export class CustomRoomShellComponent {
|
|
976
1061
|
@Input() parameters: any;
|
|
977
1062
|
|
|
978
1063
|
toggleVideo() {
|
|
@@ -2319,7 +2404,7 @@ export type PreJoinPageType = (options: PreJoinPageOptions) => HTMLElement;
|
|
|
2319
2404
|
})
|
|
2320
2405
|
export class PreJoinPage implements OnInit {
|
|
2321
2406
|
@Input() parameters: PreJoinPageParameters = {} as PreJoinPageParameters;
|
|
2322
|
-
@Input() credentials: Credentials = { apiUserName: '
|
|
2407
|
+
@Input() credentials: Credentials = { apiUserName: '', apiKey: '' };
|
|
2323
2408
|
@Input() localLink: string | undefined = "";
|
|
2324
2409
|
@Input() connectMediaSFU: boolean | undefined = true;
|
|
2325
2410
|
@Input() returnUI?: boolean;
|
|
@@ -3273,7 +3358,7 @@ export default AppComponent;
|
|
|
3273
3358
|
* return res.status(401).json({ error: "Invalid or expired credentials" });
|
|
3274
3359
|
* }
|
|
3275
3360
|
*
|
|
3276
|
-
* const response = await fetch("https://mediasfu.com/v1/rooms", {
|
|
3361
|
+
* const response = await fetch("https://mediasfu.com/v1/rooms/", {
|
|
3277
3362
|
* method: "POST",
|
|
3278
3363
|
* headers: {
|
|
3279
3364
|
* "Content-Type": "application/json",
|
|
@@ -3362,7 +3447,7 @@ export default AppComponent;
|
|
|
3362
3447
|
* localLink = '',
|
|
3363
3448
|
* }) => {
|
|
3364
3449
|
* try {
|
|
3365
|
-
* let finalLink = 'https://mediasfu.com/v1/rooms/
|
|
3450
|
+
* let finalLink = 'https://mediasfu.com/v1/rooms/';
|
|
3366
3451
|
*
|
|
3367
3452
|
* // Update finalLink if using a local server
|
|
3368
3453
|
* if (localLink) {
|
|
@@ -4890,14 +4975,28 @@ https://github.com/MediaSFU/MediaSFU-ReactJS/assets/157974639/a6396722-5b2f-4e93
|
|
|
4890
4975
|
|
|
4891
4976
|
# Contributing <a name="contributing"></a>
|
|
4892
4977
|
|
|
4893
|
-
We welcome contributions from the community to improve the project! If you'd like to contribute, please check out our [GitHub repository](https://github.com/MediaSFU-Angular) and follow the guidelines outlined in the README.
|
|
4978
|
+
We welcome contributions from the community to improve the project! If you'd like to contribute, please check out our [GitHub repository](https://github.com/MediaSFU/MediaSFU-Angular) and follow the guidelines outlined in the README.
|
|
4894
4979
|
|
|
4895
4980
|
If you encounter any issues or have suggestions for improvement, please feel free to open an issue on GitHub.
|
|
4896
4981
|
|
|
4897
4982
|
We appreciate your interest in contributing to the project!
|
|
4898
4983
|
|
|
4899
4984
|
If you need further assistance or have any questions, feel free to ask!
|
|
4900
|
-
|
|
4985
|
+
|
|
4986
|
+
---
|
|
4987
|
+
|
|
4988
|
+
## Related SDKs
|
|
4989
|
+
|
|
4990
|
+
| Package | Framework | npm |
|
|
4991
|
+
|---------|-----------|-----|
|
|
4992
|
+
| [mediasfu-reactjs](https://github.com/MediaSFU/MediaSFU-ReactJS) | React 18/19 | [`npm install mediasfu-reactjs`](https://www.npmjs.com/package/mediasfu-reactjs) |
|
|
4993
|
+
| [mediasfu-vue](https://github.com/MediaSFU/MediaSFU-Vue) | Vue 3 | [`npm install mediasfu-vue`](https://www.npmjs.com/package/mediasfu-vue) |
|
|
4994
|
+
| **[mediasfu-angular](https://github.com/MediaSFU/MediaSFU-Angular)** | **Angular 17+** | **this package** |
|
|
4995
|
+
| [mediasfu-shared](https://github.com/MediaSFU/MediaSFU-Shared) | Framework-agnostic | [`npm install mediasfu-shared`](https://www.npmjs.com/package/mediasfu-shared) |
|
|
4996
|
+
|
|
4997
|
+
## License
|
|
4998
|
+
|
|
4999
|
+
MIT © [MediaSFU](https://www.mediasfu.com)
|
|
4901
5000
|
|
|
4902
5001
|
|
|
4903
5002
|
|
|
@@ -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.
|