mediasfu-angular 1.0.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +871 -769
- package/dist/README.md +870 -769
- package/dist/fesm2022/mediasfu-angular.mjs +13241 -3372
- package/dist/fesm2022/mediasfu-angular.mjs.map +1 -1
- package/dist/lib/@types/types.d.ts +22 -1
- package/dist/lib/components/background-components/background-modal/background-modal.component.d.ts +36 -0
- package/dist/lib/components/breakout-components/breakout-rooms-modal.component.d.ts +51 -0
- package/dist/lib/components/breakout-components/edit-room-modal/edit-room-modal.component.d.ts +48 -0
- package/dist/lib/components/co-host-components/co-host-modal/co-host-modal.component.d.ts +62 -0
- package/dist/lib/components/display-components/alert-component/alert.component.component.d.ts +24 -18
- package/dist/lib/components/display-components/audio-card/audio-card.component.d.ts +59 -0
- package/dist/lib/components/display-components/audio-grid/audio-grid.component.d.ts +20 -0
- package/dist/lib/components/display-components/card-video-display/card-video-display.component.d.ts +35 -0
- package/dist/lib/components/display-components/control-buttons-alt-component/control-buttons-alt-component.component.d.ts +38 -0
- package/dist/lib/components/display-components/control-buttons-component-touch/control-buttons-component-touch.component.d.ts +24 -40
- package/dist/lib/components/display-components/control-widgets/menu-participants-widget.component.d.ts +21 -0
- package/dist/lib/components/display-components/control-widgets/menu-record-widget.component.d.ts +22 -0
- package/dist/lib/components/display-components/control-widgets/menu-widget.component.d.ts +23 -0
- package/dist/lib/components/display-components/control-widgets/message-widget.component.d.ts +23 -0
- package/dist/lib/components/display-components/control-widgets/record-timer-widget.component.d.ts +15 -0
- package/dist/lib/components/display-components/control-widgets/screenshare-widget.component.d.ts +27 -0
- package/dist/lib/components/display-components/flexible-grid/flexible-grid.component.d.ts +27 -18
- package/dist/lib/components/display-components/flexible-video/flexible-video.component.d.ts +30 -45
- package/dist/lib/components/display-components/loading-modal/loading-modal.component.d.ts +19 -17
- package/dist/lib/components/display-components/main-aspect-component/main-aspect-component.component.d.ts +32 -24
- package/dist/lib/components/display-components/main-container-component/main-container-component.component.d.ts +28 -16
- package/dist/lib/components/display-components/main-grid-component/main-grid-component.component.d.ts +28 -14
- package/dist/lib/components/display-components/main-screen-component/main-screen-component.component.d.ts +43 -22
- package/dist/lib/components/display-components/meeting-progress-timer/meeting-progress-timer.component.d.ts +25 -30
- package/dist/lib/components/display-components/mini-audio/mini-audio.component.d.ts +55 -62
- package/dist/lib/components/display-components/mini-card/mini-card.component.d.ts +19 -23
- package/dist/lib/components/display-components/mini-card-audio/mini-card-audio.component.d.ts +39 -39
- package/dist/lib/components/display-components/other-grid-component/other-grid-component.component.d.ts +28 -13
- package/dist/lib/components/display-components/pagination/pagination.component.d.ts +29 -23
- package/dist/lib/components/display-components/sub-aspect-component/sub-aspect-component.component.d.ts +18 -24
- package/dist/lib/components/display-components/video-card/video-card.component.d.ts +62 -0
- package/dist/lib/components/display-settings-components/display-settings-modal.component.d.ts +28 -17
- package/dist/lib/components/event-settings-components/event-settings-modal/event-settings-modal.component.d.ts +47 -38
- package/dist/lib/components/exit-components/confirm-exit-modal/confirm-exit-modal.component.d.ts +35 -22
- package/dist/lib/components/media-settings-components/media-settings-modal/media-settings-modal.component.d.ts +35 -24
- package/dist/lib/components/mediasfu-components/mediasfu-broadcast.component.d.ts +258 -117
- package/dist/lib/components/mediasfu-components/mediasfu-chat.component.d.ts +254 -117
- package/dist/lib/components/mediasfu-components/mediasfu-conference.component.d.ts +312 -162
- package/dist/lib/components/mediasfu-components/mediasfu-generic.component.d.ts +312 -162
- package/dist/lib/components/mediasfu-components/mediasfu-webinar.component.d.ts +310 -162
- package/dist/lib/components/menu-components/custom-buttons/custom-buttons.component.d.ts +49 -51
- package/dist/lib/components/menu-components/meeting-id-component/meeting-id-component.component.d.ts +6 -1
- package/dist/lib/components/menu-components/meeting-passcode-component/meeting-passcode-component.component.d.ts +5 -0
- package/dist/lib/components/menu-components/menu-modal/menu-modal.component.d.ts +27 -29
- package/dist/lib/components/menu-components/share-buttons-component/share-buttons-component.component.d.ts +20 -15
- package/dist/lib/components/message-components/message-panel/message-panel.component.d.ts +24 -0
- package/dist/lib/components/message-components/messages-modal/messages-modal.component.d.ts +34 -0
- package/dist/lib/components/misc-components/confirm-here-modal/confirm-here-modal.component.d.ts +20 -35
- package/dist/lib/components/misc-components/pre-join-page/pre-join-page.component.d.ts +79 -66
- package/dist/lib/components/misc-components/share-event-modal/share-event-modal.component.d.ts +19 -1
- package/dist/lib/components/misc-components/welcome-page/welcome-page.component.d.ts +15 -0
- package/dist/lib/components/participants-components/participant-list/participant-list.component.d.ts +19 -0
- package/dist/lib/components/participants-components/participant-list-item/participant-list-item.component.d.ts +19 -0
- package/dist/lib/components/participants-components/participant-list-others/participant-list-others.component.d.ts +17 -0
- package/dist/lib/components/participants-components/participant-list-others-item/participant-list-others-item.component.d.ts +17 -0
- package/dist/lib/components/participants-components/participants-modal/participants-modal.component.d.ts +24 -0
- package/dist/lib/components/polls-components/poll-modal/poll-modal.component.d.ts +27 -0
- package/dist/lib/components/recording-components/advanced-panel-component/advanced-panel-components.component.d.ts +15 -0
- package/dist/lib/components/recording-components/recording-modal/recording-modal.component.d.ts +12 -0
- package/dist/lib/components/recording-components/standard-panel-component/standard-panel-component.component.d.ts +5 -0
- package/dist/lib/components/requests-components/render-request-component/render-request-component.component.d.ts +22 -0
- package/dist/lib/components/requests-components/requests-modal/requests-modal.component.d.ts +17 -0
- package/dist/lib/components/screenboard-components/screenboard/screenboard.component.d.ts +10 -0
- package/dist/lib/components/screenboard-components/screenboard-modal/screenboard-modal.component.d.ts +11 -0
- package/dist/lib/components/waiting-components/waiting-room-modal.component.d.ts +59 -0
- package/dist/lib/components/whiteboard-components/configure-whiteboard-modal/configure-whiteboard-modal.component.d.ts +21 -0
- package/dist/lib/components/whiteboard-components/whiteboard/whiteboard.component.d.ts +49 -0
- package/dist/lib/consumers/add-videos-grid.service.d.ts +49 -0
- package/dist/lib/consumers/auto-adjust.service.d.ts +26 -0
- package/dist/lib/consumers/calculate-rows-and-columns.service.d.ts +18 -0
- package/dist/lib/consumers/change-vids.service.d.ts +131 -66
- package/dist/lib/consumers/check-grid.service.d.ts +32 -18
- package/dist/lib/consumers/check-permission.service.d.ts +25 -0
- package/dist/lib/consumers/check-screen-share.service.d.ts +35 -0
- package/dist/lib/consumers/close-and-resize.service.d.ts +102 -0
- package/dist/lib/consumers/compare-active-names.service.d.ts +31 -0
- package/dist/lib/consumers/compare-screen-states.service.d.ts +35 -0
- package/dist/lib/consumers/connect-ips.service.d.ts +42 -0
- package/dist/lib/consumers/connect-local-ips.service.d.ts +81 -0
- package/dist/lib/consumers/connect-recv-transport.service.d.ts +33 -0
- package/dist/lib/consumers/connect-send-transport-audio.service.d.ts +81 -11
- package/dist/lib/consumers/connect-send-transport-screen.service.d.ts +96 -15
- package/dist/lib/consumers/connect-send-transport-video.service.d.ts +101 -11
- package/dist/lib/consumers/connect-send-transport.service.d.ts +59 -1
- package/dist/lib/consumers/consumer-resume.service.d.ts +36 -0
- package/dist/lib/consumers/control-media.service.d.ts +45 -0
- package/dist/lib/consumers/create-send-transport.service.d.ts +149 -13
- package/dist/lib/consumers/disconnect-send-transport-audio.service.d.ts +100 -13
- package/dist/lib/consumers/disconnect-send-transport-screen.service.d.ts +75 -2
- package/dist/lib/consumers/disconnect-send-transport-video.service.d.ts +99 -17
- package/dist/lib/consumers/disp-streams.service.d.ts +92 -0
- package/dist/lib/consumers/generate-page-content.service.d.ts +47 -0
- package/dist/lib/consumers/get-estimate.service.d.ts +50 -0
- package/dist/lib/consumers/get-piped-producers-alt.service.d.ts +38 -1
- package/dist/lib/consumers/get-producers-piped.service.d.ts +33 -0
- package/dist/lib/consumers/get-videos.service.d.ts +33 -0
- package/dist/lib/consumers/mix-streams.service.d.ts +22 -0
- package/dist/lib/consumers/on-screen-changes.service.d.ts +40 -0
- package/dist/lib/consumers/prepopulate-user-media.service.d.ts +99 -0
- package/dist/lib/consumers/process-consumer-transports-audio.service.d.ts +29 -0
- package/dist/lib/consumers/process-consumer-transports.service.d.ts +37 -0
- package/dist/lib/consumers/re-port.service.d.ts +48 -0
- package/dist/lib/consumers/re-update-inter.service.d.ts +82 -0
- package/dist/lib/consumers/readjust.service.d.ts +50 -0
- package/dist/lib/consumers/receive-all-piped-transports.service.d.ts +36 -1
- package/dist/lib/consumers/receive-room-messages.service.d.ts +27 -0
- package/dist/lib/consumers/reorder-streams.service.d.ts +58 -0
- package/dist/lib/consumers/request-screen-share.service.d.ts +34 -0
- package/dist/lib/consumers/resume-pause-audio-streams.service.d.ts +51 -0
- package/dist/lib/consumers/resume-pause-streams.service.d.ts +33 -0
- package/dist/lib/consumers/resume-send-transport-audio.service.d.ts +76 -7
- package/dist/lib/consumers/signal-new-consumer-transport.service.d.ts +37 -37
- package/dist/lib/consumers/socket-receive-methods/join-consume-room.service.d.ts +33 -0
- package/dist/lib/consumers/socket-receive-methods/new-pipe-producer.service.d.ts +39 -0
- package/dist/lib/consumers/socket-receive-methods/producer-closed.service.d.ts +27 -0
- package/dist/lib/consumers/start-share-screen.service.d.ts +40 -0
- package/dist/lib/consumers/stop-share-screen.service.d.ts +55 -0
- package/dist/lib/consumers/stream-success-audio-switch.service.d.ts +148 -11
- package/dist/lib/consumers/stream-success-audio.service.d.ts +61 -0
- package/dist/lib/consumers/stream-success-screen.service.d.ts +50 -0
- package/dist/lib/consumers/stream-success-video.service.d.ts +58 -0
- package/dist/lib/consumers/switch-user-audio.service.d.ts +33 -0
- package/dist/lib/consumers/switch-user-video-alt.service.d.ts +32 -0
- package/dist/lib/consumers/switch-user-video.service.d.ts +47 -0
- package/dist/lib/consumers/trigger.service.d.ts +41 -0
- package/dist/lib/consumers/update-mini-cards-grid.service.d.ts +54 -0
- package/dist/lib/consumers/update-participant-audio-decibels.service.d.ts +45 -0
- package/dist/lib/methods/background-methods/launch-background.service.d.ts +25 -0
- package/dist/lib/methods/breakout-room-methods/breakout-room-updated.service.d.ts +71 -0
- package/dist/lib/methods/breakout-room-methods/launch-breakout-rooms.service.d.ts +24 -0
- package/dist/lib/methods/co-host-methods/launch-co-host.service.d.ts +24 -0
- package/dist/lib/methods/co-host-methods/modify-co-host-settings.service.d.ts +44 -0
- package/dist/lib/methods/display-settings-methods/launch-display-settings.service.d.ts +22 -0
- package/dist/lib/methods/display-settings-methods/modify-display-settings.service.d.ts +75 -0
- package/dist/lib/methods/exit-methods/confirm-exit.service.d.ts +29 -1
- package/dist/lib/methods/exit-methods/launch-confirm-exit.service.d.ts +20 -0
- package/dist/lib/methods/media-settings-methods/launch-media-settings.service.d.ts +35 -0
- package/dist/lib/methods/menu-methods/launch-menu-modal.service.d.ts +22 -0
- package/dist/lib/methods/message-methods/launch-messages.service.d.ts +22 -0
- package/dist/lib/methods/message-methods/send-message.service.d.ts +49 -0
- package/dist/lib/methods/participants-methods/launch-participants.service.d.ts +24 -0
- package/dist/lib/methods/participants-methods/message-participants.service.d.ts +46 -0
- package/dist/lib/methods/participants-methods/mute-participants.service.d.ts +39 -0
- package/dist/lib/methods/participants-methods/remove-participants.service.d.ts +45 -0
- package/dist/lib/methods/polls-methods/handle-create-poll.service.d.ts +38 -0
- package/dist/lib/methods/polls-methods/handle-end-poll.service.d.ts +32 -0
- package/dist/lib/methods/polls-methods/handle-vote-poll.service.d.ts +34 -0
- package/dist/lib/methods/polls-methods/launch-poll.service.d.ts +20 -0
- package/dist/lib/methods/polls-methods/poll-updated.service.d.ts +31 -0
- package/dist/lib/methods/recording-methods/check-pause-state.service.d.ts +24 -0
- package/dist/lib/methods/recording-methods/check-resume-state.service.d.ts +22 -0
- package/dist/lib/methods/recording-methods/confirm-recording.service.d.ts +63 -0
- package/dist/lib/methods/recording-methods/launch-recording.service.d.ts +43 -0
- package/dist/lib/methods/recording-methods/record-pause-timer.service.d.ts +27 -0
- package/dist/lib/methods/recording-methods/record-resume-timer.service.d.ts +44 -0
- package/dist/lib/methods/recording-methods/record-start-timer.service.d.ts +45 -0
- package/dist/lib/methods/recording-methods/record-update-timer.service.d.ts +32 -0
- package/dist/lib/methods/recording-methods/start-recording.service.d.ts +53 -0
- package/dist/lib/methods/recording-methods/stop-recording.service.d.ts +42 -1
- package/dist/lib/methods/recording-methods/update-recording.service.d.ts +51 -0
- package/dist/lib/methods/requests-methods/launch-requests.service.d.ts +25 -0
- package/dist/lib/methods/requests-methods/respond-to-requests.service.d.ts +39 -0
- package/dist/lib/methods/settings-methods/launch-settings.service.d.ts +25 -0
- package/dist/lib/methods/settings-methods/modify-settings.service.d.ts +42 -0
- package/dist/lib/methods/stream-methods/click-audio.service.d.ts +100 -0
- package/dist/lib/methods/stream-methods/click-chat.service.d.ts +31 -0
- package/dist/lib/methods/stream-methods/click-screen-share.service.d.ts +68 -0
- package/dist/lib/methods/stream-methods/click-video.service.d.ts +88 -0
- package/dist/lib/methods/stream-methods/switch-audio.service.d.ts +47 -0
- package/dist/lib/methods/stream-methods/switch-video-alt.service.d.ts +50 -0
- package/dist/lib/methods/stream-methods/switch-video.service.d.ts +56 -0
- package/dist/lib/methods/utils/check-limits-and-make-request.service.d.ts +23 -0
- package/dist/lib/methods/utils/create-response-join-room.util.d.ts +33 -0
- package/dist/lib/methods/utils/create-room-on-media-sfu.service.d.ts +25 -0
- package/dist/lib/methods/utils/format-number.service.d.ts +26 -14
- package/dist/lib/methods/utils/generate-random-messages.service.d.ts +33 -0
- package/dist/lib/methods/utils/generate-random-participants.service.d.ts +27 -0
- package/dist/lib/methods/utils/generate-random-polls.service.d.ts +26 -0
- package/dist/lib/methods/utils/generate-random-request-list.service.d.ts +36 -0
- package/dist/lib/methods/utils/generate-random-waiting-room-list.service.d.ts +21 -0
- package/dist/lib/methods/utils/get-modal-position.util.d.ts +13 -3
- package/dist/lib/methods/utils/get-overlay-position.util.d.ts +13 -3
- package/dist/lib/methods/utils/initial-values.util.d.ts +6 -0
- package/dist/lib/methods/utils/join-room-on-media-sfu.service.d.ts +52 -0
- package/dist/lib/methods/utils/meeting-timer/start-meeting-progress-timer.service.d.ts +37 -0
- package/dist/lib/methods/utils/mini-audio-player/mini-audio-player.component.d.ts +55 -0
- package/dist/lib/methods/utils/producer/a-params.service.d.ts +37 -0
- package/dist/lib/methods/utils/producer/h-params.service.d.ts +50 -0
- package/dist/lib/methods/utils/producer/screen-params.service.d.ts +37 -0
- package/dist/lib/methods/utils/producer/v-params.service.d.ts +50 -0
- package/dist/lib/methods/utils/producer/video-capture-constraints.service.d.ts +46 -0
- package/dist/lib/methods/utils/sleep.util.d.ts +9 -3
- package/dist/lib/methods/utils/sound-player.service.d.ts +21 -0
- package/dist/lib/methods/utils/validate-alphanumeric.service.d.ts +16 -0
- package/dist/lib/methods/waiting-methods/launch-waiting.service.d.ts +18 -0
- package/dist/lib/methods/waiting-methods/respond-to-waiting.service.d.ts +29 -0
- package/dist/lib/methods/whiteboard-methods/capture-canvas-stream.service.d.ts +46 -0
- package/dist/lib/methods/whiteboard-methods/launch-configure-whiteboard.service.d.ts +20 -0
- package/dist/lib/producer-client/producer-client-emits/create-device-client.service.d.ts +23 -0
- package/dist/lib/producer-client/producer-client-emits/join-room-client.service.d.ts +31 -0
- package/dist/lib/producer-client/producer-client-emits/update-room-parameters-client.service.d.ts +44 -0
- package/dist/lib/producers/producer-emits/join-con-room.service.d.ts +38 -0
- package/dist/lib/producers/producer-emits/join-local-room.service.d.ts +125 -0
- package/dist/lib/producers/producer-emits/join-room.service.d.ts +38 -0
- package/dist/lib/producers/socket-receive-methods/all-members-rest.service.d.ts +80 -2
- package/dist/lib/producers/socket-receive-methods/all-members.service.d.ts +78 -2
- package/dist/lib/producers/socket-receive-methods/all-waiting-room-members.service.d.ts +27 -0
- package/dist/lib/producers/socket-receive-methods/ban-participant.service.d.ts +36 -0
- package/dist/lib/producers/socket-receive-methods/control-media-host.service.d.ts +37 -0
- package/dist/lib/producers/socket-receive-methods/disconnect-user-self.service.d.ts +29 -1
- package/dist/lib/producers/socket-receive-methods/disconnect.service.d.ts +26 -0
- package/dist/lib/producers/socket-receive-methods/get-domains.service.d.ts +24 -9
- package/dist/lib/producers/socket-receive-methods/host-request-response.service.d.ts +31 -48
- package/dist/lib/producers/socket-receive-methods/meeting-ended.service.d.ts +29 -0
- package/dist/lib/producers/socket-receive-methods/meeting-still-there.service.d.ts +23 -0
- package/dist/lib/producers/socket-receive-methods/meeting-time-remaining.service.d.ts +27 -0
- package/dist/lib/producers/socket-receive-methods/participant-requested.service.d.ts +31 -0
- package/dist/lib/producers/socket-receive-methods/person-joined.service.d.ts +25 -0
- package/dist/lib/producers/socket-receive-methods/producer-media-closed.service.d.ts +61 -0
- package/dist/lib/producers/socket-receive-methods/producer-media-paused.service.d.ts +62 -0
- package/dist/lib/producers/socket-receive-methods/producer-media-resumed.service.d.ts +45 -0
- package/dist/lib/producers/socket-receive-methods/re-initiate-recording.service.d.ts +29 -0
- package/dist/lib/producers/socket-receive-methods/receive-message.service.d.ts +38 -0
- package/dist/lib/producers/socket-receive-methods/recording-notice.service.d.ts +38 -0
- package/dist/lib/producers/socket-receive-methods/room-record-params.service.d.ts +62 -0
- package/dist/lib/producers/socket-receive-methods/screen-producer-id.service.d.ts +41 -0
- package/dist/lib/producers/socket-receive-methods/start-records.service.d.ts +25 -0
- package/dist/lib/producers/socket-receive-methods/stopped-recording.service.d.ts +25 -0
- package/dist/lib/producers/socket-receive-methods/time-left-recording.service.d.ts +21 -0
- package/dist/lib/producers/socket-receive-methods/update-consuming-domains.service.d.ts +42 -0
- package/dist/lib/producers/socket-receive-methods/update-media-settings.service.d.ts +30 -0
- package/dist/lib/producers/socket-receive-methods/updated-co-host.service.d.ts +40 -0
- package/dist/lib/producers/socket-receive-methods/user-waiting.service.d.ts +14 -40
- package/dist/lib/sockets/socket-manager.service.d.ts +130 -0
- package/dist/public-api.d.ts +11 -1
- package/package.json +17 -20
- package/dist/esm2022/lib/@types/types.mjs +0 -2
- package/dist/esm2022/lib/components/background-components/background-modal/background-modal.component.mjs +0 -763
- package/dist/esm2022/lib/components/breakout-components/breakout-rooms-modal.component.mjs +0 -316
- package/dist/esm2022/lib/components/breakout-components/edit-room-modal/edit-room-modal.component.mjs +0 -95
- package/dist/esm2022/lib/components/breakout-components/room-list/room-list.component.mjs +0 -40
- package/dist/esm2022/lib/components/co-host-components/co-host-modal/co-host-modal.component.mjs +0 -246
- package/dist/esm2022/lib/components/display-components/alert-component/alert.component.component.mjs +0 -73
- package/dist/esm2022/lib/components/display-components/audio-card/audio-card.component.mjs +0 -297
- package/dist/esm2022/lib/components/display-components/audio-grid/audio-grid.component.mjs +0 -60
- package/dist/esm2022/lib/components/display-components/card-video-display/card-video-display.component.mjs +0 -94
- package/dist/esm2022/lib/components/display-components/control-buttons-alt-component/control-buttons-alt-component.component.mjs +0 -100
- package/dist/esm2022/lib/components/display-components/control-buttons-component/control-buttons-component.component.mjs +0 -231
- package/dist/esm2022/lib/components/display-components/control-buttons-component-touch/control-buttons-component-touch.component.mjs +0 -298
- package/dist/esm2022/lib/components/display-components/control-widgets/menu-participants-widget.component.mjs +0 -61
- package/dist/esm2022/lib/components/display-components/control-widgets/menu-record-widget.component.mjs +0 -43
- package/dist/esm2022/lib/components/display-components/control-widgets/menu-widget.component.mjs +0 -114
- package/dist/esm2022/lib/components/display-components/control-widgets/message-widget.component.mjs +0 -114
- package/dist/esm2022/lib/components/display-components/control-widgets/record-timer-widget.component.mjs +0 -36
- package/dist/esm2022/lib/components/display-components/control-widgets/screenshare-widget.component.mjs +0 -74
- package/dist/esm2022/lib/components/display-components/flexible-grid/flexible-grid.component.mjs +0 -142
- package/dist/esm2022/lib/components/display-components/flexible-video/flexible-video.component.mjs +0 -265
- package/dist/esm2022/lib/components/display-components/loading-modal/loading-modal.component.mjs +0 -100
- package/dist/esm2022/lib/components/display-components/main-aspect-component/main-aspect-component.component.mjs +0 -132
- package/dist/esm2022/lib/components/display-components/main-container-component/main-container-component.component.mjs +0 -119
- package/dist/esm2022/lib/components/display-components/main-grid-component/main-grid-component.component.mjs +0 -106
- package/dist/esm2022/lib/components/display-components/main-screen-component/main-screen-component.component.mjs +0 -180
- package/dist/esm2022/lib/components/display-components/meeting-progress-timer/meeting-progress-timer.component.mjs +0 -120
- package/dist/esm2022/lib/components/display-components/mini-audio/mini-audio.component.mjs +0 -326
- package/dist/esm2022/lib/components/display-components/mini-card/mini-card.component.mjs +0 -165
- package/dist/esm2022/lib/components/display-components/mini-card-audio/mini-card-audio.component.mjs +0 -230
- package/dist/esm2022/lib/components/display-components/other-grid-component/other-grid-component.component.mjs +0 -111
- package/dist/esm2022/lib/components/display-components/pagination/pagination.component.mjs +0 -328
- package/dist/esm2022/lib/components/display-components/sub-aspect-component/sub-aspect-component.component.mjs +0 -118
- package/dist/esm2022/lib/components/display-components/video-card/video-card.component.mjs +0 -330
- package/dist/esm2022/lib/components/display-settings-components/display-settings-modal.component.mjs +0 -95
- package/dist/esm2022/lib/components/event-settings-components/event-settings-modal/event-settings-modal.component.mjs +0 -190
- package/dist/esm2022/lib/components/exit-components/confirm-exit-modal/confirm-exit-modal.component.mjs +0 -119
- package/dist/esm2022/lib/components/media-settings-components/media-settings-modal/media-settings-modal.component.mjs +0 -209
- package/dist/esm2022/lib/components/mediasfu-components/mediasfu-broadcast.component.mjs +0 -4189
- package/dist/esm2022/lib/components/mediasfu-components/mediasfu-chat.component.mjs +0 -3705
- package/dist/esm2022/lib/components/mediasfu-components/mediasfu-conference.component.mjs +0 -5024
- package/dist/esm2022/lib/components/mediasfu-components/mediasfu-generic.component.mjs +0 -5333
- package/dist/esm2022/lib/components/mediasfu-components/mediasfu-webinar.component.mjs +0 -5023
- package/dist/esm2022/lib/components/menu-components/custom-buttons/custom-buttons.component.mjs +0 -85
- package/dist/esm2022/lib/components/menu-components/meeting-id-component/meeting-id-component.component.mjs +0 -22
- package/dist/esm2022/lib/components/menu-components/meeting-passcode-component/meeting-passcode-component.component.mjs +0 -22
- package/dist/esm2022/lib/components/menu-components/menu-modal/menu-modal.component.mjs +0 -132
- package/dist/esm2022/lib/components/menu-components/share-buttons-component/share-buttons-component.component.mjs +0 -104
- package/dist/esm2022/lib/components/message-components/message-panel/message-panel.component.mjs +0 -204
- package/dist/esm2022/lib/components/message-components/messages-modal/messages-modal.component.mjs +0 -243
- package/dist/esm2022/lib/components/misc-components/confirm-here-modal/confirm-here-modal.component.mjs +0 -147
- package/dist/esm2022/lib/components/misc-components/pre-join-page/pre-join-page.component.mjs +0 -335
- package/dist/esm2022/lib/components/misc-components/share-event-modal/share-event-modal.component.mjs +0 -113
- package/dist/esm2022/lib/components/misc-components/welcome-page/welcome-page.component.mjs +0 -226
- package/dist/esm2022/lib/components/participants-components/participant-list/participant-list.component.mjs +0 -63
- package/dist/esm2022/lib/components/participants-components/participant-list-item/participant-list-item.component.mjs +0 -120
- package/dist/esm2022/lib/components/participants-components/participant-list-others/participant-list-others.component.mjs +0 -23
- package/dist/esm2022/lib/components/participants-components/participant-list-others-item/participant-list-others-item.component.mjs +0 -43
- package/dist/esm2022/lib/components/participants-components/participants-modal/participants-modal.component.mjs +0 -100
- package/dist/esm2022/lib/components/polls-components/poll-modal/poll-modal.component.mjs +0 -174
- package/dist/esm2022/lib/components/recording-components/advanced-panel-component/advanced-panel-components.component.mjs +0 -77
- package/dist/esm2022/lib/components/recording-components/recording-modal/recording-modal.component.mjs +0 -121
- package/dist/esm2022/lib/components/recording-components/standard-panel-component/standard-panel-component.component.mjs +0 -85
- package/dist/esm2022/lib/components/requests-components/render-request-component/render-request-component.component.mjs +0 -59
- package/dist/esm2022/lib/components/requests-components/requests-modal/requests-modal.component.mjs +0 -130
- package/dist/esm2022/lib/components/screenboard-components/screenboard/screenboard.component.mjs +0 -617
- package/dist/esm2022/lib/components/screenboard-components/screenboard-modal/screenboard-modal.component.mjs +0 -380
- package/dist/esm2022/lib/components/waiting-components/waiting-room-modal.component.mjs +0 -142
- package/dist/esm2022/lib/components/whiteboard-components/configure-whiteboard-modal/configure-whiteboard-modal.component.mjs +0 -265
- package/dist/esm2022/lib/components/whiteboard-components/whiteboard/whiteboard.component.mjs +0 -1784
- package/dist/esm2022/lib/consumers/add-videos-grid.service.mjs +0 -296
- package/dist/esm2022/lib/consumers/auto-adjust.service.mjs +0 -83
- package/dist/esm2022/lib/consumers/calculate-rows-and-columns.service.mjs +0 -42
- package/dist/esm2022/lib/consumers/change-vids.service.mjs +0 -486
- package/dist/esm2022/lib/consumers/check-grid.service.mjs +0 -79
- package/dist/esm2022/lib/consumers/check-permission.service.mjs +0 -80
- package/dist/esm2022/lib/consumers/check-screen-share.service.mjs +0 -71
- package/dist/esm2022/lib/consumers/close-and-resize.service.mjs +0 -229
- package/dist/esm2022/lib/consumers/compare-active-names.service.mjs +0 -75
- package/dist/esm2022/lib/consumers/compare-screen-states.service.mjs +0 -63
- package/dist/esm2022/lib/consumers/connect-ips.service.mjs +0 -112
- package/dist/esm2022/lib/consumers/connect-recv-transport.service.mjs +0 -113
- package/dist/esm2022/lib/consumers/connect-send-transport-audio.service.mjs +0 -46
- package/dist/esm2022/lib/consumers/connect-send-transport-screen.service.mjs +0 -62
- package/dist/esm2022/lib/consumers/connect-send-transport-video.service.mjs +0 -55
- package/dist/esm2022/lib/consumers/connect-send-transport.service.mjs +0 -86
- package/dist/esm2022/lib/consumers/consumer-resume.service.mjs +0 -332
- package/dist/esm2022/lib/consumers/control-media.service.mjs +0 -68
- package/dist/esm2022/lib/consumers/create-send-transport.service.mjs +0 -126
- package/dist/esm2022/lib/consumers/disconnect-send-transport-audio.service.mjs +0 -58
- package/dist/esm2022/lib/consumers/disconnect-send-transport-screen.service.mjs +0 -45
- package/dist/esm2022/lib/consumers/disconnect-send-transport-video.service.mjs +0 -56
- package/dist/esm2022/lib/consumers/disp-streams.service.mjs +0 -421
- package/dist/esm2022/lib/consumers/generate-page-content.service.mjs +0 -59
- package/dist/esm2022/lib/consumers/get-estimate.service.mjs +0 -70
- package/dist/esm2022/lib/consumers/get-piped-producers-alt.service.mjs +0 -49
- package/dist/esm2022/lib/consumers/get-producers-piped.service.mjs +0 -46
- package/dist/esm2022/lib/consumers/get-videos.service.mjs +0 -58
- package/dist/esm2022/lib/consumers/mix-streams.service.mjs +0 -73
- package/dist/esm2022/lib/consumers/on-screen-changes.service.mjs +0 -63
- package/dist/esm2022/lib/consumers/prepopulate-user-media.service.mjs +0 -442
- package/dist/esm2022/lib/consumers/process-consumer-transports-audio.service.mjs +0 -72
- package/dist/esm2022/lib/consumers/process-consumer-transports.service.mjs +0 -91
- package/dist/esm2022/lib/consumers/re-port.service.mjs +0 -66
- package/dist/esm2022/lib/consumers/re-update-inter.service.mjs +0 -157
- package/dist/esm2022/lib/consumers/readjust.service.mjs +0 -123
- package/dist/esm2022/lib/consumers/receive-all-piped-transports.service.mjs +0 -56
- package/dist/esm2022/lib/consumers/receive-room-messages.service.mjs +0 -42
- package/dist/esm2022/lib/consumers/reorder-streams.service.mjs +0 -181
- package/dist/esm2022/lib/consumers/request-screen-share.service.mjs +0 -67
- package/dist/esm2022/lib/consumers/resume-pause-audio-streams.service.mjs +0 -99
- package/dist/esm2022/lib/consumers/resume-pause-streams.service.mjs +0 -70
- package/dist/esm2022/lib/consumers/resume-send-transport-audio.service.mjs +0 -55
- package/dist/esm2022/lib/consumers/signal-new-consumer-transport.service.mjs +0 -136
- package/dist/esm2022/lib/consumers/socket-receive-methods/join-consume-room.service.mjs +0 -63
- package/dist/esm2022/lib/consumers/socket-receive-methods/new-pipe-producer.service.mjs +0 -61
- package/dist/esm2022/lib/consumers/socket-receive-methods/producer-closed.service.mjs +0 -51
- package/dist/esm2022/lib/consumers/start-share-screen.service.mjs +0 -80
- package/dist/esm2022/lib/consumers/stop-share-screen.service.mjs +0 -120
- package/dist/esm2022/lib/consumers/stream-success-audio-switch.service.mjs +0 -132
- package/dist/esm2022/lib/consumers/stream-success-audio.service.mjs +0 -149
- package/dist/esm2022/lib/consumers/stream-success-screen.service.mjs +0 -143
- package/dist/esm2022/lib/consumers/stream-success-video.service.mjs +0 -202
- package/dist/esm2022/lib/consumers/switch-user-audio.service.mjs +0 -87
- package/dist/esm2022/lib/consumers/switch-user-video-alt.service.mjs +0 -228
- package/dist/esm2022/lib/consumers/switch-user-video.service.mjs +0 -125
- package/dist/esm2022/lib/consumers/trigger.service.mjs +0 -172
- package/dist/esm2022/lib/consumers/update-mini-cards-grid.service.mjs +0 -81
- package/dist/esm2022/lib/consumers/update-participant-audio-decibels.service.mjs +0 -39
- package/dist/esm2022/lib/methods/background-methods/launch-background.service.mjs +0 -23
- package/dist/esm2022/lib/methods/breakout-room-methods/breakout-room-updated.service.mjs +0 -112
- package/dist/esm2022/lib/methods/breakout-room-methods/launch-breakout-rooms.service.mjs +0 -22
- package/dist/esm2022/lib/methods/co-host-methods/launch-co-host.service.mjs +0 -22
- package/dist/esm2022/lib/methods/co-host-methods/modify-co-host-settings.service.mjs +0 -60
- package/dist/esm2022/lib/methods/display-settings-methods/launch-display-settings.service.mjs +0 -24
- package/dist/esm2022/lib/methods/display-settings-methods/modify-display-settings.service.mjs +0 -119
- package/dist/esm2022/lib/methods/exit-methods/confirm-exit.service.mjs +0 -28
- package/dist/esm2022/lib/methods/exit-methods/launch-confirm-exit.service.mjs +0 -22
- package/dist/esm2022/lib/methods/media-settings-methods/launch-media-settings.service.mjs +0 -50
- package/dist/esm2022/lib/methods/menu-methods/launch-menu-modal.service.mjs +0 -22
- package/dist/esm2022/lib/methods/message-methods/launch-messages.service.mjs +0 -23
- package/dist/esm2022/lib/methods/message-methods/send-message.service.mjs +0 -94
- package/dist/esm2022/lib/methods/participants-methods/launch-participants.service.mjs +0 -23
- package/dist/esm2022/lib/methods/participants-methods/message-participants.service.mjs +0 -52
- package/dist/esm2022/lib/methods/participants-methods/mute-participants.service.mjs +0 -57
- package/dist/esm2022/lib/methods/participants-methods/remove-participants.service.mjs +0 -62
- package/dist/esm2022/lib/methods/polls-methods/handle-create-poll.service.mjs +0 -37
- package/dist/esm2022/lib/methods/polls-methods/handle-end-poll.service.mjs +0 -40
- package/dist/esm2022/lib/methods/polls-methods/handle-vote-poll.service.mjs +0 -49
- package/dist/esm2022/lib/methods/polls-methods/launch-poll.service.mjs +0 -23
- package/dist/esm2022/lib/methods/polls-methods/poll-updated.service.mjs +0 -64
- package/dist/esm2022/lib/methods/recording-methods/check-pause-state.service.mjs +0 -45
- package/dist/esm2022/lib/methods/recording-methods/check-resume-state.service.mjs +0 -34
- package/dist/esm2022/lib/methods/recording-methods/confirm-recording.service.mjs +0 -215
- package/dist/esm2022/lib/methods/recording-methods/launch-recording.service.mjs +0 -82
- package/dist/esm2022/lib/methods/recording-methods/record-pause-timer.service.mjs +0 -40
- package/dist/esm2022/lib/methods/recording-methods/record-resume-timer.service.mjs +0 -86
- package/dist/esm2022/lib/methods/recording-methods/record-start-timer.service.mjs +0 -89
- package/dist/esm2022/lib/methods/recording-methods/record-update-timer.service.mjs +0 -48
- package/dist/esm2022/lib/methods/recording-methods/start-recording.service.mjs +0 -147
- package/dist/esm2022/lib/methods/recording-methods/stop-recording.service.mjs +0 -74
- package/dist/esm2022/lib/methods/recording-methods/update-recording.service.mjs +0 -224
- package/dist/esm2022/lib/methods/requests-methods/launch-requests.service.mjs +0 -26
- package/dist/esm2022/lib/methods/requests-methods/respond-to-requests.service.mjs +0 -45
- package/dist/esm2022/lib/methods/settings-methods/launch-settings.service.mjs +0 -26
- package/dist/esm2022/lib/methods/settings-methods/modify-settings.service.mjs +0 -67
- package/dist/esm2022/lib/methods/stream-methods/click-audio.service.mjs +0 -178
- package/dist/esm2022/lib/methods/stream-methods/click-chat.service.mjs +0 -44
- package/dist/esm2022/lib/methods/stream-methods/click-screen-share.service.mjs +0 -110
- package/dist/esm2022/lib/methods/stream-methods/click-video.service.mjs +0 -183
- package/dist/esm2022/lib/methods/stream-methods/switch-audio.service.mjs +0 -33
- package/dist/esm2022/lib/methods/stream-methods/switch-video-alt.service.mjs +0 -66
- package/dist/esm2022/lib/methods/stream-methods/switch-video.service.mjs +0 -76
- package/dist/esm2022/lib/methods/utils/format-number.service.mjs +0 -45
- package/dist/esm2022/lib/methods/utils/generate-random-messages.service.mjs +0 -87
- package/dist/esm2022/lib/methods/utils/generate-random-participants.service.mjs +0 -99
- package/dist/esm2022/lib/methods/utils/generate-random-polls.service.mjs +0 -52
- package/dist/esm2022/lib/methods/utils/generate-random-request-list.service.mjs +0 -54
- package/dist/esm2022/lib/methods/utils/generate-random-waiting-room-list.service.mjs +0 -38
- package/dist/esm2022/lib/methods/utils/get-modal-position.util.mjs +0 -22
- package/dist/esm2022/lib/methods/utils/get-overlay-position.util.mjs +0 -21
- package/dist/esm2022/lib/methods/utils/initial-values.util.mjs +0 -379
- package/dist/esm2022/lib/methods/utils/meeting-timer/start-meeting-progress-timer.service.mjs +0 -59
- package/dist/esm2022/lib/methods/utils/mini-audio-player/mini-audio-player.component.mjs +0 -260
- package/dist/esm2022/lib/methods/utils/producer/a-params.service.mjs +0 -21
- package/dist/esm2022/lib/methods/utils/producer/h-params.service.mjs +0 -37
- package/dist/esm2022/lib/methods/utils/producer/screen-params.service.mjs +0 -24
- package/dist/esm2022/lib/methods/utils/producer/v-params.service.mjs +0 -37
- package/dist/esm2022/lib/methods/utils/producer/video-capture-constraints.service.mjs +0 -38
- package/dist/esm2022/lib/methods/utils/sleep.util.mjs +0 -11
- package/dist/esm2022/lib/methods/utils/sound-player.service.mjs +0 -42
- package/dist/esm2022/lib/methods/utils/validate-alphanumeric.service.mjs +0 -33
- package/dist/esm2022/lib/methods/waiting-methods/launch-waiting.service.mjs +0 -23
- package/dist/esm2022/lib/methods/waiting-methods/respond-to-waiting.service.mjs +0 -40
- package/dist/esm2022/lib/methods/whiteboard-methods/capture-canvas-stream.service.mjs +0 -69
- package/dist/esm2022/lib/methods/whiteboard-methods/launch-configure-whiteboard.service.mjs +0 -24
- package/dist/esm2022/lib/producer-client/producer-client-emits/create-device-client.service.mjs +0 -51
- package/dist/esm2022/lib/producer-client/producer-client-emits/join-room-client.service.mjs +0 -65
- package/dist/esm2022/lib/producer-client/producer-client-emits/update-room-parameters-client.service.mjs +0 -232
- package/dist/esm2022/lib/producers/producer-emits/join-con-room.service.mjs +0 -114
- package/dist/esm2022/lib/producers/producer-emits/join-room.service.mjs +0 -114
- package/dist/esm2022/lib/producers/socket-receive-methods/all-members-rest.service.mjs +0 -155
- package/dist/esm2022/lib/producers/socket-receive-methods/all-members.service.mjs +0 -147
- package/dist/esm2022/lib/producers/socket-receive-methods/all-waiting-room-members.service.mjs +0 -30
- package/dist/esm2022/lib/producers/socket-receive-methods/ban-participant.service.mjs +0 -40
- package/dist/esm2022/lib/producers/socket-receive-methods/control-media-host.service.mjs +0 -146
- package/dist/esm2022/lib/producers/socket-receive-methods/disconnect-user-self.service.mjs +0 -26
- package/dist/esm2022/lib/producers/socket-receive-methods/disconnect.service.mjs +0 -38
- package/dist/esm2022/lib/producers/socket-receive-methods/get-domains.service.mjs +0 -63
- package/dist/esm2022/lib/producers/socket-receive-methods/host-request-response.service.mjs +0 -167
- package/dist/esm2022/lib/producers/socket-receive-methods/meeting-ended.service.mjs +0 -44
- package/dist/esm2022/lib/producers/socket-receive-methods/meeting-still-there.service.mjs +0 -24
- package/dist/esm2022/lib/producers/socket-receive-methods/meeting-time-remaining.service.mjs +0 -36
- package/dist/esm2022/lib/producers/socket-receive-methods/participant-requested.service.mjs +0 -32
- package/dist/esm2022/lib/producers/socket-receive-methods/person-joined.service.mjs +0 -29
- package/dist/esm2022/lib/producers/socket-receive-methods/producer-media-closed.service.mjs +0 -68
- package/dist/esm2022/lib/producers/socket-receive-methods/producer-media-paused.service.mjs +0 -90
- package/dist/esm2022/lib/producers/socket-receive-methods/producer-media-resumed.service.mjs +0 -54
- package/dist/esm2022/lib/producers/socket-receive-methods/re-initiate-recording.service.mjs +0 -38
- package/dist/esm2022/lib/producers/socket-receive-methods/receive-message.service.mjs +0 -96
- package/dist/esm2022/lib/producers/socket-receive-methods/recording-notice.service.mjs +0 -195
- package/dist/esm2022/lib/producers/socket-receive-methods/room-record-params.service.mjs +0 -59
- package/dist/esm2022/lib/producers/socket-receive-methods/screen-producer-id.service.mjs +0 -45
- package/dist/esm2022/lib/producers/socket-receive-methods/start-records.service.mjs +0 -35
- package/dist/esm2022/lib/producers/socket-receive-methods/stopped-recording.service.mjs +0 -37
- package/dist/esm2022/lib/producers/socket-receive-methods/time-left-recording.service.mjs +0 -36
- package/dist/esm2022/lib/producers/socket-receive-methods/update-consuming-domains.service.mjs +0 -63
- package/dist/esm2022/lib/producers/socket-receive-methods/update-media-settings.service.mjs +0 -36
- package/dist/esm2022/lib/producers/socket-receive-methods/updated-co-host.service.mjs +0 -56
- package/dist/esm2022/lib/producers/socket-receive-methods/user-waiting.service.mjs +0 -78
- package/dist/esm2022/lib/sockets/socket-manager.service.mjs +0 -73
- package/dist/esm2022/mediasfu-angular.mjs +0 -5
- package/dist/esm2022/public-api.mjs +0 -187
package/dist/README.md
CHANGED
|
@@ -27,6 +27,11 @@ MediaSFU offers a cutting-edge streaming experience that empowers users to custo
|
|
|
27
27
|
|
|
28
28
|
# MediaSFU Angular Module Documentation
|
|
29
29
|
|
|
30
|
+
## Unlock the Power of MediaSFU Community Edition
|
|
31
|
+
**MediaSFU Community Edition is free and open-source**—perfect for developers who want to run their own media server without upfront costs. With robust features and simple setup, you can launch your media solution in minutes. **Ready to scale?** Upgrade seamlessly to **MediaSFU Cloud** for enterprise-grade performance and global scalability.
|
|
32
|
+
**[Get started now on GitHub!](https://github.com/MediaSFU/MediaSFUOpen)**
|
|
33
|
+
---
|
|
34
|
+
|
|
30
35
|
## Table of Contents
|
|
31
36
|
|
|
32
37
|
- [Features](#features)
|
|
@@ -57,17 +62,22 @@ MediaSFU's Angular SDK comes with a host of powerful features out of the box:
|
|
|
57
62
|
|
|
58
63
|
This section will guide users through the initial setup and installation of the npm module.
|
|
59
64
|
|
|
65
|
+
### Documentation Reference
|
|
66
|
+
|
|
67
|
+
For comprehensive documentation on the available methods, components, and functions, please visit [mediasfu.com](https://www.mediasfu.com/angular/). This resource provides detailed information for this guide and additional documentation.
|
|
68
|
+
|
|
69
|
+
|
|
60
70
|
## Installation
|
|
61
71
|
|
|
62
72
|
Instructions on how to install the module using npm.
|
|
63
73
|
|
|
64
|
-
1. **Add the package to your project**
|
|
74
|
+
### 1. **Add the package to your project**
|
|
65
75
|
|
|
66
76
|
```bash
|
|
67
77
|
npm install mediasfu-angular
|
|
68
78
|
```
|
|
69
79
|
|
|
70
|
-
2. **Bootstrap Integration**
|
|
80
|
+
### 2. **Bootstrap Integration**
|
|
71
81
|
|
|
72
82
|
The `mediasfu-angular` package requires Bootstrap for styling. Bootstrap is included by default with the package, so you do not need to install it separately. Ensure that Bootstrap's CSS is correctly added to your project's styles.
|
|
73
83
|
|
|
@@ -98,7 +108,7 @@ Instructions on how to install the module using npm.
|
|
|
98
108
|
**Note:** The `mediasfu-angular` package should handle the Bootstrap's package installation automatically. If it's not present, you may need to add it manually install Bootstrap.
|
|
99
109
|
|
|
100
110
|
|
|
101
|
-
3. **Configure MediaSFU's PreJoinPage Requirements**
|
|
111
|
+
### 3. **Configure MediaSFU's PreJoinPage Requirements**
|
|
102
112
|
|
|
103
113
|
If you intend to use MediaSFU's `PreJoinPage` component, additional configuration is required. You need to provide the `HttpClient` and `CookieService` providers in your application's configuration. These packages should have been installed by default as well else add manually.
|
|
104
114
|
|
|
@@ -124,14 +134,20 @@ Instructions on how to install the module using npm.
|
|
|
124
134
|
};
|
|
125
135
|
|
|
126
136
|
```
|
|
127
|
-
|
|
128
|
-
4. **Obtain an API key from MediaSFU.** You can get your API key by signing up or logging into your account at [mediasfu.com](https://www.mediasfu.com/).
|
|
129
137
|
|
|
130
|
-
|
|
138
|
+
### 4. Obtain an API Key (If Required)
|
|
139
|
+
You can get your API key by signing up or logging into your account at [mediasfu.com](https://www.mediasfu.com/).
|
|
140
|
+
|
|
141
|
+
<div style="background-color:#f0f0f0; padding: 10px; border-radius: 5px;">
|
|
131
142
|
<h4 style="color:#d9534f;">Important:</h4>
|
|
132
|
-
<p style="font-size: 1.2em;">You must obtain an API key from <a href="https://www.mediasfu.com/">mediasfu.com</a> to use this package.</p>
|
|
143
|
+
<p style="font-size: 1.2em; color: black;">You must obtain an API key from <a href="https://www.mediasfu.com/">mediasfu.com</a> to use this package with MediaSFU Cloud. You do not need the API Key if self-hosting.</p>
|
|
133
144
|
</div>
|
|
134
145
|
|
|
146
|
+
## **Self-Hosting MediaSFU**
|
|
147
|
+
|
|
148
|
+
If you plan to self-host MediaSFU or use it without MediaSFU Cloud services, you don't need an API key. You can access the open-source version of MediaSFU from the [MediaSFU Open Repository](https://github.com/MediaSFU/MediaSFUOpen).
|
|
149
|
+
|
|
150
|
+
This setup allows full flexibility and customization while bypassing the need for cloud-dependent credentials.
|
|
135
151
|
|
|
136
152
|
|
|
137
153
|
# Basic Usage Guide <a name="basic-usage-guide"></a>
|
|
@@ -139,19 +155,14 @@ Instructions on how to install the module using npm.
|
|
|
139
155
|
A basic guide on how to use the module for common tasks.
|
|
140
156
|
|
|
141
157
|
This section will guide users through the initial setup and installation of the npm module.
|
|
142
|
-
|
|
143
|
-
*If users are interested in the Android/iOS (mobile) versions, they can refer to the Expo React Native project that is configured to produce both web and mobile apps. The source code for this project is available on GitHub at [*MediaSFU/MediaSFU*](https://github.com/MediaSFU/MediaSFU)*.
|
|
144
|
-
|
|
145
|
-
*For the community edition, users can visit the GitHub repository at [*MediaSFU/MediaSFUOpen*](https://github.com/MediaSFU/MediaSFUOpen)*.
|
|
146
|
-
|
|
147
|
-
*Users can follow the instructions provided in the README of the respective GitHub repositories to set up and install the projects for both web and mobile platforms, ensuring a consistent user experience across different platforms*.
|
|
148
|
-
|
|
149
|
-
*Users can follow the instructions provided here and in the README of the GitHub repository to set up and install the project for both web and mobile platforms using Expo. This allows for seamless development and deployment across multiple platforms, ensuring a consistent user experience*.
|
|
150
|
-
|
|
151
158
|
## Introduction
|
|
152
159
|
|
|
153
160
|
MediaSFU is a 2-page application consisting of a prejoin/welcome page and the main events room page. This guide will walk you through the basic usage of the module for setting up these pages.
|
|
154
161
|
|
|
162
|
+
### Documentation Reference
|
|
163
|
+
|
|
164
|
+
For comprehensive documentation on the available methods, components, and functions, please visit [mediasfu.com](https://www.mediasfu.com/angular/). This resource provides detailed information for this guide and additional documentation.
|
|
165
|
+
|
|
155
166
|
## Prebuilt Event Rooms
|
|
156
167
|
|
|
157
168
|
MediaSFU provides prebuilt event rooms for various purposes. These rooms are rendered as full pages and can be easily imported and used in your application. Here are the available prebuilt event rooms:
|
|
@@ -269,450 +280,469 @@ updateValidated(true);
|
|
|
269
280
|
See the following code for the PreJoinPage page logic:
|
|
270
281
|
|
|
271
282
|
```javascript
|
|
272
|
-
import { Component, Inject, Input, Optional } from '@angular/core';
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
}
|
|
283
|
+
import { Component, Inject, Input, OnInit, Optional } from '@angular/core';
|
|
284
|
+
import { FormBuilder, FormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
285
|
+
import { CommonModule } from '@angular/common';
|
|
286
|
+
import { Socket } from 'socket.io-client';
|
|
287
|
+
import {
|
|
288
|
+
ConnectSocketType, ShowAlert,
|
|
289
|
+
ConnectLocalSocketType, ResponseLocalConnection,
|
|
290
|
+
ResponseLocalConnectionData, RecordingParams, MeetingRoomParams
|
|
291
|
+
} from '../../../@types/types';
|
|
292
|
+
import { CheckLimitsAndMakeRequest } from '../../../methods/utils/check-limits-and-make-request.service';
|
|
293
|
+
import { CreateRoomOnMediaSFU } from '../../../methods/utils/create-room-on-media-sfu.service';
|
|
294
|
+
import { JoinRoomOnMediaSFUService } from '../../../methods/utils/join-room-on-media-sfu.service';
|
|
295
|
+
|
|
296
|
+
export interface JoinLocalEventRoomParameters {
|
|
297
|
+
eventID: string;
|
|
298
|
+
userName: string;
|
|
299
|
+
secureCode?: string;
|
|
300
|
+
videoPreference?: string | null;
|
|
301
|
+
audioPreference?: string | null;
|
|
302
|
+
audioOutputPreference?: string | null;
|
|
303
|
+
}
|
|
294
304
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
305
|
+
export interface JoinLocalEventRoomOptions {
|
|
306
|
+
joinData: JoinLocalEventRoomParameters;
|
|
307
|
+
link?: string;
|
|
308
|
+
}
|
|
299
309
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
310
|
+
export interface CreateLocalRoomParameters {
|
|
311
|
+
eventID: string;
|
|
312
|
+
duration: number;
|
|
313
|
+
capacity: number;
|
|
314
|
+
userName: string;
|
|
315
|
+
scheduledDate: Date;
|
|
316
|
+
secureCode: string;
|
|
317
|
+
waitRoom?: boolean;
|
|
318
|
+
recordingParams?: RecordingParams;
|
|
319
|
+
eventRoomParams?: MeetingRoomParams;
|
|
320
|
+
videoPreference?: string | null;
|
|
321
|
+
audioPreference?: string | null;
|
|
322
|
+
audioOutputPreference?: string | null;
|
|
323
|
+
mediasfuURL?: string;
|
|
324
|
+
}
|
|
325
|
+
export interface CreateLocalRoomOptions {
|
|
326
|
+
createData: CreateLocalRoomParameters;
|
|
327
|
+
link?: string;
|
|
328
|
+
}
|
|
304
329
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
secret: string;
|
|
312
|
-
success: boolean;
|
|
313
|
-
}
|
|
330
|
+
export interface CreateJoinLocalRoomResponse {
|
|
331
|
+
success: boolean;
|
|
332
|
+
secret: string;
|
|
333
|
+
reason?: string;
|
|
334
|
+
url?: string;
|
|
335
|
+
}
|
|
314
336
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
337
|
+
// Type definitions for parameters and credentials
|
|
338
|
+
export interface PreJoinPageParameters {
|
|
339
|
+
imgSrc?: string;
|
|
340
|
+
showAlert?: ShowAlert;
|
|
341
|
+
updateIsLoadingModalVisible: (visible: boolean) => void;
|
|
342
|
+
connectSocket: ConnectSocketType;
|
|
343
|
+
connectLocalSocket?: ConnectLocalSocketType;
|
|
344
|
+
updateSocket: (socket: Socket) => void;
|
|
345
|
+
updateLocalSocket?: (socket: Socket) => void;
|
|
346
|
+
updateValidated: (validated: boolean) => void;
|
|
347
|
+
updateApiUserName: (userName: string) => void;
|
|
348
|
+
updateApiToken: (token: string) => void;
|
|
349
|
+
updateLink: (link: string) => void;
|
|
350
|
+
updateRoomName: (roomName: string) => void;
|
|
351
|
+
updateMember: (member: string) => void;
|
|
352
|
+
}
|
|
319
353
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
}) => Promise<{
|
|
325
|
-
data: CreateJoinRoomResponse | CreateJoinRoomError | null;
|
|
326
|
-
success: boolean;
|
|
327
|
-
}>;
|
|
328
|
-
|
|
329
|
-
export type CreateRoomOnMediaSFUType = (options: {
|
|
330
|
-
payload: any;
|
|
331
|
-
apiUserName: string;
|
|
332
|
-
apiKey: string;
|
|
333
|
-
}) => Promise<{
|
|
334
|
-
data: CreateJoinRoomResponse | CreateJoinRoomError | null;
|
|
335
|
-
success: boolean;
|
|
336
|
-
}>;
|
|
337
|
-
|
|
338
|
-
export type PreJoinPageType = (options: PreJoinPageOptions) => void;
|
|
339
|
-
|
|
340
|
-
const MAX_ATTEMPTS = 20; // Maximum number of unsuccessful attempts before rate limiting
|
|
341
|
-
const RATE_LIMIT_DURATION = 3 * 60 * 60 * 1000; // 3 hours in milliseconds
|
|
342
|
-
const TIMEOUT_DURATION = 10000; // 5 seconds in milliseconds
|
|
354
|
+
export interface Credentials {
|
|
355
|
+
apiUserName: string;
|
|
356
|
+
apiKey: string;
|
|
357
|
+
}
|
|
343
358
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
* @templateUrl ./pre-join-page.component.html
|
|
351
|
-
* @styleUrls ./pre-join-page.component.css
|
|
352
|
-
* @imports [CommonModule, ReactiveFormsModule]
|
|
353
|
-
*
|
|
354
|
-
* @description
|
|
355
|
-
* This component provides functionality for users to create or join a room on MediaSFU.
|
|
356
|
-
* It includes form validation, error handling, and API requests to the MediaSFU service.
|
|
357
|
-
*
|
|
358
|
-
* @property {any} parameters - Input parameters for the component.
|
|
359
|
-
* @property {Object} credentials - API credentials for MediaSFU.
|
|
360
|
-
* @property {string} credentials.apiUserName - API username.
|
|
361
|
-
* @property {string} credentials.apiKey - API key.
|
|
362
|
-
* @property {boolean} isCreateMode - Flag to toggle between create and join modes.
|
|
363
|
-
* @property {FormGroup} preJoinForm - Form group for pre-join form.
|
|
364
|
-
* @property {string} error - Error message to display.
|
|
365
|
-
*
|
|
366
|
-
* @constructor
|
|
367
|
-
* @param {FormBuilder} fb - FormBuilder service for creating form groups.
|
|
368
|
-
* @param {HttpClient} http - HttpClient service for making HTTP requests.
|
|
369
|
-
* @param {CookieService} cookieService - CookieService for managing cookies.
|
|
370
|
-
*
|
|
371
|
-
* @method ngOnInit
|
|
372
|
-
* @description Lifecycle hook that is called after data-bound properties are initialized.
|
|
373
|
-
*
|
|
374
|
-
* @method toggleMode
|
|
375
|
-
* @description Toggles between create and join modes and resets the error message.
|
|
376
|
-
*
|
|
377
|
-
* @method handleCreateRoom
|
|
378
|
-
* @description Handles the creation of a room on MediaSFU. Validates form inputs, sends a request to create a room, and handles the response.
|
|
379
|
-
*
|
|
380
|
-
* @method handleJoinRoom
|
|
381
|
-
* @description Handles joining a room on MediaSFU. Validates form inputs, sends a request to join a room, and handles the response.
|
|
382
|
-
*
|
|
383
|
-
* @method checkLimitsAndMakeRequest
|
|
384
|
-
* @description Checks rate limits and makes a request to connect to a room. Handles unsuccessful attempts and updates the state accordingly.
|
|
385
|
-
*
|
|
386
|
-
* @method createRoomOnMediaSFU
|
|
387
|
-
* @description Sends a request to create a room on MediaSFU.
|
|
388
|
-
* @param {Object} params - Parameters for the request.
|
|
389
|
-
* @param {any} params.payload - Payload for the request.
|
|
390
|
-
* @param {string} params.apiUserName - API username.
|
|
391
|
-
* @param {string} params.apiKey - API key.
|
|
392
|
-
* @returns {Promise<{ data: CreateJoinRoomResponse | CreateJoinRoomError | null; success: boolean }>} Response from the API.
|
|
393
|
-
*
|
|
394
|
-
* @method joinRoomOnMediaSFU
|
|
395
|
-
* @description Sends a request to join a room on MediaSFU.
|
|
396
|
-
* @param {Object} params - Parameters for the request.
|
|
397
|
-
* @param {any} params.payload - Payload for the request.
|
|
398
|
-
* @param {string} params.apiUserName - API username.
|
|
399
|
-
* @param {string} params.apiKey - API key.
|
|
400
|
-
* @returns {Promise<{ data: CreateJoinRoomResponse | CreateJoinRoomError | null; success: boolean }>} Response from the API.
|
|
401
|
-
*/
|
|
402
|
-
@Component({
|
|
403
|
-
selector: 'app-pre-join-page',
|
|
404
|
-
standalone: true,
|
|
405
|
-
templateUrl: './pre-join-page.component.html',
|
|
406
|
-
styleUrls: ['./pre-join-page.component.css'],
|
|
407
|
-
imports: [CommonModule, ReactiveFormsModule],
|
|
408
|
-
})
|
|
409
|
-
export class PreJoinPage {
|
|
410
|
-
@Input() parameters: PreJoinPageParameters = {} as PreJoinPageParameters;
|
|
411
|
-
@Input() credentials = { apiUserName: 'yourAPIUSERNAME', apiKey: 'yourAPIKEY' };
|
|
412
|
-
|
|
413
|
-
isCreateMode = false;
|
|
414
|
-
preJoinForm: FormGroup;
|
|
415
|
-
error = '';
|
|
416
|
-
imgSrc: string = this.parameters.imgSrc || '';
|
|
417
|
-
|
|
418
|
-
constructor(
|
|
419
|
-
private fb: FormBuilder,
|
|
420
|
-
private http: HttpClient,
|
|
421
|
-
private cookieService: CookieService,
|
|
422
|
-
@Optional() @Inject('parameters') injectedParameters: PreJoinPageParameters,
|
|
423
|
-
@Optional() @Inject('credentials') injectedCredentials: Credentials,
|
|
424
|
-
) {
|
|
425
|
-
this.preJoinForm = this.fb.group({
|
|
426
|
-
name: ['', Validators.required],
|
|
427
|
-
duration: [''],
|
|
428
|
-
eventType: [''],
|
|
429
|
-
capacity: [''],
|
|
430
|
-
eventID: [''],
|
|
431
|
-
});
|
|
432
|
-
this.parameters = injectedParameters || this.parameters;
|
|
433
|
-
this.credentials = injectedCredentials || this.credentials;
|
|
434
|
-
}
|
|
359
|
+
export interface PreJoinPageOptions {
|
|
360
|
+
localLink?: string;
|
|
361
|
+
connectMediaSFU?: boolean;
|
|
362
|
+
parameters: PreJoinPageParameters;
|
|
363
|
+
credentials?: Credentials;
|
|
364
|
+
}
|
|
435
365
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
366
|
+
export type PreJoinPageType = (options: PreJoinPageOptions) => HTMLElement;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* @fileoverview PreJoinPage component for handling room creation and joining on MediaSFU.
|
|
370
|
+
*
|
|
371
|
+
* @component
|
|
372
|
+
* @selector app-pre-join-page
|
|
373
|
+
* @standalone true
|
|
374
|
+
* @templateUrl ./pre-join-page.component.html
|
|
375
|
+
* @styleUrls ./pre-join-page.component.css
|
|
376
|
+
* @imports [CommonModule, ReactiveFormsModule]
|
|
377
|
+
*
|
|
378
|
+
* @description
|
|
379
|
+
* This component provides functionality for users to create or join a room on MediaSFU.
|
|
380
|
+
* It includes form validation, error handling, and API requests to the MediaSFU service.
|
|
381
|
+
*
|
|
382
|
+
* @property {any} parameters - Input parameters for the component.
|
|
383
|
+
* @property {Object} credentials - API credentials for MediaSFU.
|
|
384
|
+
* @property {string} credentials.apiUserName - API username.
|
|
385
|
+
* @property {string} credentials.apiKey - API key.
|
|
386
|
+
* @property {boolean} isCreateMode - Flag to toggle between create and join modes.
|
|
387
|
+
* @property {FormGroup} preJoinForm - Form group for pre-join form.
|
|
388
|
+
* @property {string} error - Error message to display.
|
|
389
|
+
*
|
|
390
|
+
* @constructor
|
|
391
|
+
* @param {FormBuilder} fb - FormBuilder service for creating form groups.
|
|
392
|
+
* @param {HttpClient} http - HttpClient service for making HTTP requests.
|
|
393
|
+
* @param {CookieService} cookieService - CookieService for managing cookies.
|
|
394
|
+
*
|
|
395
|
+
* @method ngOnInit
|
|
396
|
+
* @description Lifecycle hook that is called after data-bound properties are initialized.
|
|
397
|
+
*
|
|
398
|
+
* @method toggleMode
|
|
399
|
+
* @description Toggles between create and join modes and resets the error message.
|
|
400
|
+
*
|
|
401
|
+
* @method handleCreateRoom
|
|
402
|
+
* @description Handles the creation of a room on MediaSFU. Validates form inputs, sends a request to create a room, and handles the response.
|
|
403
|
+
*
|
|
404
|
+
* @method handleJoinRoom
|
|
405
|
+
* @description Handles joining a room on MediaSFU. Validates form inputs, sends a request to join a room, and handles the response.
|
|
406
|
+
*
|
|
407
|
+
* @method checkLimitsAndMakeRequest
|
|
408
|
+
* @description Checks rate limits and makes a request to connect to a room. Handles unsuccessful attempts and updates the state accordingly.
|
|
409
|
+
*
|
|
410
|
+
* @method createRoomOnMediaSFU
|
|
411
|
+
* @description Sends a request to create a room on MediaSFU.
|
|
412
|
+
* @param {Object} params - Parameters for the request.
|
|
413
|
+
* @param {any} params.payload - Payload for the request.
|
|
414
|
+
* @param {string} params.apiUserName - API username.
|
|
415
|
+
* @param {string} params.apiKey - API key.
|
|
416
|
+
* @returns {Promise<{ data: CreateJoinRoomResponse | CreateJoinRoomError | null; success: boolean }>} Response from the API.
|
|
417
|
+
*
|
|
418
|
+
* @method joinRoomOnMediaSFU
|
|
419
|
+
* @description Sends a request to join a room on MediaSFU.
|
|
420
|
+
* @param {Object} params - Parameters for the request.
|
|
421
|
+
* @param {any} params.payload - Payload for the request.
|
|
422
|
+
* @param {string} params.apiUserName - API username.
|
|
423
|
+
* @param {string} params.apiKey - API key.
|
|
424
|
+
* @returns {Promise<{ data: CreateJoinRoomResponse | CreateJoinRoomError | null; success: boolean }>} Response from the API.
|
|
425
|
+
*
|
|
426
|
+
* @example
|
|
427
|
+
* ```html
|
|
428
|
+
* <app-pre-join-page
|
|
429
|
+
* [parameters]="preJoinPageParameters"
|
|
430
|
+
* [credentials]="{ apiUserName: 'username', apiKey: 'apiKey' }"
|
|
431
|
+
* [localLink]="'http://localhost:3000'"
|
|
432
|
+
* [connectMediaSFU]="false"
|
|
433
|
+
* ></app-pre-join-page>
|
|
434
|
+
* ```
|
|
435
|
+
*/
|
|
440
436
|
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
437
|
+
@Component({
|
|
438
|
+
selector: 'app-pre-join-page',
|
|
439
|
+
templateUrl: './pre-join-page.component.html',
|
|
440
|
+
styleUrls: ['./pre-join-page.component.css'],
|
|
441
|
+
imports: [CommonModule, ReactiveFormsModule]
|
|
442
|
+
})
|
|
443
|
+
export class PreJoinPage implements OnInit {
|
|
444
|
+
@Input() parameters: PreJoinPageParameters = {} as PreJoinPageParameters;
|
|
445
|
+
@Input() credentials: Credentials = { apiUserName: 'yourAPIUSERNAME', apiKey: 'yourAPIKEY' };
|
|
446
|
+
@Input() localLink: string | undefined = "";
|
|
447
|
+
@Input() connectMediaSFU: boolean | undefined = true;
|
|
446
448
|
|
|
447
|
-
|
|
449
|
+
isCreateMode = false;
|
|
450
|
+
preJoinForm: FormGroup;
|
|
451
|
+
error = '';
|
|
448
452
|
|
|
449
|
-
|
|
450
|
-
this.error = 'Please fill all the fields.';
|
|
451
|
-
return;
|
|
452
|
-
}
|
|
453
|
+
imgSrc: string = this.parameters.imgSrc || '';
|
|
453
454
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
capacity: parseInt(capacity),
|
|
458
|
-
eventType,
|
|
459
|
-
userName: name,
|
|
460
|
-
};
|
|
455
|
+
localConnected = false;
|
|
456
|
+
localData: ResponseLocalConnectionData | undefined = undefined;
|
|
457
|
+
initSocket: Socket | undefined = undefined;
|
|
461
458
|
|
|
462
|
-
|
|
459
|
+
constructor(
|
|
460
|
+
private fb: FormBuilder,
|
|
461
|
+
@Optional() @Inject('parameters') injectedParameters: PreJoinPageParameters,
|
|
462
|
+
@Optional() @Inject('credentials') injectedCredentials: Credentials,
|
|
463
|
+
@Optional() @Inject('localLink') injectedLocalLink: string,
|
|
464
|
+
@Optional() @Inject('connectMediaSFU') injectedConnectMediaSFU: boolean,
|
|
465
|
+
private checkLimitsService: CheckLimitsAndMakeRequest,
|
|
466
|
+
private createRoomService: CreateRoomOnMediaSFU,
|
|
467
|
+
private joinRoomService: JoinRoomOnMediaSFUService
|
|
468
|
+
) {
|
|
469
|
+
this.preJoinForm = this.fb.group({
|
|
470
|
+
name: ['', Validators.required],
|
|
471
|
+
duration: [''],
|
|
472
|
+
eventType: [''],
|
|
473
|
+
capacity: [''],
|
|
474
|
+
eventID: [''],
|
|
475
|
+
});
|
|
476
|
+
this.parameters = injectedParameters || this.parameters;
|
|
477
|
+
this.credentials = injectedCredentials || this.credentials;
|
|
478
|
+
this.localLink = injectedLocalLink || this.localLink;
|
|
479
|
+
this.connectMediaSFU = injectedConnectMediaSFU !== undefined ? injectedConnectMediaSFU : this.connectMediaSFU;
|
|
463
480
|
|
|
464
|
-
|
|
465
|
-
const response = await this.createRoomOnMediaSFU({
|
|
466
|
-
payload,
|
|
467
|
-
apiUserName: this.credentials.apiUserName,
|
|
468
|
-
apiKey: this.credentials.apiKey,
|
|
469
|
-
});
|
|
481
|
+
}
|
|
470
482
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
apiToken: response.data.secret,
|
|
475
|
-
link: response.data.link,
|
|
476
|
-
userName: name,
|
|
477
|
-
});
|
|
478
|
-
this.error = '';
|
|
479
|
-
} else {
|
|
480
|
-
this.parameters.updateIsLoadingModalVisible(false);
|
|
481
|
-
this.error = `${
|
|
482
|
-
response.data ? ('error' in response.data ? response.data.error : '') : ''
|
|
483
|
-
}`;
|
|
484
|
-
}
|
|
485
|
-
} catch (error) {
|
|
486
|
-
this.parameters.updateIsLoadingModalVisible(false);
|
|
487
|
-
this.error = `Unable to connect. ${(error as any).message}`;
|
|
488
|
-
}
|
|
483
|
+
ngOnInit(): void {
|
|
484
|
+
if (this.localLink && !this.localConnected && !this.initSocket) {
|
|
485
|
+
this.connectLocalSocket();
|
|
489
486
|
}
|
|
487
|
+
}
|
|
490
488
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
489
|
+
private async connectLocalSocket(): Promise<void> {
|
|
490
|
+
try {
|
|
491
|
+
const response = await this.parameters.connectLocalSocket?.({ link: this.localLink! }) as ResponseLocalConnection;
|
|
492
|
+
if (response) {
|
|
493
|
+
this.localData = response.data;
|
|
494
|
+
this.initSocket = response.socket;
|
|
495
|
+
this.localConnected = true;
|
|
495
496
|
}
|
|
497
|
+
} catch (error: any) {
|
|
498
|
+
this.parameters.showAlert?.({
|
|
499
|
+
message: `Unable to connect to ${this.localLink}. ${error}`,
|
|
500
|
+
type: 'danger',
|
|
501
|
+
duration: 3000,
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
}
|
|
496
505
|
|
|
497
|
-
|
|
506
|
+
toggleMode(): void {
|
|
507
|
+
this.isCreateMode = !this.isCreateMode;
|
|
508
|
+
this.error = '';
|
|
509
|
+
}
|
|
498
510
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
511
|
+
async joinLocalRoom(options: JoinLocalEventRoomOptions): Promise<void> {
|
|
512
|
+
this.initSocket?.emit('joinEventRoom', options.joinData, (response: CreateJoinLocalRoomResponse) => {
|
|
513
|
+
if (response.success) {
|
|
514
|
+
this.parameters.updateSocket(this.initSocket!);
|
|
515
|
+
this.parameters.updateApiUserName(this.localData?.apiUserName || '');
|
|
516
|
+
this.parameters.updateApiToken(response.secret);
|
|
517
|
+
this.parameters.updateLink(options.link || '');
|
|
518
|
+
this.parameters.updateRoomName(options.joinData.eventID);
|
|
519
|
+
this.parameters.updateMember(options.joinData.userName);
|
|
520
|
+
this.parameters.updateIsLoadingModalVisible(false);
|
|
521
|
+
this.parameters.updateValidated(true);
|
|
522
|
+
} else {
|
|
523
|
+
this.parameters.updateIsLoadingModalVisible(false);
|
|
524
|
+
this.error = `Unable to join room. ${response.reason}`;
|
|
502
525
|
}
|
|
526
|
+
});
|
|
527
|
+
}
|
|
503
528
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
529
|
+
async createLocalRoom(options: CreateLocalRoomOptions): Promise<void> {
|
|
530
|
+
this.initSocket?.emit('createRoom', options.createData, (response: CreateJoinLocalRoomResponse) => {
|
|
531
|
+
if (response.success) {
|
|
532
|
+
this.parameters.updateSocket(this.initSocket!);
|
|
533
|
+
this.parameters.updateApiUserName(this.localData?.apiUserName || '');
|
|
534
|
+
this.parameters.updateApiToken(response.secret);
|
|
535
|
+
this.parameters.updateLink(options.link || '');
|
|
536
|
+
this.parameters.updateRoomName(options.createData.eventID);
|
|
537
|
+
// Update member as `userName` + "_2" to split in the room
|
|
538
|
+
this.parameters.updateMember(`${options.createData.userName}_2`);
|
|
539
|
+
this.parameters.updateIsLoadingModalVisible(false);
|
|
540
|
+
this.parameters.updateValidated(true);
|
|
541
|
+
} else {
|
|
542
|
+
this.parameters.updateIsLoadingModalVisible(false);
|
|
543
|
+
this.error = `Unable to create room. ${response.reason}`;
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
async roomCreator(options: { payload: any; apiUserName: string; apiKey: string; validate?: boolean }): Promise<any> {
|
|
549
|
+
const { payload, apiUserName, apiKey, validate = true } = options;
|
|
550
|
+
const response = await this.createRoomService.createRoomOnMediaSFU({
|
|
551
|
+
payload,
|
|
552
|
+
apiUserName,
|
|
553
|
+
apiKey,
|
|
554
|
+
});
|
|
509
555
|
|
|
510
|
-
|
|
556
|
+
if (response.success && response.data && 'roomName' in response.data) {
|
|
557
|
+
await this.checkLimitsService.checkLimitsAndMakeRequest({
|
|
558
|
+
apiUserName: response.data.roomName,
|
|
559
|
+
apiToken: response.data.secret,
|
|
560
|
+
link: response.data.link,
|
|
561
|
+
userName: payload.userName,
|
|
562
|
+
parameters: this.parameters,
|
|
563
|
+
validate: validate,
|
|
564
|
+
});
|
|
565
|
+
return response;
|
|
566
|
+
} else {
|
|
567
|
+
this.parameters.updateIsLoadingModalVisible(false);
|
|
568
|
+
this.error = `Unable to create room. ${
|
|
569
|
+
response.data
|
|
570
|
+
? 'error' in response.data
|
|
571
|
+
? response.data.error
|
|
572
|
+
: ''
|
|
573
|
+
: ''
|
|
574
|
+
}`;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
511
577
|
|
|
512
|
-
|
|
513
|
-
const response = await this.joinRoomOnMediaSFU({
|
|
514
|
-
payload,
|
|
515
|
-
apiUserName: this.credentials.apiUserName,
|
|
516
|
-
apiKey: this.credentials.apiKey,
|
|
517
|
-
});
|
|
578
|
+
async handleCreateRoom(): Promise<void> {
|
|
518
579
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
userName: name,
|
|
525
|
-
});
|
|
526
|
-
this.error = '';
|
|
527
|
-
} else {
|
|
528
|
-
this.parameters.updateIsLoadingModalVisible(false);
|
|
529
|
-
this.error = `Unable to connect to room. ${
|
|
530
|
-
response.data ? ('error' in response.data ? response.data.error : '') : ''
|
|
531
|
-
}`;
|
|
532
|
-
}
|
|
533
|
-
} catch (error) {
|
|
534
|
-
this.parameters.updateIsLoadingModalVisible(false);
|
|
535
|
-
this.error = `Unable to connect. ${(error as any).message}`;
|
|
536
|
-
}
|
|
580
|
+
const { name, duration, eventType, capacity } = this.preJoinForm.value;
|
|
581
|
+
|
|
582
|
+
if (!name || !duration || !eventType || !capacity) {
|
|
583
|
+
this.error = 'Please fill all the fields.';
|
|
584
|
+
return;
|
|
537
585
|
}
|
|
538
586
|
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
userName,
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
apiToken: string;
|
|
548
|
-
link: string;
|
|
549
|
-
apiKey?: string;
|
|
550
|
-
userName: string;
|
|
551
|
-
}) {
|
|
552
|
-
let unsuccessfulAttempts = parseInt(this.cookieService.get('unsuccessfulAttempts')) || 0;
|
|
553
|
-
let lastRequestTimestamp = parseInt(this.cookieService.get('lastRequestTimestamp')) || 0;
|
|
554
|
-
|
|
555
|
-
if (unsuccessfulAttempts >= MAX_ATTEMPTS) {
|
|
556
|
-
if (Date.now() - lastRequestTimestamp < RATE_LIMIT_DURATION) {
|
|
557
|
-
this.parameters.showAlert?.({
|
|
558
|
-
message: 'Too many unsuccessful attempts. Please try again later.',
|
|
559
|
-
type: 'danger',
|
|
560
|
-
duration: 3000,
|
|
561
|
-
});
|
|
562
|
-
this.cookieService.set('lastRequestTimestamp', Date.now().toString());
|
|
563
|
-
return;
|
|
564
|
-
} else {
|
|
565
|
-
unsuccessfulAttempts = 0;
|
|
566
|
-
this.cookieService.set('unsuccessfulAttempts', unsuccessfulAttempts.toString());
|
|
567
|
-
this.cookieService.set('lastRequestTimestamp', Date.now().toString());
|
|
568
|
-
}
|
|
569
|
-
}
|
|
587
|
+
const payload = {
|
|
588
|
+
action: 'create',
|
|
589
|
+
duration: parseInt(duration),
|
|
590
|
+
capacity: parseInt(capacity),
|
|
591
|
+
eventType,
|
|
592
|
+
userName: name,
|
|
593
|
+
recordOnly: false,
|
|
594
|
+
};
|
|
570
595
|
|
|
571
|
-
|
|
572
|
-
|
|
596
|
+
this.parameters.updateIsLoadingModalVisible(true);
|
|
597
|
+
|
|
598
|
+
if (this.localLink) {
|
|
599
|
+
const secureCode =
|
|
600
|
+
Math.random().toString(30).substring(2, 14) +
|
|
601
|
+
Math.random().toString(30).substring(2, 14);
|
|
602
|
+
let eventID =
|
|
603
|
+
new Date().getTime().toString(30) +
|
|
604
|
+
new Date().getUTCMilliseconds() +
|
|
605
|
+
Math.floor(10 + Math.random() * 99).toString();
|
|
606
|
+
eventID = 'm' + eventID;
|
|
607
|
+
const eventRoomParams = this.localData?.meetingRoomParams_;
|
|
608
|
+
eventRoomParams!.type = eventType as 'chat' | 'broadcast' | 'webinar' | 'conference';
|
|
609
|
+
|
|
610
|
+
const createData: CreateLocalRoomParameters = {
|
|
611
|
+
eventID: eventID,
|
|
612
|
+
duration: parseInt(duration, 10),
|
|
613
|
+
capacity: parseInt(capacity, 10),
|
|
614
|
+
userName: name,
|
|
615
|
+
scheduledDate: new Date(),
|
|
616
|
+
secureCode: secureCode,
|
|
617
|
+
waitRoom: false,
|
|
618
|
+
recordingParams: this.localData?.recordingParams_,
|
|
619
|
+
eventRoomParams: eventRoomParams,
|
|
620
|
+
videoPreference: null,
|
|
621
|
+
audioPreference: null,
|
|
622
|
+
audioOutputPreference: null,
|
|
623
|
+
mediasfuURL: '',
|
|
624
|
+
};
|
|
573
625
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
626
|
+
if (
|
|
627
|
+
this.connectMediaSFU &&
|
|
628
|
+
this.initSocket &&
|
|
629
|
+
this.localData &&
|
|
630
|
+
this.localData.apiUserName &&
|
|
631
|
+
this.localData.apiKey
|
|
632
|
+
) {
|
|
633
|
+
payload.recordOnly = true; // allow production to MediaSFU only; no consumption
|
|
634
|
+
const response = await this.roomCreator({
|
|
635
|
+
payload,
|
|
636
|
+
apiUserName: this.localData.apiUserName,
|
|
637
|
+
apiKey: this.localData.apiKey,
|
|
638
|
+
validate: false,
|
|
579
639
|
});
|
|
580
640
|
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
if (socket && socket instanceof Socket && socket.id) {
|
|
588
|
-
unsuccessfulAttempts = 0;
|
|
589
|
-
this.cookieService.set('unsuccessfulAttempts', unsuccessfulAttempts.toString());
|
|
590
|
-
this.cookieService.set('lastRequestTimestamp', Date.now().toString());
|
|
591
|
-
this.parameters.updateSocket(socket);
|
|
592
|
-
this.parameters.updateApiUserName(apiUserName);
|
|
593
|
-
this.parameters.updateApiToken(apiToken);
|
|
594
|
-
this.parameters.updateLink(link);
|
|
595
|
-
this.parameters.updateRoomName(apiUserName);
|
|
596
|
-
this.parameters.updateMember(userName);
|
|
597
|
-
this.parameters.updateValidated(true);
|
|
641
|
+
if (response && response.success && response.data && 'roomName' in response.data) {
|
|
642
|
+
createData.eventID = response.data.roomName;
|
|
643
|
+
createData.secureCode = response.data.secret;
|
|
644
|
+
createData.mediasfuURL = response.data.publicURL;
|
|
645
|
+
await this.createLocalRoom({ createData: createData, link: response.data.link });
|
|
598
646
|
} else {
|
|
599
|
-
unsuccessfulAttempts += 1;
|
|
600
|
-
this.cookieService.set('unsuccessfulAttempts', unsuccessfulAttempts.toString());
|
|
601
|
-
this.cookieService.set('lastRequestTimestamp', Date.now().toString());
|
|
602
647
|
this.parameters.updateIsLoadingModalVisible(false);
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
this.parameters.
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
}
|
|
610
|
-
} else {
|
|
611
|
-
this.parameters.showAlert?.({
|
|
612
|
-
message: 'Invalid credentials.',
|
|
613
|
-
type: 'danger',
|
|
614
|
-
duration: 3000,
|
|
615
|
-
});
|
|
648
|
+
this.error = 'Unable to create room on MediaSFU.';
|
|
649
|
+
try {
|
|
650
|
+
this.parameters.updateSocket(this.initSocket!);
|
|
651
|
+
await this.createLocalRoom({ createData: createData });
|
|
652
|
+
} catch (error: any) {
|
|
653
|
+
this.parameters.updateIsLoadingModalVisible(false);
|
|
654
|
+
this.error = `Unable to create room. ${error}`;
|
|
616
655
|
}
|
|
617
656
|
}
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
this.cookieService.set('unsuccessfulAttempts', unsuccessfulAttempts.toString());
|
|
627
|
-
this.cookieService.set('lastRequestTimestamp', Date.now().toString());
|
|
628
|
-
this.parameters.updateIsLoadingModalVisible(false);
|
|
657
|
+
} else {
|
|
658
|
+
try {
|
|
659
|
+
this.parameters.updateSocket(this.initSocket!);
|
|
660
|
+
await this.createLocalRoom({ createData: createData });
|
|
661
|
+
} catch (error: any) {
|
|
662
|
+
this.parameters.updateIsLoadingModalVisible(false);
|
|
663
|
+
this.error = `Unable to create room. ${error}`;
|
|
664
|
+
}
|
|
629
665
|
}
|
|
666
|
+
} else {
|
|
667
|
+
await this.roomCreator({
|
|
668
|
+
payload,
|
|
669
|
+
apiUserName: this.credentials.apiUserName,
|
|
670
|
+
apiKey: this.credentials.apiKey,
|
|
671
|
+
validate: true,
|
|
672
|
+
});
|
|
630
673
|
}
|
|
674
|
+
}
|
|
631
675
|
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
}
|
|
637
|
-
payload: any;
|
|
638
|
-
apiUserName: string;
|
|
639
|
-
apiKey: string;
|
|
640
|
-
}): Promise<{ data: CreateJoinRoomResponse | CreateJoinRoomError | null; success: boolean }> {
|
|
641
|
-
try {
|
|
642
|
-
if (
|
|
643
|
-
!apiUserName ||
|
|
644
|
-
!apiKey ||
|
|
645
|
-
apiUserName === 'yourAPIUSERNAME' ||
|
|
646
|
-
apiKey === 'yourAPIKEY' ||
|
|
647
|
-
apiKey.length !== 64 ||
|
|
648
|
-
apiUserName.length < 6
|
|
649
|
-
) {
|
|
650
|
-
return { data: { error: 'Invalid credentials' }, success: false };
|
|
651
|
-
}
|
|
676
|
+
async handleJoinRoom(): Promise<void> {
|
|
677
|
+
if (this.preJoinForm.invalid) {
|
|
678
|
+
this.error = 'Please fill all the fields.';
|
|
679
|
+
return;
|
|
680
|
+
}
|
|
652
681
|
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
}),
|
|
659
|
-
})
|
|
660
|
-
.toPromise();
|
|
661
|
-
|
|
662
|
-
return { data: response, success: true };
|
|
663
|
-
} catch (error) {
|
|
664
|
-
const errorMessage = (error as any).reason ? (error as any).reason : 'unknown error';
|
|
665
|
-
return {
|
|
666
|
-
data: { error: `Unable to create room; something went wrong ${errorMessage}` },
|
|
667
|
-
success: false,
|
|
668
|
-
};
|
|
669
|
-
}
|
|
682
|
+
const { name, eventID } = this.preJoinForm.value;
|
|
683
|
+
|
|
684
|
+
if (!name || !eventID) {
|
|
685
|
+
this.error = 'Please fill all the fields.';
|
|
686
|
+
return;
|
|
670
687
|
}
|
|
671
688
|
|
|
672
|
-
|
|
689
|
+
const payload = {
|
|
690
|
+
action: 'join',
|
|
691
|
+
meetingID: eventID,
|
|
692
|
+
userName: name,
|
|
693
|
+
};
|
|
694
|
+
|
|
695
|
+
if (this.localLink && !this.localLink.includes('mediasfu.com')) {
|
|
696
|
+
const joinData = {
|
|
697
|
+
eventID: eventID,
|
|
698
|
+
userName: name,
|
|
699
|
+
secureCode: '',
|
|
700
|
+
videoPreference: null,
|
|
701
|
+
audioPreference: null,
|
|
702
|
+
audioOutputPreference: null,
|
|
703
|
+
};
|
|
704
|
+
|
|
705
|
+
await this.joinLocalRoom({ joinData: joinData });
|
|
706
|
+
return;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
this.parameters.updateIsLoadingModalVisible(true);
|
|
710
|
+
try {
|
|
711
|
+
const response = await this.joinRoomService.joinRoomOnMediaSFU({
|
|
673
712
|
payload,
|
|
674
|
-
apiUserName,
|
|
675
|
-
apiKey,
|
|
676
|
-
}
|
|
677
|
-
payload: any;
|
|
678
|
-
apiUserName: string;
|
|
679
|
-
apiKey: string;
|
|
680
|
-
}): Promise<{ data: CreateJoinRoomResponse | CreateJoinRoomError | null; success: boolean }> {
|
|
681
|
-
try {
|
|
682
|
-
if (
|
|
683
|
-
!apiUserName ||
|
|
684
|
-
!apiKey ||
|
|
685
|
-
apiUserName === 'yourAPIUSERNAME' ||
|
|
686
|
-
apiKey === 'yourAPIKEY' ||
|
|
687
|
-
apiKey.length !== 64 ||
|
|
688
|
-
apiUserName.length < 6
|
|
689
|
-
) {
|
|
690
|
-
return { data: { error: 'Invalid credentials' }, success: false };
|
|
691
|
-
}
|
|
713
|
+
apiUserName: this.credentials.apiUserName,
|
|
714
|
+
apiKey: this.credentials.apiKey,
|
|
715
|
+
});
|
|
692
716
|
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
};
|
|
709
|
-
}
|
|
717
|
+
if (response.success && response.data && 'roomName' in response.data) {
|
|
718
|
+
await this.checkLimitsService.checkLimitsAndMakeRequest({
|
|
719
|
+
apiUserName: response.data.roomName,
|
|
720
|
+
apiToken: response.data.secret,
|
|
721
|
+
link: response.data.link,
|
|
722
|
+
userName: name,
|
|
723
|
+
parameters: this.parameters,
|
|
724
|
+
validate: true,
|
|
725
|
+
});
|
|
726
|
+
this.error = '';
|
|
727
|
+
} else {
|
|
728
|
+
this.parameters.updateIsLoadingModalVisible(false);
|
|
729
|
+
this.error = `Unable to connect to room. ${
|
|
730
|
+
response.data ? ('error' in response.data ? response.data.error : '') : ''
|
|
731
|
+
}`;
|
|
710
732
|
}
|
|
733
|
+
} catch (error) {
|
|
734
|
+
this.parameters.updateIsLoadingModalVisible(false);
|
|
735
|
+
this.error = `Unable to connect. ${(error as any).message}`;
|
|
711
736
|
}
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
|
|
712
740
|
```
|
|
713
741
|
|
|
714
742
|
### IP Blockage Warning And Local UI Development
|
|
715
743
|
|
|
744
|
+
**Note:** Local UI Development Mode is deprecated. Rather use your own Community Edition (CE) server for UI development and testing. You can later switch to MediaSFU Cloud for production. Nothing changes in the codebase, and you can use the same code for both environments.
|
|
745
|
+
|
|
716
746
|
Entering the event room without the correct credentials may result in IP blockage, as the page automatically attempts to connect with MediaSFU servers, which rate limit bad requests based on IP address.
|
|
717
747
|
|
|
718
748
|
If users attempt to enter the event room without valid credentials or tokens, it may lead to IP blockage due to MediaSFU servers' rate limiting mechanism. To avoid unintentional connections to MediaSFU servers during UI development, users can pass the `useLocalUIMode` parameter as `true`.
|
|
@@ -843,211 +873,130 @@ import {
|
|
|
843
873
|
} from 'mediasfu-angular';
|
|
844
874
|
|
|
845
875
|
|
|
876
|
+
/**
|
|
877
|
+
* The main application component for MediaSFU.
|
|
878
|
+
*
|
|
879
|
+
* This component initializes the necessary configuration and credentials for the MediaSFU application.
|
|
880
|
+
* Users can specify their own Community Edition (CE) server, utilize MediaSFU Cloud by default, or enable MediaSFU Cloud for egress features.
|
|
881
|
+
*
|
|
882
|
+
* @remarks
|
|
883
|
+
* - **Using Your Own Community Edition (CE) Server**: Set the `localLink` to point to your CE server.
|
|
884
|
+
* - **Using MediaSFU Cloud by Default**: If not using a custom server (`localLink` is empty), the application connects to MediaSFU Cloud.
|
|
885
|
+
* - **MediaSFU Cloud Egress Features**: To enable cloud recording, capturing, and returning real-time images and audio buffers,
|
|
886
|
+
* set `connectMediaSFU` to `true` in addition to specifying your `localLink`.
|
|
887
|
+
* - **Credentials Requirement**: If not using your own server, provide `apiUserName` and `apiKey`. The same applies when using MediaSFU Cloud for egress.
|
|
888
|
+
* - **Deprecated Feature**: `useLocalUIMode` is deprecated due to updates for strong typing and improved configuration options.
|
|
889
|
+
*
|
|
890
|
+
* @component
|
|
891
|
+
* @example
|
|
892
|
+
* ```typescript
|
|
893
|
+
* // Example usage of the AppComponent
|
|
894
|
+
* @NgModule({
|
|
895
|
+
* declarations: [AppComponent],
|
|
896
|
+
* imports: [BrowserModule, MediasfuWebinar],
|
|
897
|
+
* bootstrap: [AppComponent]
|
|
898
|
+
* })
|
|
899
|
+
* export class AppModule { }
|
|
900
|
+
* ```
|
|
901
|
+
*/
|
|
846
902
|
@Component({
|
|
847
903
|
selector: 'app-root',
|
|
848
|
-
|
|
849
|
-
imports: [
|
|
850
|
-
MediasfuGeneric,
|
|
851
|
-
MediasfuBroadcast,
|
|
852
|
-
MediasfuChat,
|
|
853
|
-
MediasfuWebinar,
|
|
854
|
-
MediasfuConference,
|
|
855
|
-
PreJoinPage,
|
|
856
|
-
],
|
|
904
|
+
imports: [MediasfuWebinar],
|
|
857
905
|
template: `
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
2. Use Case with Pre-Join Page (Credentials Required)
|
|
874
|
-
- Uses a pre-join page that requires users to enter credentials.
|
|
875
|
-
- Provide your Mediasfu API username and key in the 'credentials' object.
|
|
876
|
-
|
|
877
|
-
<app-mediasfu-generic
|
|
878
|
-
[PrejoinPage]="PreJoinPage"
|
|
879
|
-
[credentials]="credentials"
|
|
880
|
-
></app-mediasfu-generic>
|
|
881
|
-
|
|
882
|
-
-------------------------------------------------
|
|
883
|
-
|
|
884
|
-
3. Use Case with Local UI Mode (Seed Data Required)
|
|
885
|
-
- Runs the application in local UI mode using seed data.
|
|
886
|
-
- Set 'useSeed' to true and provide seed data in 'seedData'.
|
|
887
|
-
|
|
888
|
-
<app-mediasfu-generic
|
|
889
|
-
[useLocalUIMode]="true"
|
|
890
|
-
[useSeed]="true"
|
|
891
|
-
[seedData]="seedData"
|
|
892
|
-
></app-mediasfu-generic>
|
|
893
|
-
|
|
894
|
-
-------------------------------------------------
|
|
895
|
-
|
|
896
|
-
4. Use Specific Event Type Components
|
|
897
|
-
- Uncomment the component corresponding to the event type you want to use.
|
|
898
|
-
- Options are 'broadcast', 'chat', 'webinar', 'conference'.
|
|
899
|
-
- Remember to set the 'eventType' property in the class.
|
|
900
|
-
|
|
901
|
-
Example for 'broadcast':
|
|
902
|
-
|
|
903
|
-
<app-mediasfu-broadcast
|
|
904
|
-
[credentials]="credentials"
|
|
905
|
-
[useLocalUIMode]="useLocalUIMode"
|
|
906
|
-
[useSeed]="useSeed"
|
|
907
|
-
[seedData]="useSeed ? seedData : {}"
|
|
908
|
-
></app-mediasfu-broadcast>
|
|
909
|
-
|
|
910
|
-
-->
|
|
911
|
-
|
|
912
|
-
<!-- Uncomment one of the options below to run the corresponding use case -->
|
|
913
|
-
|
|
914
|
-
<!-- Simple Use Case (Welcome Page) -->
|
|
915
|
-
<!--
|
|
916
|
-
<app-mediasfu-generic></app-mediasfu-generic>
|
|
917
|
-
-->
|
|
918
|
-
|
|
919
|
-
<!-- Use Case with Pre-Join Page (Credentials Required) -->
|
|
920
|
-
<!--
|
|
921
|
-
<app-mediasfu-generic
|
|
922
|
-
[PrejoinPage]="PreJoinPage"
|
|
923
|
-
[credentials]="credentials"
|
|
924
|
-
></app-mediasfu-generic>
|
|
925
|
-
-->
|
|
926
|
-
|
|
927
|
-
<!-- Use Case with Local UI Mode (Seed Data Required) -->
|
|
928
|
-
<!--
|
|
929
|
-
<app-mediasfu-generic
|
|
930
|
-
[useLocalUIMode]="true"
|
|
931
|
-
[useSeed]="true"
|
|
932
|
-
[seedData]="seedData"
|
|
933
|
-
></app-mediasfu-generic>
|
|
934
|
-
-->
|
|
935
|
-
|
|
936
|
-
<!-- MediasfuBroadcast Component -->
|
|
937
|
-
<!-- Uncomment to use the broadcast event type -->
|
|
938
|
-
<!--
|
|
939
|
-
<app-mediasfu-broadcast
|
|
940
|
-
[credentials]="credentials"
|
|
941
|
-
[useLocalUIMode]="useLocalUIMode"
|
|
942
|
-
[useSeed]="useSeed"
|
|
943
|
-
[seedData]="useSeed ? seedData : {}"
|
|
944
|
-
></app-mediasfu-broadcast>
|
|
945
|
-
-->
|
|
946
|
-
|
|
947
|
-
<!-- MediasfuChat Component -->
|
|
948
|
-
<!-- Uncomment to use the chat event type -->
|
|
949
|
-
<!--
|
|
950
|
-
<app-mediasfu-chat
|
|
951
|
-
[credentials]="credentials"
|
|
952
|
-
[useLocalUIMode]="useLocalUIMode"
|
|
953
|
-
[useSeed]="useSeed"
|
|
954
|
-
[seedData]="useSeed ? seedData : {}"
|
|
955
|
-
></app-mediasfu-chat>
|
|
956
|
-
-->
|
|
957
|
-
|
|
958
|
-
<!-- MediasfuWebinar Component -->
|
|
959
|
-
<!-- Uncomment to use the webinar event type -->
|
|
960
|
-
<!--
|
|
961
|
-
<app-mediasfu-webinar
|
|
962
|
-
[credentials]="credentials"
|
|
963
|
-
[useLocalUIMode]="useLocalUIMode"
|
|
964
|
-
[useSeed]="useSeed"
|
|
965
|
-
[seedData]="useSeed ? seedData : {}"
|
|
966
|
-
></app-mediasfu-webinar>
|
|
967
|
-
-->
|
|
968
|
-
|
|
969
|
-
<!-- MediasfuConference Component -->
|
|
970
|
-
<!-- Uncomment to use the conference event type -->
|
|
971
|
-
<!--
|
|
972
|
-
<app-mediasfu-conference
|
|
973
|
-
[credentials]="credentials"
|
|
974
|
-
[useLocalUIMode]="useLocalUIMode"
|
|
975
|
-
[useSeed]="useSeed"
|
|
976
|
-
[seedData]="useSeed ? seedData : {}"
|
|
977
|
-
></app-mediasfu-conference>
|
|
978
|
-
-->
|
|
979
|
-
`
|
|
906
|
+
<app-mediasfu-webinar
|
|
907
|
+
[credentials]="credentials"
|
|
908
|
+
[localLink]="localLink"
|
|
909
|
+
[connectMediaSFU]="connectMediaSFU"
|
|
910
|
+
[PrejoinPage]="PreJoinPage"
|
|
911
|
+
[seedData]="seedData">
|
|
912
|
+
</app-mediasfu-webinar>
|
|
913
|
+
`,
|
|
914
|
+
providers: [
|
|
915
|
+
GenerateRandomParticipants,
|
|
916
|
+
GenerateRandomMessages,
|
|
917
|
+
GenerateRandomRequestList,
|
|
918
|
+
GenerateRandomWaitingRoomList
|
|
919
|
+
],
|
|
980
920
|
})
|
|
981
921
|
export class AppComponent implements OnInit {
|
|
982
|
-
//
|
|
983
|
-
|
|
922
|
+
// ========================
|
|
923
|
+
// ====== CONFIGURATION ======
|
|
924
|
+
// ========================
|
|
984
925
|
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
926
|
+
/**
|
|
927
|
+
* Mediasfu account credentials.
|
|
928
|
+
* Replace 'your_api_username' and 'your_api_key' with your actual credentials.
|
|
929
|
+
* Not needed if using a custom server without MediaSFU Cloud Egress features.
|
|
930
|
+
*/
|
|
988
931
|
credentials = {
|
|
989
932
|
apiUserName: 'your_api_username',
|
|
990
933
|
apiKey: 'your_api_key',
|
|
991
934
|
};
|
|
992
935
|
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
// Event type ('broadcast', 'chat', 'webinar', 'conference')
|
|
999
|
-
// Set this to match the component you are using
|
|
1000
|
-
eventType: string = 'broadcast';
|
|
936
|
+
/**
|
|
937
|
+
* Specify your Community Edition (CE) server link.
|
|
938
|
+
* Leave as an empty string if not using a custom server.
|
|
939
|
+
*/
|
|
940
|
+
localLink = 'http://localhost:3000'; // Set to '' if not using your own server
|
|
1001
941
|
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
942
|
+
/**
|
|
943
|
+
* Automatically set `connectMediaSFU` to `true` if `localLink` is provided,
|
|
944
|
+
* indicating the use of MediaSFU Cloud by default.
|
|
945
|
+
*
|
|
946
|
+
* - If `localLink` is not empty, MediaSFU Cloud will be used for additional features.
|
|
947
|
+
* - If `localLink` is empty, the application will connect to MediaSFU Cloud by default.
|
|
948
|
+
*/
|
|
949
|
+
connectMediaSFU = this.localLink.trim() !== ''; // set to false if not using MediaSFU Cloud for Main Server or Egress
|
|
950
|
+
|
|
951
|
+
// ========================
|
|
952
|
+
// ====== USE CASES ======
|
|
953
|
+
// ========================
|
|
954
|
+
|
|
955
|
+
// Deprecated Feature: useLocalUIMode
|
|
956
|
+
// This feature is deprecated due to updates for strong typing.
|
|
957
|
+
// It is no longer required and should not be used in new implementations.
|
|
1005
958
|
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
959
|
+
/**
|
|
960
|
+
* Uncomment and configure the following section if you intend to use seed data
|
|
961
|
+
* for generating random participants and messages.
|
|
962
|
+
*
|
|
963
|
+
* Note: This is deprecated and maintained only for legacy purposes.
|
|
964
|
+
*/
|
|
965
|
+
/*
|
|
966
|
+
useSeed = false;
|
|
967
|
+
seedData: any = {};
|
|
1013
968
|
|
|
1014
969
|
ngOnInit(): void {
|
|
1015
|
-
// If using seed data, generate random participants and messages
|
|
1016
970
|
if (this.useSeed) {
|
|
1017
|
-
const memberName = '
|
|
971
|
+
const memberName = 'Alice';
|
|
1018
972
|
const hostName = 'Fred';
|
|
1019
973
|
|
|
1020
974
|
// Generate random participants
|
|
1021
|
-
const participants_ =
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
this.eventType === 'broadcast' || this.eventType === 'chat',
|
|
1028
|
-
});
|
|
975
|
+
const participants_ = this.generateRandomParticipants.generateRandomParticipants({
|
|
976
|
+
member: memberName,
|
|
977
|
+
coHost: '',
|
|
978
|
+
host: hostName,
|
|
979
|
+
forChatBroadcast: this.eventType === 'broadcast' || this.eventType === 'chat',
|
|
980
|
+
});
|
|
1029
981
|
|
|
1030
982
|
// Generate random messages
|
|
1031
983
|
const messages_ = this.generateRandomMessages.generateRandomMessages({
|
|
1032
984
|
participants: participants_,
|
|
1033
985
|
member: memberName,
|
|
1034
986
|
host: hostName,
|
|
1035
|
-
forChatBroadcast:
|
|
1036
|
-
this.eventType === 'broadcast' || this.eventType === 'chat',
|
|
987
|
+
forChatBroadcast: this.eventType === 'broadcast' || this.eventType === 'chat',
|
|
1037
988
|
});
|
|
1038
989
|
|
|
1039
990
|
// Generate random request list
|
|
1040
|
-
const requests_ =
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
});
|
|
991
|
+
const requests_ = this.generateRandomRequestList.generateRandomRequestList({
|
|
992
|
+
participants: participants_,
|
|
993
|
+
hostName: memberName,
|
|
994
|
+
coHostName: '',
|
|
995
|
+
numberOfRequests: 3,
|
|
996
|
+
});
|
|
1047
997
|
|
|
1048
998
|
// Generate random waiting room list
|
|
1049
|
-
const waitingList_ =
|
|
1050
|
-
this.generateRandomWaitingRoomList.generateRandomWaitingRoomList();
|
|
999
|
+
const waitingList_ = this.generateRandomWaitingRoomList.generateRandomWaitingRoomList();
|
|
1051
1000
|
|
|
1052
1001
|
// Assign generated data to seedData
|
|
1053
1002
|
this.seedData = {
|
|
@@ -1064,14 +1013,164 @@ export class AppComponent implements OnInit {
|
|
|
1064
1013
|
// Determine whether to use local UI mode
|
|
1065
1014
|
this.useLocalUIMode = this.useSeed;
|
|
1066
1015
|
}
|
|
1016
|
+
*/
|
|
1017
|
+
|
|
1018
|
+
// ========================
|
|
1019
|
+
// ====== COMPONENT SELECTION ======
|
|
1020
|
+
// ========================
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* Choose the Mediasfu component based on the event type and use case.
|
|
1024
|
+
* Uncomment the component corresponding to your specific use case.
|
|
1025
|
+
*/
|
|
1026
|
+
|
|
1027
|
+
// ------------------------
|
|
1028
|
+
// ====== SIMPLE USE CASE ======
|
|
1029
|
+
// ------------------------
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* **Simple Use Case (Welcome Page)**
|
|
1033
|
+
*
|
|
1034
|
+
* Renders the default welcome page.
|
|
1035
|
+
* No additional inputs required.
|
|
1036
|
+
*/
|
|
1037
|
+
// return <MediasfuWebinar />;
|
|
1038
|
+
|
|
1039
|
+
// ------------------------
|
|
1040
|
+
// ====== PRE-JOIN USE CASE ======
|
|
1041
|
+
// ------------------------
|
|
1042
|
+
|
|
1043
|
+
/**
|
|
1044
|
+
* **Use Case with Pre-Join Page (Credentials Required)**
|
|
1045
|
+
*
|
|
1046
|
+
* Uses a pre-join page that requires users to enter credentials.
|
|
1047
|
+
*/
|
|
1048
|
+
// return <MediasfuWebinar PrejoinPage={PreJoinPage} credentials={credentials} />;
|
|
1049
|
+
|
|
1050
|
+
// ------------------------
|
|
1051
|
+
// ====== SEED DATA USE CASE ======
|
|
1052
|
+
// ------------------------
|
|
1053
|
+
|
|
1054
|
+
/**
|
|
1055
|
+
* **Use Case with Seed Data (Deprecated)**
|
|
1056
|
+
*
|
|
1057
|
+
* Runs the application using seed data.
|
|
1058
|
+
*
|
|
1059
|
+
* @deprecated Due to updates for strong typing, this feature is deprecated.
|
|
1060
|
+
*/
|
|
1061
|
+
// return <MediasfuWebinar useSeed={useSeed} seedData={useSeed ? seedData : {}} />;
|
|
1062
|
+
|
|
1063
|
+
// ------------------------
|
|
1064
|
+
// ====== WEBINAR EVENT TYPE ======
|
|
1065
|
+
// ------------------------
|
|
1066
|
+
|
|
1067
|
+
/**
|
|
1068
|
+
* **MediasfuWebinar Component**
|
|
1069
|
+
*
|
|
1070
|
+
* Uncomment to use the webinar event type.
|
|
1071
|
+
*/
|
|
1072
|
+
/*
|
|
1073
|
+
return (
|
|
1074
|
+
<MediasfuWebinar
|
|
1075
|
+
credentials={credentials}
|
|
1076
|
+
localLink={localLink}
|
|
1077
|
+
connectMediaSFU={connectMediaSFU}
|
|
1078
|
+
// seedData={useSeed ? seedData : {}}
|
|
1079
|
+
/>
|
|
1080
|
+
);
|
|
1081
|
+
*/
|
|
1082
|
+
|
|
1083
|
+
// ========================
|
|
1084
|
+
// ====== DEFAULT COMPONENT ======
|
|
1085
|
+
// ========================
|
|
1086
|
+
|
|
1087
|
+
/**
|
|
1088
|
+
* **Default to MediasfuWebinar with Updated Configuration**
|
|
1089
|
+
*
|
|
1090
|
+
* Renders the MediasfuWebinar component with specified server and cloud connection settings.
|
|
1091
|
+
* This is the default use case if no specific event type is selected.
|
|
1092
|
+
*/
|
|
1093
|
+
seedData: any = {}; // Initialize seedData as empty object
|
|
1094
|
+
|
|
1095
|
+
// Reference to the PreJoinPage component
|
|
1096
|
+
PreJoinPage = PreJoinPage;
|
|
1097
|
+
|
|
1098
|
+
constructor(
|
|
1099
|
+
private generateRandomParticipants: GenerateRandomParticipants,
|
|
1100
|
+
private generateRandomMessages: GenerateRandomMessages,
|
|
1101
|
+
private generateRandomRequestList: GenerateRandomRequestList,
|
|
1102
|
+
private generateRandomWaitingRoomList: GenerateRandomWaitingRoomList
|
|
1103
|
+
) { }
|
|
1104
|
+
|
|
1105
|
+
// Deprecated Feature: useSeed and seedData for generating random participants and messages
|
|
1106
|
+
// Uncomment and configure the following section if you intend to use seed data
|
|
1107
|
+
|
|
1108
|
+
// useSeed = false;
|
|
1109
|
+
// eventType = 'webinar';
|
|
1110
|
+
// useLocalUIMode = false;
|
|
1111
|
+
|
|
1112
|
+
ngOnInit(): void {
|
|
1113
|
+
// If using seed data, generate random participants and messages - DEPRECATED FEATURE
|
|
1114
|
+
// Note: This feature is deprecated and maintained only for legacy purposes.
|
|
1115
|
+
// Uncomment and configure the following section if you intend to use seed data
|
|
1116
|
+
|
|
1117
|
+
// if (this.useSeed) {
|
|
1118
|
+
// const memberName = 'Alice';
|
|
1119
|
+
// const hostName = 'Fred';
|
|
1120
|
+
|
|
1121
|
+
// // Generate random participants
|
|
1122
|
+
// const participants_ = this.generateRandomParticipants.generateRandomParticipants({
|
|
1123
|
+
// member: memberName,
|
|
1124
|
+
// coHost: '',
|
|
1125
|
+
// host: hostName,
|
|
1126
|
+
// forChatBroadcast: this.eventType === 'broadcast' || this.eventType === 'chat',
|
|
1127
|
+
// });
|
|
1128
|
+
|
|
1129
|
+
// // Generate random messages
|
|
1130
|
+
// const messages_ = this.generateRandomMessages.generateRandomMessages({
|
|
1131
|
+
// participants: participants_,
|
|
1132
|
+
// member: memberName,
|
|
1133
|
+
// host: hostName,
|
|
1134
|
+
// forChatBroadcast: this.eventType === 'broadcast' || this.eventType === 'chat',
|
|
1135
|
+
// });
|
|
1136
|
+
|
|
1137
|
+
// // Generate random request list
|
|
1138
|
+
// const requests_ = this.generateRandomRequestList.generateRandomRequestList({
|
|
1139
|
+
// participants: participants_,
|
|
1140
|
+
// hostName: memberName,
|
|
1141
|
+
// coHostName: '',
|
|
1142
|
+
// numberOfRequests: 3,
|
|
1143
|
+
// });
|
|
1144
|
+
|
|
1145
|
+
// // Generate random waiting room list
|
|
1146
|
+
// const waitingList_ = this.generateRandomWaitingRoomList.generateRandomWaitingRoomList();
|
|
1147
|
+
|
|
1148
|
+
// // Assign generated data to seedData
|
|
1149
|
+
// this.seedData = {
|
|
1150
|
+
// participants: participants_,
|
|
1151
|
+
// messages: messages_,
|
|
1152
|
+
// requests: requests_,
|
|
1153
|
+
// waitingList: waitingList_,
|
|
1154
|
+
// member: memberName,
|
|
1155
|
+
// host: hostName,
|
|
1156
|
+
// eventType: this.eventType,
|
|
1157
|
+
// };
|
|
1158
|
+
// }
|
|
1159
|
+
|
|
1160
|
+
// Determine whether to use local UI mode, deprecated feature
|
|
1161
|
+
// this.useLocalUIMode = this.useSeed;
|
|
1162
|
+
}
|
|
1067
1163
|
}
|
|
1068
1164
|
|
|
1165
|
+
|
|
1069
1166
|
```
|
|
1070
1167
|
|
|
1071
1168
|
In the provided examples, users can set `useLocalUIMode` to `true` during UI development to prevent unwanted connections to MediaSFU servers. Additionally, they can generate seed data for rendering UI components locally by using random data generators provided by the module.
|
|
1072
1169
|
|
|
1073
1170
|
### Local UI Development in MediaSFU Angular Module
|
|
1074
1171
|
|
|
1172
|
+
|
|
1173
|
+
|
|
1075
1174
|
During local UI development, the MediaSFU view is designed to be responsive to changes in screen size and orientation, adapting its layout accordingly. However, since UI changes are typically linked to communication with servers, developing the UI locally might result in less responsiveness due to the lack of real-time data updates. To mitigate this, users can force trigger changes in the UI by rotating the device, resizing the window, or simulating server responses by clicking on buttons within the page.
|
|
1076
1175
|
|
|
1077
1176
|
While developing locally, users may encounter occasional error warnings as the UI attempts to communicate with the server. These warnings can be safely ignored, as they are simply indicative of unsuccessful server requests in the local development environment.
|
|
@@ -1091,111 +1190,112 @@ Expands on the basic usage, covering more advanced features and scenarios.
|
|
|
1091
1190
|
|
|
1092
1191
|
### Intermediate Usage Guide
|
|
1093
1192
|
|
|
1094
|
-
In the Intermediate Usage Guide, we'll explore the core components and functionalities of the MediaSFU Angular module, focusing on media display, controls, and modal interactions.
|
|
1193
|
+
In the Intermediate Usage Guide, we'll explore the core components and functionalities of the MediaSFU Angular module, focusing on media display, controls, and modal interactions. **Click on any listed component/method to open the full documentation.**
|
|
1194
|
+
|
|
1095
1195
|
|
|
1096
1196
|
#### Core Components Overview
|
|
1097
1197
|
|
|
1098
1198
|
The main items displayed on an event page are media components (such as video, audio, and blank cards) and control components (for pagination, navigation, etc.).
|
|
1099
1199
|
|
|
1100
|
-
##### Media Display Components
|
|
1200
|
+
> ##### **Media Display Components**
|
|
1101
1201
|
|
|
1102
1202
|
| Component Name | Description |
|
|
1103
1203
|
|--------------------------|-------------------------------------------------------------------------------------------------|
|
|
1104
|
-
| **
|
|
1105
|
-
| **
|
|
1106
|
-
| **
|
|
1107
|
-
| **
|
|
1108
|
-
| **
|
|
1109
|
-
| **
|
|
1204
|
+
| **[MainAspectComponent](https://www.mediasfu.com/angular/classes/MainAspectComponent)** | Serves as a container for the primary aspect of the user interface, typically containing the main content or focus of the application. |
|
|
1205
|
+
| **[MainScreenComponent](https://www.mediasfu.com/angular/classes/MainScreenComponent)** | Responsible for rendering the main screen layout of the application, providing the foundation for displaying various elements and content. |
|
|
1206
|
+
| **[MainGridComponent](https://www.mediasfu.com/angular/classes/MainGridComponent)** | Crucial part of the user interface, organizing and displaying primary content or elements in a grid layout format. |
|
|
1207
|
+
| **[SubAspectComponent](https://www.mediasfu.com/angular/classes/SubAspectComponent)** | Acts as a secondary container within the user interface, often housing additional elements or controls related to the main aspect. |
|
|
1208
|
+
| **[MainContainerComponent](https://www.mediasfu.com/angular/classes/MainContainerComponent)** | Primary container for the application's content, encapsulating all major components and providing structural organization. |
|
|
1209
|
+
| **[OtherGridComponent](https://www.mediasfu.com/angular/classes/OtherGridComponent)** | Complements the Main Grid Component by offering additional grid layouts, typically used for displaying secondary or auxiliary content. |
|
|
1110
1210
|
|
|
1111
|
-
|
|
1211
|
+
> ##### **Control Components**
|
|
1112
1212
|
|
|
1113
1213
|
| Component Name | Description |
|
|
1114
1214
|
|-------------------------------|-------------------------------------------------------------------------------------------------|
|
|
1115
|
-
| **
|
|
1116
|
-
| **
|
|
1117
|
-
| **
|
|
1215
|
+
| **[ControlButtonsComponent](https://www.mediasfu.com/angular/classes/ControlButtonsComponent)** | Comprises a set of buttons or controls used for navigating, interacting, or managing various aspects of the application's functionality. |
|
|
1216
|
+
| **[ControlButtonsAltComponent](https://www.mediasfu.com/angular/classes/ControlButtonsAltComponent)** | Provides alternative button configurations or styles for controlling different aspects of the application. |
|
|
1217
|
+
| **[ControlButtonsComponentTouch](https://www.mediasfu.com/angular/classes/ControlButtonsComponentTouch)** | Specialized component designed for touch-enabled devices, offering floating buttons or controls for intuitive interaction with the application's features. |
|
|
1218
|
+
|
|
1118
1219
|
|
|
1119
1220
|
These components collectively contribute to the overall user interface, facilitating navigation, interaction, and content display within the application.
|
|
1120
1221
|
|
|
1121
|
-
##### Modal Components
|
|
1222
|
+
> ##### **Modal Components**
|
|
1122
1223
|
|
|
1123
1224
|
| Modal Component | Description |
|
|
1124
1225
|
|-----------------|-------------|
|
|
1125
|
-
| LoadingModal | Modal for displaying loading indicator during data fetching or processing. |
|
|
1126
|
-
| MainAspectComponent | Component responsible for displaying the main aspect of the event page. |
|
|
1127
|
-
| ControlButtonsComponent | Component for displaying control buttons such as pagination controls. |
|
|
1128
|
-
| ControlButtonsAltComponent | Alternate control buttons component for specific use cases. |
|
|
1129
|
-
| ControlButtonsComponentTouch | Touch-enabled control buttons component for mobile devices. |
|
|
1130
|
-
|
|
|
1131
|
-
| MainScreenComponent | Component for rendering the main screen content of the event. |
|
|
1132
|
-
| MainGridComponent | Main grid component for displaying primary event content. |
|
|
1133
|
-
| SubAspectComponent | Component for displaying secondary aspects of the event page. |
|
|
1134
|
-
| MainContainerComponent | Main container component for the event page content. |
|
|
1135
|
-
| AlertComponent | Modal for displaying alert messages to the user. |
|
|
1136
|
-
| MenuModal | Modal for displaying a menu with various options. |
|
|
1137
|
-
| RecordingModal | Modal for managing recording functionality during the event. |
|
|
1138
|
-
| RequestsModal | Modal for handling requests from participants during the event. |
|
|
1139
|
-
| WaitingRoomModal | Modal for managing waiting room functionality during the event. |
|
|
1140
|
-
| DisplaySettingsModal | Modal for adjusting display settings during the event. |
|
|
1141
|
-
| EventSettingsModal | Modal for configuring event settings. |
|
|
1142
|
-
| CoHostModal | Modal for managing co-host functionality during the event. |
|
|
1143
|
-
| ParticipantsModal | Modal for displaying participant information and controls. |
|
|
1144
|
-
| MessagesModal | Modal for managing messages and chat functionality during the event. |
|
|
1145
|
-
| MediaSettingsModal | Modal for adjusting media settings during the event. |
|
|
1146
|
-
| ConfirmExitModal | Modal for confirming exit from the event. |
|
|
1147
|
-
| ConfirmHereModal | Modal for confirming certain actions or selections. |
|
|
1148
|
-
| ShareEventModal | Modal for sharing the event with others. |
|
|
1149
|
-
| WelcomePage | Welcome page modal for the event. |
|
|
1150
|
-
| PreJoinPage | Prejoin page modal for the event. |
|
|
1151
|
-
| PollModal | Modal for conducting polls or surveys during the event. |
|
|
1152
|
-
| BreakoutRoomsModal | Modal for managing breakout rooms during the event. |
|
|
1153
|
-
| ConfigureWhiteboardModal | Modal for configuring whiteboard settings during the event. |
|
|
1154
|
-
| BackgroundModal
|
|
1155
|
-
| ScreenboardModal | Modal for managing screen share annotations during the event. |
|
|
1226
|
+
| **[LoadingModal](https://www.mediasfu.com/angular/classes/LoadingModal)** | Modal for displaying loading indicator during data fetching or processing. |
|
|
1227
|
+
| **[MainAspectComponent](https://www.mediasfu.com/angular/classes/MainAspectComponent)** | Component responsible for displaying the main aspect of the event page. |
|
|
1228
|
+
| **[ControlButtonsComponent](https://www.mediasfu.com/angular/classes/ControlButtonsComponent)** | Component for displaying control buttons such as pagination controls. |
|
|
1229
|
+
| **[ControlButtonsAltComponent](https://www.mediasfu.com/angular/classes/ControlButtonsAltComponent)** | Alternate control buttons component for specific use cases. |
|
|
1230
|
+
| **[ControlButtonsComponentTouch](https://www.mediasfu.com/angular/classes/ControlButtonsComponentTouch)** | Touch-enabled control buttons component for mobile devices. |
|
|
1231
|
+
| **[OtherGridComponent](https://www.mediasfu.com/angular/classes/OtherGridComponent)** | Component for displaying additional grid elements on the event page. |
|
|
1232
|
+
| **[MainScreenComponent](https://www.mediasfu.com/angular/classes/MainScreenComponent)** | Component for rendering the main screen content of the event. |
|
|
1233
|
+
| **[MainGridComponent](https://www.mediasfu.com/angular/classes/MainGridComponent)** | Main grid component for displaying primary event content. |
|
|
1234
|
+
| **[SubAspectComponent](https://www.mediasfu.com/angular/classes/SubAspectComponent)** | Component for displaying secondary aspects of the event page. |
|
|
1235
|
+
| **[MainContainerComponent](https://www.mediasfu.com/angular/classes/MainContainerComponent)** | Main container component for the event page content. |
|
|
1236
|
+
| **[AlertComponent](https://www.mediasfu.com/angular/classes/AlertComponent)** | Modal for displaying alert messages to the user. |
|
|
1237
|
+
| **[MenuModal](https://www.mediasfu.com/angular/classes/MenuModal)** | Modal for displaying a menu with various options. |
|
|
1238
|
+
| **[RecordingModal](https://www.mediasfu.com/angular/classes/RecordingModal)** | Modal for managing recording functionality during the event. |
|
|
1239
|
+
| **[RequestsModal](https://www.mediasfu.com/angular/classes/RequestsModal)** | Modal for handling requests from participants during the event. |
|
|
1240
|
+
| **[WaitingRoomModal](https://www.mediasfu.com/angular/classes/WaitingRoomModal)** | Modal for managing waiting room functionality during the event. |
|
|
1241
|
+
| **[DisplaySettingsModal](https://www.mediasfu.com/angular/classes/DisplaySettingsModal)** | Modal for adjusting display settings during the event. |
|
|
1242
|
+
| **[EventSettingsModal](https://www.mediasfu.com/angular/classes/EventSettingsModal)** | Modal for configuring event settings. |
|
|
1243
|
+
| **[CoHostModal](https://www.mediasfu.com/angular/classes/CoHostModal)** | Modal for managing co-host functionality during the event. |
|
|
1244
|
+
| **[ParticipantsModal](https://www.mediasfu.com/angular/classes/ParticipantsModal)** | Modal for displaying participant information and controls. |
|
|
1245
|
+
| **[MessagesModal](https://www.mediasfu.com/angular/classes/MessagesModal)** | Modal for managing messages and chat functionality during the event. |
|
|
1246
|
+
| **[MediaSettingsModal](https://www.mediasfu.com/angular/classes/MediaSettingsModal)** | Modal for adjusting media settings during the event. |
|
|
1247
|
+
| **[ConfirmExitModal](https://www.mediasfu.com/angular/classes/ConfirmExitModal)** | Modal for confirming exit from the event. |
|
|
1248
|
+
| **[ConfirmHereModal](https://www.mediasfu.com/angular/classes/ConfirmHereModal)** | Modal for confirming certain actions or selections. |
|
|
1249
|
+
| **[ShareEventModal](https://www.mediasfu.com/angular/classes/ShareEventModal)** | Modal for sharing the event with others. |
|
|
1250
|
+
| **[WelcomePage](https://www.mediasfu.com/angular/classes/WelcomePage)** | Welcome page modal for the event. |
|
|
1251
|
+
| **[PreJoinPage](https://www.mediasfu.com/angular/classes/PreJoinPage)** | Prejoin page modal for the event. |
|
|
1252
|
+
| **[PollModal](https://www.mediasfu.com/angular/classes/PollModal)** | Modal for conducting polls or surveys during the event. |
|
|
1253
|
+
| **[BreakoutRoomsModal](https://www.mediasfu.com/angular/classes/BreakoutRoomsModal)** | Modal for managing breakout rooms during the event. |
|
|
1254
|
+
| **[ConfigureWhiteboardModal](https://www.mediasfu.com/angular/classes/ConfigureWhiteboardModal)** | Modal for configuring whiteboard settings during the event. |
|
|
1255
|
+
| **[BackgroundModal](https://www.mediasfu.com/angular/classes/BackgroundModal)** | Modal for managing background settings during the event. |
|
|
1256
|
+
| **[ScreenboardModal](https://www.mediasfu.com/angular/classes/ScreenboardModal)** | Modal for managing screen share annotations during the event. |
|
|
1156
1257
|
|
|
1157
1258
|
#### Modal Interactions
|
|
1158
1259
|
|
|
1159
1260
|
Each modal has corresponding functions to trigger its usage:
|
|
1160
1261
|
|
|
1161
|
-
1. `launchMenuModal
|
|
1162
|
-
2. `launchRecording
|
|
1163
|
-
3. `startRecording
|
|
1164
|
-
4. `confirmRecording
|
|
1165
|
-
5. `launchWaiting
|
|
1166
|
-
6. `launchCoHost
|
|
1167
|
-
7. `launchMediaSettings
|
|
1168
|
-
8. `launchDisplaySettings
|
|
1169
|
-
9. `launchSettings
|
|
1170
|
-
10. `launchRequests
|
|
1171
|
-
11. `launchParticipants
|
|
1172
|
-
12. `launchMessages
|
|
1173
|
-
13. `launchConfirmExit
|
|
1262
|
+
1. [`launchMenuModal`](https://www.mediasfu.com/angular/classes/launchMenuModal): Launches the menu modal for settings and configurations.
|
|
1263
|
+
2. [`launchRecording`](https://www.mediasfu.com/angular/classes/launchRecording): Initiates the recording modal for recording functionalities.
|
|
1264
|
+
3. [`startRecording`](https://www.mediasfu.com/angular/classes/startRecording): Starts the recording process.
|
|
1265
|
+
4. [`confirmRecording`](https://www.mediasfu.com/angular/classes/confirmRecording): Confirms and finalizes the recording.
|
|
1266
|
+
5. [`launchWaiting`](https://www.mediasfu.com/angular/classes/launchWaiting): Opens the waiting room modal for managing waiting room interactions.
|
|
1267
|
+
6. [`launchCoHost`](https://www.mediasfu.com/angular/classes/launchCoHost): Opens the co-host modal for managing co-host functionalities.
|
|
1268
|
+
7. [`launchMediaSettings`](https://www.mediasfu.com/angular/classes/launchMediaSettings): Launches the media settings modal for adjusting media-related configurations.
|
|
1269
|
+
8. [`launchDisplaySettings`](https://www.mediasfu.com/angular/classes/launchDisplaySettings): Opens the display settings modal for adjusting display configurations.
|
|
1270
|
+
9. [`launchSettings`](https://www.mediasfu.com/angular/classes/launchSettings): Initiates the settings modal for general event settings and configurations.
|
|
1271
|
+
10. [`launchRequests`](https://www.mediasfu.com/angular/classes/launchRequests): Opens the requests modal for managing user requests.
|
|
1272
|
+
11. [`launchParticipants`](https://www.mediasfu.com/angular/classes/launchParticipants): Displays the participants modal for viewing and managing event participants.
|
|
1273
|
+
12. [`launchMessages`](https://www.mediasfu.com/angular/classes/launchMessages): Opens the messages modal for communication through chat messages.
|
|
1274
|
+
13. [`launchConfirmExit`](https://www.mediasfu.com/angular/classes/launchConfirmExit): Prompts users to confirm before exiting the event.
|
|
1174
1275
|
|
|
1175
1276
|
#### Media Display and Controls
|
|
1176
1277
|
|
|
1177
1278
|
These components facilitate media display and control functionalities:
|
|
1178
1279
|
|
|
1179
|
-
1. **Pagination**: Handles pagination and page switching.
|
|
1180
|
-
2. **FlexibleGrid**: Renders flexible grid layouts for media display.
|
|
1181
|
-
3. **FlexibleVideo**: Displays videos in a flexible manner within the grid.
|
|
1182
|
-
4. **AudioGrid**: Renders audio components within the grid layout.
|
|
1183
|
-
5. **Whiteboard**: Manages whiteboard functionalities for collaborative drawing.
|
|
1184
|
-
6. **Screenboard**: Controls screen share annotations and interactions.
|
|
1280
|
+
1. **[Pagination](https://www.mediasfu.com/angular/classes/Pagination)**: Handles pagination and page switching.
|
|
1281
|
+
2. **[FlexibleGrid](https://www.mediasfu.com/angular/classes/FlexibleGrid)**: Renders flexible grid layouts for media display.
|
|
1282
|
+
3. **[FlexibleVideo](https://www.mediasfu.com/angular/classes/FlexibleVideo)**: Displays videos in a flexible manner within the grid.
|
|
1283
|
+
4. **[AudioGrid](https://www.mediasfu.com/angular/classes/AudioGrid)**: Renders audio components within the grid layout.
|
|
1284
|
+
5. **[Whiteboard](https://www.mediasfu.com/angular/classes/Whiteboard)**: Manages whiteboard functionalities for collaborative drawing.
|
|
1285
|
+
6. **[Screenboard](https://www.mediasfu.com/angular/classes/Screenboard)**: Controls screen share annotations and interactions.
|
|
1185
1286
|
|
|
1186
1287
|
These components enable seamless media presentation and interaction within the event environment, providing users with a rich and immersive experience.
|
|
1187
1288
|
|
|
1188
1289
|
| UI Media Component | Description |
|
|
1189
1290
|
|--------------|-------------|
|
|
1190
|
-
| MeetingProgressTimer | Component for displaying a timer indicating the progress of a meeting or event. |
|
|
1191
|
-
| MiniAudio | Component for rendering a compact audio player with basic controls. |
|
|
1192
|
-
| MiniCard | Component for displaying a minimized card view with essential information. |
|
|
1193
|
-
| AudioCard | Component for displaying audio content with control elements, details, and audio decibels. |
|
|
1194
|
-
| VideoCard | Component for displaying video content with control elements, details, and audio decibels. |
|
|
1195
|
-
| CardVideoDisplay | Video player component for displaying embedded videos with controls and details. |
|
|
1196
|
-
| MiniCardAudio | Component for rendering a compact card view with audio content and controls. |
|
|
1197
|
-
| MiniAudioPlayer | Utility method for playing audio and rendering a mini audio modal when the user is not actively displayed on the page. |
|
|
1198
|
-
|
|
1291
|
+
| **[MeetingProgressTimer](https://www.mediasfu.com/angular/classes/MeetingProgressTimer)** | Component for displaying a timer indicating the progress of a meeting or event. |
|
|
1292
|
+
| **[MiniAudio](https://www.mediasfu.com/angular/classes/MiniAudio)** | Component for rendering a compact audio player with basic controls. |
|
|
1293
|
+
| **[MiniCard](https://www.mediasfu.com/angular/classes/MiniCard)** | Component for displaying a minimized card view with essential information. |
|
|
1294
|
+
| **[AudioCard](https://www.mediasfu.com/angular/classes/AudioCard)** | Component for displaying audio content with control elements, details, and audio decibels. |
|
|
1295
|
+
| **[VideoCard](https://www.mediasfu.com/angular/classes/VideoCard)** | Component for displaying video content with control elements, details, and audio decibels. |
|
|
1296
|
+
| **[CardVideoDisplay](https://www.mediasfu.com/angular/classes/CardVideoDisplay)** | Video player component for displaying embedded videos with controls and details. |
|
|
1297
|
+
| **[MiniCardAudio](https://www.mediasfu.com/angular/classes/MiniCardAudio)** | Component for rendering a compact card view with audio content and controls. |
|
|
1298
|
+
| **[MiniAudioPlayer](https://www.mediasfu.com/angular/classes/MiniAudioPlayer)** | Utility method for playing audio and rendering a mini audio modal when the user is not actively displayed on the page. |
|
|
1199
1299
|
|
|
1200
1300
|
---
|
|
1201
1301
|
With the Intermediate Usage Guide, users can explore and leverage the core components and functionalities of the MediaSFU Angular module to enhance their event hosting and participation experiences.
|
|
@@ -1761,84 +1861,85 @@ These advanced media control functions encompass a wide range of functionalities
|
|
|
1761
1861
|
|
|
1762
1862
|
This robust collection of functions empowers developers to tailor their applications to specific requirements, whether it involves intricate media streaming setups, real-time communication protocols, or sophisticated user interface interactions. With these tools at their disposal, developers can create rich and responsive media experiences that meet the demands of their users and applications.
|
|
1763
1863
|
|
|
1764
|
-
Here's a tabulated list of advanced control functions along with brief explanations:
|
|
1864
|
+
Here's a tabulated list of advanced control functions along with brief explanations (click the function(link) for full usage guide):
|
|
1765
1865
|
|
|
1766
1866
|
| Function | Explanation |
|
|
1767
1867
|
|----------------------------------|---------------------------------------------------------------------------------------------------------|
|
|
1768
|
-
| `connectSocket` | Connects to the WebSocket server. |
|
|
1769
|
-
| `disconnectSocket` | Disconnects from the WebSocket server. |
|
|
1770
|
-
| `joinRoomClient` | Joins a room as a client. |
|
|
1771
|
-
| `updateRoomParametersClient` | Updates room parameters as a client. |
|
|
1772
|
-
| `createDeviceClient` | Creates a device as a client. |
|
|
1773
|
-
| `switchVideoAlt` | Switches video/camera streams. |
|
|
1774
|
-
| `clickVideo` | Handles clicking on video controls. |
|
|
1775
|
-
| `clickAudio` | Handles clicking on audio controls. |
|
|
1776
|
-
| `clickScreenShare` | Handles clicking on screen share controls. |
|
|
1777
|
-
| `streamSuccessVideo` | Handles successful video streaming. |
|
|
1778
|
-
| `streamSuccessAudio` | Handles successful audio streaming. |
|
|
1779
|
-
| `streamSuccessScreen` | Handles successful screen sharing. |
|
|
1780
|
-
| `streamSuccessAudioSwitch` | Handles successful audio switching. |
|
|
1781
|
-
| `checkPermission` | Checks for media access permissions. |
|
|
1782
|
-
| `producerClosed` | Handles the closure of a producer. |
|
|
1783
|
-
| `newPipeProducer` | Creates receive transport for a new piped producer. |
|
|
1784
|
-
| `updateMiniCardsGrid` | Updates the mini-grids (mini cards) grid. |
|
|
1785
|
-
| `mixStreams` | Mixes streams and prioritizes interesting ones together. |
|
|
1786
|
-
| `dispStreams` | Displays streams (media). |
|
|
1787
|
-
| `stopShareScreen` | Stops screen sharing. |
|
|
1788
|
-
| `checkScreenShare` | Checks for screen sharing availability. |
|
|
1789
|
-
| `startShareScreen` | Starts screen sharing. |
|
|
1790
|
-
| `requestScreenShare` | Requests permission for screen sharing. |
|
|
1791
|
-
| `reorderStreams` | Reorders streams (based on interest level). |
|
|
1792
|
-
| `prepopulateUserMedia` | Populates user media (for main grid). |
|
|
1793
|
-
| `getVideos` | Retrieves videos that are pending. |
|
|
1794
|
-
| `rePort` | Handles re-porting (updates of changes in UI when recording). |
|
|
1795
|
-
| `trigger` | Triggers actions (reports changes in UI to backend for recording). |
|
|
1796
|
-
| `consumerResume` | Resumes consumers. |
|
|
1797
|
-
| `connectSendTransportAudio` | Connects send transport for audio. |
|
|
1798
|
-
| `connectSendTransportVideo` | Connects send transport for video. |
|
|
1799
|
-
| `connectSendTransportScreen`
|
|
1800
|
-
| `processConsumerTransports` | Processes consumer transports to pause/resume based on the current active page. |
|
|
1801
|
-
| `resumePauseStreams` | Resumes or pauses streams. |
|
|
1802
|
-
| `readjust` | Readjusts display elements. |
|
|
1803
|
-
| `checkGrid` | Checks the grid sizes to display. |
|
|
1804
|
-
| `getEstimate` | Gets an estimate of grids to add. |
|
|
1805
|
-
| `calculateRowsAndColumns` | Calculates rows and columns for the grid. |
|
|
1806
|
-
| `addVideosGrid` | Adds videos to the grid. |
|
|
1807
|
-
| `onScreenChanges` | Handles screen changes (orientation and resize). |
|
|
1808
|
-
| `sleep` | Pauses execution for a specified duration. |
|
|
1809
|
-
| `changeVids` | Changes videos. |
|
|
1810
|
-
| `compareActiveNames` | Compares active names (for recording UI changes reporting). |
|
|
1811
|
-
| `compareScreenStates`
|
|
1812
|
-
| `createSendTransport` | Creates a send transport. |
|
|
1813
|
-
| `resumeSendTransportAudio` | Resumes a send transport for audio. |
|
|
1814
|
-
| `receiveAllPipedTransports` | Receives all piped transports. |
|
|
1815
|
-
| `disconnectSendTransportVideo` | Disconnects send transport for video. |
|
|
1816
|
-
| `disconnectSendTransportAudio` | Disconnects send transport for audio. |
|
|
1817
|
-
| `disconnectSendTransportScreen` | Disconnects send transport for screen sharing. |
|
|
1818
|
-
| `connectSendTransport` | Connects a send transport. |
|
|
1819
|
-
| `getPipedProducersAlt` | Gets piped producers. |
|
|
1820
|
-
| `signalNewConsumerTransport` | Signals a new consumer transport. |
|
|
1821
|
-
| `connectRecvTransport` | Connects a receive transport. |
|
|
1822
|
-
| `reUpdateInter` | Re-updates the interface based on audio decibels. |
|
|
1823
|
-
| `updateParticipantAudioDecibels` | Updates participant audio decibels. |
|
|
1824
|
-
| `closeAndResize` | Closes and resizes the media elements. |
|
|
1825
|
-
| `autoAdjust` | Automatically adjusts display elements. |
|
|
1826
|
-
| `switchUserVideoAlt` | Switches user video (alternate) (back/front). |
|
|
1827
|
-
| `switchUserVideo` | Switches user video (specific video id). |
|
|
1828
|
-
| `switchUserAudio` | Switches user audio. |
|
|
1829
|
-
| `receiveRoomMessages` | Receives room messages. |
|
|
1830
|
-
| `formatNumber` | Formats a number (for broadcast viewers). |
|
|
1831
|
-
| `connectIps` | Connects IPs (connect to consuming servers)
|
|
1832
|
-
| `startMeetingProgressTimer` | Starts the meeting progress timer. |
|
|
1833
|
-
| `stopRecording` | Stops the recording process. |
|
|
1834
|
-
| `pollUpdated` | Handles updated poll data. |
|
|
1835
|
-
| `handleVotePoll` | Handles voting in a poll. |
|
|
1836
|
-
| `handleCreatePoll` | Handles creating a poll. |
|
|
1837
|
-
| `handleEndPoll`
|
|
1838
|
-
| `breakoutRoomUpdated` | Handles updated breakout room data. |
|
|
1839
|
-
| `captureCanvasStream` | Captures a canvas stream. |
|
|
1840
|
-
| `resumePauseAudioStreams` | Resumes or pauses audio streams. |
|
|
1841
|
-
|
|
1868
|
+
| [`connectSocket`](https://www.mediasfu.com/angular/classes/connectSocket) | Connects to the WebSocket server. |
|
|
1869
|
+
| [`disconnectSocket`](https://www.mediasfu.com/angular/classes/disconnectSocket) | Disconnects from the WebSocket server. |
|
|
1870
|
+
| [`joinRoomClient`](https://www.mediasfu.com/angular/classes/joinRoomClient) | Joins a room as a client. |
|
|
1871
|
+
| [`updateRoomParametersClient`](https://www.mediasfu.com/angular/classes/updateRoomParametersClient) | Updates room parameters as a client. |
|
|
1872
|
+
| [`createDeviceClient`](https://www.mediasfu.com/angular/classes/createDeviceClient) | Creates a device as a client. |
|
|
1873
|
+
| [`switchVideoAlt`](https://www.mediasfu.com/angular/classes/switchVideoAlt) | Switches video/camera streams. |
|
|
1874
|
+
| [`clickVideo`](https://www.mediasfu.com/angular/classes/clickVideo) | Handles clicking on video controls. |
|
|
1875
|
+
| [`clickAudio`](https://www.mediasfu.com/angular/classes/clickAudio) | Handles clicking on audio controls. |
|
|
1876
|
+
| [`clickScreenShare`](https://www.mediasfu.com/angular/classes/clickScreenShare) | Handles clicking on screen share controls. |
|
|
1877
|
+
| [`streamSuccessVideo`](https://www.mediasfu.com/angular/classes/streamSuccessVideo) | Handles successful video streaming. |
|
|
1878
|
+
| [`streamSuccessAudio`](https://www.mediasfu.com/angular/classes/streamSuccessAudio) | Handles successful audio streaming. |
|
|
1879
|
+
| [`streamSuccessScreen`](https://www.mediasfu.com/angular/classes/streamSuccessScreen) | Handles successful screen sharing. |
|
|
1880
|
+
| [`streamSuccessAudioSwitch`](https://www.mediasfu.com/angular/classes/streamSuccessAudioSwitch) | Handles successful audio switching. |
|
|
1881
|
+
| [`checkPermission`](https://www.mediasfu.com/angular/classes/checkPermission) | Checks for media access permissions. |
|
|
1882
|
+
| [`producerClosed`](https://www.mediasfu.com/angular/classes/producerClosed) | Handles the closure of a producer. |
|
|
1883
|
+
| [`newPipeProducer`](https://www.mediasfu.com/angular/classes/newPipeProducer) | Creates receive transport for a new piped producer. |
|
|
1884
|
+
| [`updateMiniCardsGrid`](https://www.mediasfu.com/angular/classes/updateMiniCardsGrid) | Updates the mini-grids (mini cards) grid. |
|
|
1885
|
+
| [`mixStreams`](https://www.mediasfu.com/angular/classes/mixStreams) | Mixes streams and prioritizes interesting ones together. |
|
|
1886
|
+
| [`dispStreams`](https://www.mediasfu.com/angular/classes/dispStreams) | Displays streams (media). |
|
|
1887
|
+
| [`stopShareScreen`](https://www.mediasfu.com/angular/classes/stopShareScreen) | Stops screen sharing. |
|
|
1888
|
+
| [`checkScreenShare`](https://www.mediasfu.com/angular/classes/checkScreenShare) | Checks for screen sharing availability. |
|
|
1889
|
+
| [`startShareScreen`](https://www.mediasfu.com/angular/classes/startShareScreen) | Starts screen sharing. |
|
|
1890
|
+
| [`requestScreenShare`](https://www.mediasfu.com/angular/classes/requestScreenShare) | Requests permission for screen sharing. |
|
|
1891
|
+
| [`reorderStreams`](https://www.mediasfu.com/angular/classes/reorderStreams) | Reorders streams (based on interest level). |
|
|
1892
|
+
| [`prepopulateUserMedia`](https://www.mediasfu.com/angular/classes/prepopulateUserMedia) | Populates user media (for main grid). |
|
|
1893
|
+
| [`getVideos`](https://www.mediasfu.com/angular/classes/getVideos) | Retrieves videos that are pending. |
|
|
1894
|
+
| [`rePort`](https://www.mediasfu.com/angular/classes/rePort) | Handles re-porting (updates of changes in UI when recording). |
|
|
1895
|
+
| [`trigger`](https://www.mediasfu.com/angular/classes/trigger) | Triggers actions (reports changes in UI to backend for recording). |
|
|
1896
|
+
| [`consumerResume`](https://www.mediasfu.com/angular/classes/consumerResume) | Resumes consumers. |
|
|
1897
|
+
| [`connectSendTransportAudio`](https://www.mediasfu.com/angular/classes/connectSendTransportAudio) | Connects send transport for audio. |
|
|
1898
|
+
| [`connectSendTransportVideo`](https://www.mediasfu.com/angular/classes/connectSendTransportVideo) | Connects send transport for video. |
|
|
1899
|
+
| [`connectSendTransportScreen`](https://www.mediasfu.com/angular/classes/connectSendTransportScreen) | Connects send transport for screen sharing. |
|
|
1900
|
+
| [`processConsumerTransports`](https://www.mediasfu.com/angular/classes/processConsumerTransports) | Processes consumer transports to pause/resume based on the current active page. |
|
|
1901
|
+
| [`resumePauseStreams`](https://www.mediasfu.com/angular/classes/resumePauseStreams) | Resumes or pauses streams. |
|
|
1902
|
+
| [`readjust`](https://www.mediasfu.com/angular/classes/readjust) | Readjusts display elements. |
|
|
1903
|
+
| [`checkGrid`](https://www.mediasfu.com/angular/classes/checkGrid) | Checks the grid sizes to display. |
|
|
1904
|
+
| [`getEstimate`](https://www.mediasfu.com/angular/classes/getEstimate) | Gets an estimate of grids to add. |
|
|
1905
|
+
| [`calculateRowsAndColumns`](https://www.mediasfu.com/angular/classes/calculateRowsAndColumns) | Calculates rows and columns for the grid. |
|
|
1906
|
+
| [`addVideosGrid`](https://www.mediasfu.com/angular/classes/addVideosGrid) | Adds videos to the grid. |
|
|
1907
|
+
| [`onScreenChanges`](https://www.mediasfu.com/angular/classes/onScreenChanges) | Handles screen changes (orientation and resize). |
|
|
1908
|
+
| [`sleep`](https://www.mediasfu.com/angular/classes/sleep) | Pauses execution for a specified duration. |
|
|
1909
|
+
| [`changeVids`](https://www.mediasfu.com/angular/classes/changeVids) | Changes videos. |
|
|
1910
|
+
| [`compareActiveNames`](https://www.mediasfu.com/angular/classes/compareActiveNames) | Compares active names (for recording UI changes reporting). |
|
|
1911
|
+
| [`compareScreenStates`](https://www.mediasfu.com/angular/classes/compareScreenStates) | Compares screen states (for recording changes in grid sizes reporting). |
|
|
1912
|
+
| [`createSendTransport`](https://www.mediasfu.com/angular/classes/createSendTransport) | Creates a send transport. |
|
|
1913
|
+
| [`resumeSendTransportAudio`](https://www.mediasfu.com/angular/classes/resumeSendTransportAudio) | Resumes a send transport for audio. |
|
|
1914
|
+
| [`receiveAllPipedTransports`](https://www.mediasfu.com/angular/classes/receiveAllPipedTransports) | Receives all piped transports. |
|
|
1915
|
+
| [`disconnectSendTransportVideo`](https://www.mediasfu.com/angular/classes/disconnectSendTransportVideo) | Disconnects send transport for video. |
|
|
1916
|
+
| [`disconnectSendTransportAudio`](https://www.mediasfu.com/angular/classes/disconnectSendTransportAudio) | Disconnects send transport for audio. |
|
|
1917
|
+
| [`disconnectSendTransportScreen`](https://www.mediasfu.com/angular/classes/disconnectSendTransportScreen) | Disconnects send transport for screen sharing. |
|
|
1918
|
+
| [`connectSendTransport`](https://www.mediasfu.com/angular/classes/connectSendTransport) | Connects a send transport. |
|
|
1919
|
+
| [`getPipedProducersAlt`](https://www.mediasfu.com/angular/classes/getPipedProducersAlt) | Gets piped producers. |
|
|
1920
|
+
| [`signalNewConsumerTransport`](https://www.mediasfu.com/angular/classes/signalNewConsumerTransport) | Signals a new consumer transport. |
|
|
1921
|
+
| [`connectRecvTransport`](https://www.mediasfu.com/angular/classes/connectRecvTransport) | Connects a receive transport. |
|
|
1922
|
+
| [`reUpdateInter`](https://www.mediasfu.com/angular/classes/reUpdateInter) | Re-updates the interface based on audio decibels. |
|
|
1923
|
+
| [`updateParticipantAudioDecibels`](https://www.mediasfu.com/angular/classes/updateParticipantAudioDecibels) | Updates participant audio decibels. |
|
|
1924
|
+
| [`closeAndResize`](https://www.mediasfu.com/angular/classes/closeAndResize) | Closes and resizes the media elements. |
|
|
1925
|
+
| [`autoAdjust`](https://www.mediasfu.com/angular/classes/autoAdjust) | Automatically adjusts display elements. |
|
|
1926
|
+
| [`switchUserVideoAlt`](https://www.mediasfu.com/angular/classes/switchUserVideoAlt) | Switches user video (alternate) (back/front). |
|
|
1927
|
+
| [`switchUserVideo`](https://www.mediasfu.com/angular/classes/switchUserVideo) | Switches user video (specific video id). |
|
|
1928
|
+
| [`switchUserAudio`](https://www.mediasfu.com/angular/classes/switchUserAudio) | Switches user audio. |
|
|
1929
|
+
| [`receiveRoomMessages`](https://www.mediasfu.com/angular/classes/receiveRoomMessages) | Receives room messages. |
|
|
1930
|
+
| [`formatNumber`](https://www.mediasfu.com/angular/classes/formatNumber) | Formats a number (for broadcast viewers). |
|
|
1931
|
+
| [`connectIps`](https://www.mediasfu.com/angular/classes/connectIps) | Connects IPs (connect to consuming servers) |
|
|
1932
|
+
| [`startMeetingProgressTimer`](https://www.mediasfu.com/angular/classes/startMeetingProgressTimer) | Starts the meeting progress timer. |
|
|
1933
|
+
| [`stopRecording`](https://www.mediasfu.com/angular/classes/stopRecording) | Stops the recording process. |
|
|
1934
|
+
| [`pollUpdated`](https://www.mediasfu.com/angular/classes/pollUpdated) | Handles updated poll data. |
|
|
1935
|
+
| [`handleVotePoll`](https://www.mediasfu.com/angular/classes/handleVotePoll) | Handles voting in a poll. |
|
|
1936
|
+
| [`handleCreatePoll`](https://www.mediasfu.com/angular/classes/handleCreatePoll) | Handles creating a poll. |
|
|
1937
|
+
| [`handleEndPoll`](https://www.mediasfu.com/angular/classes/handleEndPoll) | Handles ending a poll. |
|
|
1938
|
+
| [`breakoutRoomUpdated`](https://www.mediasfu.com/angular/classes/breakoutRoomUpdated) | Handles updated breakout room data. |
|
|
1939
|
+
| [`captureCanvasStream`](https://www.mediasfu.com/angular/classes/captureCanvasStream) | Captures a canvas stream. |
|
|
1940
|
+
| [`resumePauseAudioStreams`](https://www.mediasfu.com/angular/classes/resumePauseAudioStreams) | Resumes or pauses audio streams. |
|
|
1941
|
+
| [`processConsumerTransportsAudio`](https://www.mediasfu.com/angular/classes/processConsumerTransportsAudio) | Processes consumer transports for audio. |
|
|
1942
|
+
|
|
1842
1943
|
|
|
1843
1944
|
### Room Socket Events
|
|
1844
1945
|
|
|
@@ -1848,41 +1949,41 @@ In the context of a room's real-time communication, various events occur, such a
|
|
|
1848
1949
|
|
|
1849
1950
|
| Function | Explanation |
|
|
1850
1951
|
|-------------------------------|---------------------------------------------------------------------------------------------------------|
|
|
1851
|
-
| `userWaiting` | Triggered when a user is waiting. |
|
|
1852
|
-
| `personJoined` | Triggered when a person joins the room. |
|
|
1853
|
-
| `allWaitingRoomMembers` | Triggered when information about all waiting room members is received. |
|
|
1854
|
-
| `roomRecordParams` | Triggered when room recording parameters are received. |
|
|
1855
|
-
| `banParticipant` | Triggered when a participant is banned. |
|
|
1856
|
-
| `updatedCoHost` | Triggered when the co-host information is updated.
|
|
1857
|
-
| `participantRequested` | Triggered when a participant requests access. |
|
|
1858
|
-
| `screenProducerId` | Triggered when the screen producer ID is received.
|
|
1859
|
-
| `updateMediaSettings` | Triggered when media settings are updated. |
|
|
1860
|
-
| `producerMediaPaused` | Triggered when producer media is paused. |
|
|
1861
|
-
| `producerMediaResumed` | Triggered when producer media is resumed. |
|
|
1862
|
-
| `producerMediaClosed` | Triggered when producer media is closed. |
|
|
1863
|
-
| `controlMediaHost` | Triggered when media control is hosted. |
|
|
1864
|
-
| `meetingEnded` | Triggered when the meeting ends. |
|
|
1865
|
-
| `disconnectUserSelf` | Triggered when a user disconnects. |
|
|
1866
|
-
| `receiveMessage` | Triggered when a message is received. |
|
|
1867
|
-
| `meetingTimeRemaining` | Triggered when meeting time remaining is received. |
|
|
1868
|
-
| `meetingStillThere` | Triggered when the meeting is still active. |
|
|
1869
|
-
| `startRecords` | Triggered when recording starts. |
|
|
1870
|
-
| `reInitiateRecording` | Triggered when recording needs to be re-initiated. |
|
|
1871
|
-
| `getDomains` | Triggered when domains are received. |
|
|
1872
|
-
| `updateConsumingDomains` | Triggered when consuming domains are updated. |
|
|
1873
|
-
| `recordingNotice` | Triggered when a recording notice is received. |
|
|
1874
|
-
| `timeLeftRecording` | Triggered when time left for recording is received. |
|
|
1875
|
-
| `stoppedRecording`
|
|
1876
|
-
| `hostRequestResponse` | Triggered when the host request response is received. |
|
|
1877
|
-
| `allMembers` | Triggered when information about all members is received. |
|
|
1878
|
-
| `allMembersRest` | Triggered when information about all members is received (rest of the members). |
|
|
1879
|
-
| `disconnect` | Triggered when a disconnect event occurs. |
|
|
1880
|
-
| `pollUpdated` | Triggered when a poll is updated. |
|
|
1881
|
-
| `breakoutRoomUpdated` | Triggered when a breakout room is updated.
|
|
1882
|
-
| `whiteboardUpdated` | Handles updated whiteboard data.
|
|
1883
|
-
| `whiteboardAction` | Handles whiteboard actions. |
|
|
1884
|
-
|
|
1885
|
-
#### Sample Usage
|
|
1952
|
+
| [`userWaiting`](https://www.mediasfu.com/angular/classes/userWaiting) | Triggered when a user is waiting. |
|
|
1953
|
+
| [`personJoined`](https://www.mediasfu.com/angular/classes/personJoined) | Triggered when a person joins the room. |
|
|
1954
|
+
| [`allWaitingRoomMembers`](https://www.mediasfu.com/angular/classes/allWaitingRoomMembers) | Triggered when information about all waiting room members is received. |
|
|
1955
|
+
| [`roomRecordParams`](https://www.mediasfu.com/angular/classes/roomRecordParams) | Triggered when room recording parameters are received. |
|
|
1956
|
+
| [`banParticipant`](https://www.mediasfu.com/angular/classes/banParticipant) | Triggered when a participant is banned. |
|
|
1957
|
+
| [`updatedCoHost`](https://www.mediasfu.com/angular/classes/updatedCoHost) | Triggered when the co-host information is updated. |
|
|
1958
|
+
| [`participantRequested`](https://www.mediasfu.com/angular/classes/participantRequested) | Triggered when a participant requests access. |
|
|
1959
|
+
| [`screenProducerId`](https://www.mediasfu.com/angular/classes/screenProducerId) | Triggered when the screen producer ID is received. |
|
|
1960
|
+
| [`updateMediaSettings`](https://www.mediasfu.com/angular/classes/updateMediaSettings) | Triggered when media settings are updated. |
|
|
1961
|
+
| [`producerMediaPaused`](https://www.mediasfu.com/angular/classes/producerMediaPaused) | Triggered when producer media is paused. |
|
|
1962
|
+
| [`producerMediaResumed`](https://www.mediasfu.com/angular/classes/producerMediaResumed) | Triggered when producer media is resumed. |
|
|
1963
|
+
| [`producerMediaClosed`](https://www.mediasfu.com/angular/classes/producerMediaClosed) | Triggered when producer media is closed. |
|
|
1964
|
+
| [`controlMediaHost`](https://www.mediasfu.com/angular/classes/controlMediaHost) | Triggered when media control is hosted. |
|
|
1965
|
+
| [`meetingEnded`](https://www.mediasfu.com/angular/classes/meetingEnded) | Triggered when the meeting ends. |
|
|
1966
|
+
| [`disconnectUserSelf`](https://www.mediasfu.com/angular/classes/disconnectUserSelf) | Triggered when a user disconnects. |
|
|
1967
|
+
| [`receiveMessage`](https://www.mediasfu.com/angular/classes/receiveMessage) | Triggered when a message is received. |
|
|
1968
|
+
| [`meetingTimeRemaining`](https://www.mediasfu.com/angular/classes/meetingTimeRemaining) | Triggered when meeting time remaining is received. |
|
|
1969
|
+
| [`meetingStillThere`](https://www.mediasfu.com/angular/classes/meetingStillThere) | Triggered when the meeting is still active. |
|
|
1970
|
+
| [`startRecords`](https://www.mediasfu.com/angular/classes/startRecords) | Triggered when recording starts. |
|
|
1971
|
+
| [`reInitiateRecording`](https://www.mediasfu.com/angular/classes/reInitiateRecording) | Triggered when recording needs to be re-initiated. |
|
|
1972
|
+
| [`getDomains`](https://www.mediasfu.com/angular/classes/getDomains) | Triggered when domains are received. |
|
|
1973
|
+
| [`updateConsumingDomains`](https://www.mediasfu.com/angular/classes/updateConsumingDomains) | Triggered when consuming domains are updated. |
|
|
1974
|
+
| [`recordingNotice`](https://www.mediasfu.com/angular/classes/recordingNotice) | Triggered when a recording notice is received. |
|
|
1975
|
+
| [`timeLeftRecording`](https://www.mediasfu.com/angular/classes/timeLeftRecording) | Triggered when time left for recording is received. |
|
|
1976
|
+
| [`stoppedRecording`](https://www.mediasfu.com/angular/classes/stoppedRecording) | Triggered when recording stops. |
|
|
1977
|
+
| [`hostRequestResponse`](https://www.mediasfu.com/angular/classes/hostRequestResponse) | Triggered when the host request response is received. |
|
|
1978
|
+
| [`allMembers`](https://www.mediasfu.com/angular/classes/allMembers) | Triggered when information about all members is received. |
|
|
1979
|
+
| [`allMembersRest`](https://www.mediasfu.com/angular/classes/allMembersRest) | Triggered when information about all members is received (rest of the members). |
|
|
1980
|
+
| [`disconnect`](https://www.mediasfu.com/angular/classes/disconnect) | Triggered when a disconnect event occurs. |
|
|
1981
|
+
| [`pollUpdated`](https://www.mediasfu.com/angular/classes/pollUpdated) | Triggered when a poll is updated. |
|
|
1982
|
+
| [`breakoutRoomUpdated`](https://www.mediasfu.com/angular/classes/breakoutRoomUpdated) | Triggered when a breakout room is updated.
|
|
1983
|
+
| [`whiteboardUpdated`](https://www.mediasfu.com/angular/classes/whiteboardUpdated) | Handles updated whiteboard data.
|
|
1984
|
+
| [`whiteboardAction`](https://www.mediasfu.com/angular/classes/whiteboardAction) | Handles whiteboard actions. |
|
|
1985
|
+
|
|
1986
|
+
#### Sample Usage
|
|
1886
1987
|
|
|
1887
1988
|
```javascript
|
|
1888
1989
|
// Example usage of provided socket event handling functions
|