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/README.md
CHANGED
|
@@ -27,6 +27,12 @@ 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
|
+
|
|
32
|
+
**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.
|
|
33
|
+
**[Get started now on GitHub!](https://github.com/MediaSFU/MediaSFUOpen)**
|
|
34
|
+
---
|
|
35
|
+
|
|
30
36
|
## Table of Contents
|
|
31
37
|
|
|
32
38
|
- [Features](#features)
|
|
@@ -57,17 +63,22 @@ MediaSFU's Angular SDK comes with a host of powerful features out of the box:
|
|
|
57
63
|
|
|
58
64
|
This section will guide users through the initial setup and installation of the npm module.
|
|
59
65
|
|
|
66
|
+
### Documentation Reference
|
|
67
|
+
|
|
68
|
+
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.
|
|
69
|
+
|
|
70
|
+
|
|
60
71
|
## Installation
|
|
61
72
|
|
|
62
73
|
Instructions on how to install the module using npm.
|
|
63
74
|
|
|
64
|
-
1. **Add the package to your project**
|
|
75
|
+
### 1. **Add the package to your project**
|
|
65
76
|
|
|
66
77
|
```bash
|
|
67
78
|
npm install mediasfu-angular
|
|
68
79
|
```
|
|
69
80
|
|
|
70
|
-
2. **Bootstrap Integration**
|
|
81
|
+
### 2. **Bootstrap Integration**
|
|
71
82
|
|
|
72
83
|
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
84
|
|
|
@@ -98,7 +109,7 @@ Instructions on how to install the module using npm.
|
|
|
98
109
|
**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
110
|
|
|
100
111
|
|
|
101
|
-
3. **Configure MediaSFU's PreJoinPage Requirements**
|
|
112
|
+
### 3. **Configure MediaSFU's PreJoinPage Requirements**
|
|
102
113
|
|
|
103
114
|
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
115
|
|
|
@@ -124,14 +135,20 @@ Instructions on how to install the module using npm.
|
|
|
124
135
|
};
|
|
125
136
|
|
|
126
137
|
```
|
|
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
138
|
|
|
130
|
-
|
|
139
|
+
### 4. Obtain an API Key (If Required)
|
|
140
|
+
You can get your API key by signing up or logging into your account at [mediasfu.com](https://www.mediasfu.com/).
|
|
141
|
+
|
|
142
|
+
<div style="background-color:#f0f0f0; padding: 10px; border-radius: 5px;">
|
|
131
143
|
<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>
|
|
144
|
+
<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
145
|
</div>
|
|
134
146
|
|
|
147
|
+
## **Self-Hosting MediaSFU**
|
|
148
|
+
|
|
149
|
+
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).
|
|
150
|
+
|
|
151
|
+
This setup allows full flexibility and customization while bypassing the need for cloud-dependent credentials.
|
|
135
152
|
|
|
136
153
|
|
|
137
154
|
# Basic Usage Guide <a name="basic-usage-guide"></a>
|
|
@@ -139,19 +156,14 @@ Instructions on how to install the module using npm.
|
|
|
139
156
|
A basic guide on how to use the module for common tasks.
|
|
140
157
|
|
|
141
158
|
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
159
|
## Introduction
|
|
152
160
|
|
|
153
161
|
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
162
|
|
|
163
|
+
### Documentation Reference
|
|
164
|
+
|
|
165
|
+
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.
|
|
166
|
+
|
|
155
167
|
## Prebuilt Event Rooms
|
|
156
168
|
|
|
157
169
|
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 +281,469 @@ updateValidated(true);
|
|
|
269
281
|
See the following code for the PreJoinPage page logic:
|
|
270
282
|
|
|
271
283
|
```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
|
-
}
|
|
284
|
+
import { Component, Inject, Input, OnInit, Optional } from '@angular/core';
|
|
285
|
+
import { FormBuilder, FormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
286
|
+
import { CommonModule } from '@angular/common';
|
|
287
|
+
import { Socket } from 'socket.io-client';
|
|
288
|
+
import {
|
|
289
|
+
ConnectSocketType, ShowAlert,
|
|
290
|
+
ConnectLocalSocketType, ResponseLocalConnection,
|
|
291
|
+
ResponseLocalConnectionData, RecordingParams, MeetingRoomParams
|
|
292
|
+
} from '../../../@types/types';
|
|
293
|
+
import { CheckLimitsAndMakeRequest } from '../../../methods/utils/check-limits-and-make-request.service';
|
|
294
|
+
import { CreateRoomOnMediaSFU } from '../../../methods/utils/create-room-on-media-sfu.service';
|
|
295
|
+
import { JoinRoomOnMediaSFUService } from '../../../methods/utils/join-room-on-media-sfu.service';
|
|
296
|
+
|
|
297
|
+
export interface JoinLocalEventRoomParameters {
|
|
298
|
+
eventID: string;
|
|
299
|
+
userName: string;
|
|
300
|
+
secureCode?: string;
|
|
301
|
+
videoPreference?: string | null;
|
|
302
|
+
audioPreference?: string | null;
|
|
303
|
+
audioOutputPreference?: string | null;
|
|
304
|
+
}
|
|
294
305
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
306
|
+
export interface JoinLocalEventRoomOptions {
|
|
307
|
+
joinData: JoinLocalEventRoomParameters;
|
|
308
|
+
link?: string;
|
|
309
|
+
}
|
|
299
310
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
311
|
+
export interface CreateLocalRoomParameters {
|
|
312
|
+
eventID: string;
|
|
313
|
+
duration: number;
|
|
314
|
+
capacity: number;
|
|
315
|
+
userName: string;
|
|
316
|
+
scheduledDate: Date;
|
|
317
|
+
secureCode: string;
|
|
318
|
+
waitRoom?: boolean;
|
|
319
|
+
recordingParams?: RecordingParams;
|
|
320
|
+
eventRoomParams?: MeetingRoomParams;
|
|
321
|
+
videoPreference?: string | null;
|
|
322
|
+
audioPreference?: string | null;
|
|
323
|
+
audioOutputPreference?: string | null;
|
|
324
|
+
mediasfuURL?: string;
|
|
325
|
+
}
|
|
326
|
+
export interface CreateLocalRoomOptions {
|
|
327
|
+
createData: CreateLocalRoomParameters;
|
|
328
|
+
link?: string;
|
|
329
|
+
}
|
|
304
330
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
secret: string;
|
|
312
|
-
success: boolean;
|
|
313
|
-
}
|
|
331
|
+
export interface CreateJoinLocalRoomResponse {
|
|
332
|
+
success: boolean;
|
|
333
|
+
secret: string;
|
|
334
|
+
reason?: string;
|
|
335
|
+
url?: string;
|
|
336
|
+
}
|
|
314
337
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
338
|
+
// Type definitions for parameters and credentials
|
|
339
|
+
export interface PreJoinPageParameters {
|
|
340
|
+
imgSrc?: string;
|
|
341
|
+
showAlert?: ShowAlert;
|
|
342
|
+
updateIsLoadingModalVisible: (visible: boolean) => void;
|
|
343
|
+
connectSocket: ConnectSocketType;
|
|
344
|
+
connectLocalSocket?: ConnectLocalSocketType;
|
|
345
|
+
updateSocket: (socket: Socket) => void;
|
|
346
|
+
updateLocalSocket?: (socket: Socket) => void;
|
|
347
|
+
updateValidated: (validated: boolean) => void;
|
|
348
|
+
updateApiUserName: (userName: string) => void;
|
|
349
|
+
updateApiToken: (token: string) => void;
|
|
350
|
+
updateLink: (link: string) => void;
|
|
351
|
+
updateRoomName: (roomName: string) => void;
|
|
352
|
+
updateMember: (member: string) => void;
|
|
353
|
+
}
|
|
319
354
|
|
|
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
|
|
355
|
+
export interface Credentials {
|
|
356
|
+
apiUserName: string;
|
|
357
|
+
apiKey: string;
|
|
358
|
+
}
|
|
343
359
|
|
|
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
|
-
}
|
|
360
|
+
export interface PreJoinPageOptions {
|
|
361
|
+
localLink?: string;
|
|
362
|
+
connectMediaSFU?: boolean;
|
|
363
|
+
parameters: PreJoinPageParameters;
|
|
364
|
+
credentials?: Credentials;
|
|
365
|
+
}
|
|
435
366
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
367
|
+
export type PreJoinPageType = (options: PreJoinPageOptions) => HTMLElement;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* @fileoverview PreJoinPage component for handling room creation and joining on MediaSFU.
|
|
371
|
+
*
|
|
372
|
+
* @component
|
|
373
|
+
* @selector app-pre-join-page
|
|
374
|
+
* @standalone true
|
|
375
|
+
* @templateUrl ./pre-join-page.component.html
|
|
376
|
+
* @styleUrls ./pre-join-page.component.css
|
|
377
|
+
* @imports [CommonModule, ReactiveFormsModule]
|
|
378
|
+
*
|
|
379
|
+
* @description
|
|
380
|
+
* This component provides functionality for users to create or join a room on MediaSFU.
|
|
381
|
+
* It includes form validation, error handling, and API requests to the MediaSFU service.
|
|
382
|
+
*
|
|
383
|
+
* @property {any} parameters - Input parameters for the component.
|
|
384
|
+
* @property {Object} credentials - API credentials for MediaSFU.
|
|
385
|
+
* @property {string} credentials.apiUserName - API username.
|
|
386
|
+
* @property {string} credentials.apiKey - API key.
|
|
387
|
+
* @property {boolean} isCreateMode - Flag to toggle between create and join modes.
|
|
388
|
+
* @property {FormGroup} preJoinForm - Form group for pre-join form.
|
|
389
|
+
* @property {string} error - Error message to display.
|
|
390
|
+
*
|
|
391
|
+
* @constructor
|
|
392
|
+
* @param {FormBuilder} fb - FormBuilder service for creating form groups.
|
|
393
|
+
* @param {HttpClient} http - HttpClient service for making HTTP requests.
|
|
394
|
+
* @param {CookieService} cookieService - CookieService for managing cookies.
|
|
395
|
+
*
|
|
396
|
+
* @method ngOnInit
|
|
397
|
+
* @description Lifecycle hook that is called after data-bound properties are initialized.
|
|
398
|
+
*
|
|
399
|
+
* @method toggleMode
|
|
400
|
+
* @description Toggles between create and join modes and resets the error message.
|
|
401
|
+
*
|
|
402
|
+
* @method handleCreateRoom
|
|
403
|
+
* @description Handles the creation of a room on MediaSFU. Validates form inputs, sends a request to create a room, and handles the response.
|
|
404
|
+
*
|
|
405
|
+
* @method handleJoinRoom
|
|
406
|
+
* @description Handles joining a room on MediaSFU. Validates form inputs, sends a request to join a room, and handles the response.
|
|
407
|
+
*
|
|
408
|
+
* @method checkLimitsAndMakeRequest
|
|
409
|
+
* @description Checks rate limits and makes a request to connect to a room. Handles unsuccessful attempts and updates the state accordingly.
|
|
410
|
+
*
|
|
411
|
+
* @method createRoomOnMediaSFU
|
|
412
|
+
* @description Sends a request to create a room on MediaSFU.
|
|
413
|
+
* @param {Object} params - Parameters for the request.
|
|
414
|
+
* @param {any} params.payload - Payload for the request.
|
|
415
|
+
* @param {string} params.apiUserName - API username.
|
|
416
|
+
* @param {string} params.apiKey - API key.
|
|
417
|
+
* @returns {Promise<{ data: CreateJoinRoomResponse | CreateJoinRoomError | null; success: boolean }>} Response from the API.
|
|
418
|
+
*
|
|
419
|
+
* @method joinRoomOnMediaSFU
|
|
420
|
+
* @description Sends a request to join a room on MediaSFU.
|
|
421
|
+
* @param {Object} params - Parameters for the request.
|
|
422
|
+
* @param {any} params.payload - Payload for the request.
|
|
423
|
+
* @param {string} params.apiUserName - API username.
|
|
424
|
+
* @param {string} params.apiKey - API key.
|
|
425
|
+
* @returns {Promise<{ data: CreateJoinRoomResponse | CreateJoinRoomError | null; success: boolean }>} Response from the API.
|
|
426
|
+
*
|
|
427
|
+
* @example
|
|
428
|
+
* ```html
|
|
429
|
+
* <app-pre-join-page
|
|
430
|
+
* [parameters]="preJoinPageParameters"
|
|
431
|
+
* [credentials]="{ apiUserName: 'username', apiKey: 'apiKey' }"
|
|
432
|
+
* [localLink]="'http://localhost:3000'"
|
|
433
|
+
* [connectMediaSFU]="false"
|
|
434
|
+
* ></app-pre-join-page>
|
|
435
|
+
* ```
|
|
436
|
+
*/
|
|
440
437
|
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
438
|
+
@Component({
|
|
439
|
+
selector: 'app-pre-join-page',
|
|
440
|
+
templateUrl: './pre-join-page.component.html',
|
|
441
|
+
styleUrls: ['./pre-join-page.component.css'],
|
|
442
|
+
imports: [CommonModule, ReactiveFormsModule]
|
|
443
|
+
})
|
|
444
|
+
export class PreJoinPage implements OnInit {
|
|
445
|
+
@Input() parameters: PreJoinPageParameters = {} as PreJoinPageParameters;
|
|
446
|
+
@Input() credentials: Credentials = { apiUserName: 'yourAPIUSERNAME', apiKey: 'yourAPIKEY' };
|
|
447
|
+
@Input() localLink: string | undefined = "";
|
|
448
|
+
@Input() connectMediaSFU: boolean | undefined = true;
|
|
446
449
|
|
|
447
|
-
|
|
450
|
+
isCreateMode = false;
|
|
451
|
+
preJoinForm: FormGroup;
|
|
452
|
+
error = '';
|
|
448
453
|
|
|
449
|
-
|
|
450
|
-
this.error = 'Please fill all the fields.';
|
|
451
|
-
return;
|
|
452
|
-
}
|
|
454
|
+
imgSrc: string = this.parameters.imgSrc || '';
|
|
453
455
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
capacity: parseInt(capacity),
|
|
458
|
-
eventType,
|
|
459
|
-
userName: name,
|
|
460
|
-
};
|
|
456
|
+
localConnected = false;
|
|
457
|
+
localData: ResponseLocalConnectionData | undefined = undefined;
|
|
458
|
+
initSocket: Socket | undefined = undefined;
|
|
461
459
|
|
|
462
|
-
|
|
460
|
+
constructor(
|
|
461
|
+
private fb: FormBuilder,
|
|
462
|
+
@Optional() @Inject('parameters') injectedParameters: PreJoinPageParameters,
|
|
463
|
+
@Optional() @Inject('credentials') injectedCredentials: Credentials,
|
|
464
|
+
@Optional() @Inject('localLink') injectedLocalLink: string,
|
|
465
|
+
@Optional() @Inject('connectMediaSFU') injectedConnectMediaSFU: boolean,
|
|
466
|
+
private checkLimitsService: CheckLimitsAndMakeRequest,
|
|
467
|
+
private createRoomService: CreateRoomOnMediaSFU,
|
|
468
|
+
private joinRoomService: JoinRoomOnMediaSFUService
|
|
469
|
+
) {
|
|
470
|
+
this.preJoinForm = this.fb.group({
|
|
471
|
+
name: ['', Validators.required],
|
|
472
|
+
duration: [''],
|
|
473
|
+
eventType: [''],
|
|
474
|
+
capacity: [''],
|
|
475
|
+
eventID: [''],
|
|
476
|
+
});
|
|
477
|
+
this.parameters = injectedParameters || this.parameters;
|
|
478
|
+
this.credentials = injectedCredentials || this.credentials;
|
|
479
|
+
this.localLink = injectedLocalLink || this.localLink;
|
|
480
|
+
this.connectMediaSFU = injectedConnectMediaSFU !== undefined ? injectedConnectMediaSFU : this.connectMediaSFU;
|
|
463
481
|
|
|
464
|
-
|
|
465
|
-
const response = await this.createRoomOnMediaSFU({
|
|
466
|
-
payload,
|
|
467
|
-
apiUserName: this.credentials.apiUserName,
|
|
468
|
-
apiKey: this.credentials.apiKey,
|
|
469
|
-
});
|
|
482
|
+
}
|
|
470
483
|
|
|
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
|
-
}
|
|
484
|
+
ngOnInit(): void {
|
|
485
|
+
if (this.localLink && !this.localConnected && !this.initSocket) {
|
|
486
|
+
this.connectLocalSocket();
|
|
489
487
|
}
|
|
488
|
+
}
|
|
490
489
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
490
|
+
private async connectLocalSocket(): Promise<void> {
|
|
491
|
+
try {
|
|
492
|
+
const response = await this.parameters.connectLocalSocket?.({ link: this.localLink! }) as ResponseLocalConnection;
|
|
493
|
+
if (response) {
|
|
494
|
+
this.localData = response.data;
|
|
495
|
+
this.initSocket = response.socket;
|
|
496
|
+
this.localConnected = true;
|
|
495
497
|
}
|
|
498
|
+
} catch (error: any) {
|
|
499
|
+
this.parameters.showAlert?.({
|
|
500
|
+
message: `Unable to connect to ${this.localLink}. ${error}`,
|
|
501
|
+
type: 'danger',
|
|
502
|
+
duration: 3000,
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
}
|
|
496
506
|
|
|
497
|
-
|
|
507
|
+
toggleMode(): void {
|
|
508
|
+
this.isCreateMode = !this.isCreateMode;
|
|
509
|
+
this.error = '';
|
|
510
|
+
}
|
|
498
511
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
512
|
+
async joinLocalRoom(options: JoinLocalEventRoomOptions): Promise<void> {
|
|
513
|
+
this.initSocket?.emit('joinEventRoom', options.joinData, (response: CreateJoinLocalRoomResponse) => {
|
|
514
|
+
if (response.success) {
|
|
515
|
+
this.parameters.updateSocket(this.initSocket!);
|
|
516
|
+
this.parameters.updateApiUserName(this.localData?.apiUserName || '');
|
|
517
|
+
this.parameters.updateApiToken(response.secret);
|
|
518
|
+
this.parameters.updateLink(options.link || '');
|
|
519
|
+
this.parameters.updateRoomName(options.joinData.eventID);
|
|
520
|
+
this.parameters.updateMember(options.joinData.userName);
|
|
521
|
+
this.parameters.updateIsLoadingModalVisible(false);
|
|
522
|
+
this.parameters.updateValidated(true);
|
|
523
|
+
} else {
|
|
524
|
+
this.parameters.updateIsLoadingModalVisible(false);
|
|
525
|
+
this.error = `Unable to join room. ${response.reason}`;
|
|
502
526
|
}
|
|
527
|
+
});
|
|
528
|
+
}
|
|
503
529
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
530
|
+
async createLocalRoom(options: CreateLocalRoomOptions): Promise<void> {
|
|
531
|
+
this.initSocket?.emit('createRoom', options.createData, (response: CreateJoinLocalRoomResponse) => {
|
|
532
|
+
if (response.success) {
|
|
533
|
+
this.parameters.updateSocket(this.initSocket!);
|
|
534
|
+
this.parameters.updateApiUserName(this.localData?.apiUserName || '');
|
|
535
|
+
this.parameters.updateApiToken(response.secret);
|
|
536
|
+
this.parameters.updateLink(options.link || '');
|
|
537
|
+
this.parameters.updateRoomName(options.createData.eventID);
|
|
538
|
+
// Update member as `userName` + "_2" to split in the room
|
|
539
|
+
this.parameters.updateMember(`${options.createData.userName}_2`);
|
|
540
|
+
this.parameters.updateIsLoadingModalVisible(false);
|
|
541
|
+
this.parameters.updateValidated(true);
|
|
542
|
+
} else {
|
|
543
|
+
this.parameters.updateIsLoadingModalVisible(false);
|
|
544
|
+
this.error = `Unable to create room. ${response.reason}`;
|
|
545
|
+
}
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
async roomCreator(options: { payload: any; apiUserName: string; apiKey: string; validate?: boolean }): Promise<any> {
|
|
550
|
+
const { payload, apiUserName, apiKey, validate = true } = options;
|
|
551
|
+
const response = await this.createRoomService.createRoomOnMediaSFU({
|
|
552
|
+
payload,
|
|
553
|
+
apiUserName,
|
|
554
|
+
apiKey,
|
|
555
|
+
});
|
|
509
556
|
|
|
510
|
-
|
|
557
|
+
if (response.success && response.data && 'roomName' in response.data) {
|
|
558
|
+
await this.checkLimitsService.checkLimitsAndMakeRequest({
|
|
559
|
+
apiUserName: response.data.roomName,
|
|
560
|
+
apiToken: response.data.secret,
|
|
561
|
+
link: response.data.link,
|
|
562
|
+
userName: payload.userName,
|
|
563
|
+
parameters: this.parameters,
|
|
564
|
+
validate: validate,
|
|
565
|
+
});
|
|
566
|
+
return response;
|
|
567
|
+
} else {
|
|
568
|
+
this.parameters.updateIsLoadingModalVisible(false);
|
|
569
|
+
this.error = `Unable to create room. ${
|
|
570
|
+
response.data
|
|
571
|
+
? 'error' in response.data
|
|
572
|
+
? response.data.error
|
|
573
|
+
: ''
|
|
574
|
+
: ''
|
|
575
|
+
}`;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
511
578
|
|
|
512
|
-
|
|
513
|
-
const response = await this.joinRoomOnMediaSFU({
|
|
514
|
-
payload,
|
|
515
|
-
apiUserName: this.credentials.apiUserName,
|
|
516
|
-
apiKey: this.credentials.apiKey,
|
|
517
|
-
});
|
|
579
|
+
async handleCreateRoom(): Promise<void> {
|
|
518
580
|
|
|
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
|
-
}
|
|
581
|
+
const { name, duration, eventType, capacity } = this.preJoinForm.value;
|
|
582
|
+
|
|
583
|
+
if (!name || !duration || !eventType || !capacity) {
|
|
584
|
+
this.error = 'Please fill all the fields.';
|
|
585
|
+
return;
|
|
537
586
|
}
|
|
538
587
|
|
|
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
|
-
}
|
|
588
|
+
const payload = {
|
|
589
|
+
action: 'create',
|
|
590
|
+
duration: parseInt(duration),
|
|
591
|
+
capacity: parseInt(capacity),
|
|
592
|
+
eventType,
|
|
593
|
+
userName: name,
|
|
594
|
+
recordOnly: false,
|
|
595
|
+
};
|
|
570
596
|
|
|
571
|
-
|
|
572
|
-
|
|
597
|
+
this.parameters.updateIsLoadingModalVisible(true);
|
|
598
|
+
|
|
599
|
+
if (this.localLink) {
|
|
600
|
+
const secureCode =
|
|
601
|
+
Math.random().toString(30).substring(2, 14) +
|
|
602
|
+
Math.random().toString(30).substring(2, 14);
|
|
603
|
+
let eventID =
|
|
604
|
+
new Date().getTime().toString(30) +
|
|
605
|
+
new Date().getUTCMilliseconds() +
|
|
606
|
+
Math.floor(10 + Math.random() * 99).toString();
|
|
607
|
+
eventID = 'm' + eventID;
|
|
608
|
+
const eventRoomParams = this.localData?.meetingRoomParams_;
|
|
609
|
+
eventRoomParams!.type = eventType as 'chat' | 'broadcast' | 'webinar' | 'conference';
|
|
610
|
+
|
|
611
|
+
const createData: CreateLocalRoomParameters = {
|
|
612
|
+
eventID: eventID,
|
|
613
|
+
duration: parseInt(duration, 10),
|
|
614
|
+
capacity: parseInt(capacity, 10),
|
|
615
|
+
userName: name,
|
|
616
|
+
scheduledDate: new Date(),
|
|
617
|
+
secureCode: secureCode,
|
|
618
|
+
waitRoom: false,
|
|
619
|
+
recordingParams: this.localData?.recordingParams_,
|
|
620
|
+
eventRoomParams: eventRoomParams,
|
|
621
|
+
videoPreference: null,
|
|
622
|
+
audioPreference: null,
|
|
623
|
+
audioOutputPreference: null,
|
|
624
|
+
mediasfuURL: '',
|
|
625
|
+
};
|
|
573
626
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
627
|
+
if (
|
|
628
|
+
this.connectMediaSFU &&
|
|
629
|
+
this.initSocket &&
|
|
630
|
+
this.localData &&
|
|
631
|
+
this.localData.apiUserName &&
|
|
632
|
+
this.localData.apiKey
|
|
633
|
+
) {
|
|
634
|
+
payload.recordOnly = true; // allow production to MediaSFU only; no consumption
|
|
635
|
+
const response = await this.roomCreator({
|
|
636
|
+
payload,
|
|
637
|
+
apiUserName: this.localData.apiUserName,
|
|
638
|
+
apiKey: this.localData.apiKey,
|
|
639
|
+
validate: false,
|
|
579
640
|
});
|
|
580
641
|
|
|
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);
|
|
642
|
+
if (response && response.success && response.data && 'roomName' in response.data) {
|
|
643
|
+
createData.eventID = response.data.roomName;
|
|
644
|
+
createData.secureCode = response.data.secret;
|
|
645
|
+
createData.mediasfuURL = response.data.publicURL;
|
|
646
|
+
await this.createLocalRoom({ createData: createData, link: response.data.link });
|
|
598
647
|
} else {
|
|
599
|
-
unsuccessfulAttempts += 1;
|
|
600
|
-
this.cookieService.set('unsuccessfulAttempts', unsuccessfulAttempts.toString());
|
|
601
|
-
this.cookieService.set('lastRequestTimestamp', Date.now().toString());
|
|
602
648
|
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
|
-
});
|
|
649
|
+
this.error = 'Unable to create room on MediaSFU.';
|
|
650
|
+
try {
|
|
651
|
+
this.parameters.updateSocket(this.initSocket!);
|
|
652
|
+
await this.createLocalRoom({ createData: createData });
|
|
653
|
+
} catch (error: any) {
|
|
654
|
+
this.parameters.updateIsLoadingModalVisible(false);
|
|
655
|
+
this.error = `Unable to create room. ${error}`;
|
|
616
656
|
}
|
|
617
657
|
}
|
|
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);
|
|
658
|
+
} else {
|
|
659
|
+
try {
|
|
660
|
+
this.parameters.updateSocket(this.initSocket!);
|
|
661
|
+
await this.createLocalRoom({ createData: createData });
|
|
662
|
+
} catch (error: any) {
|
|
663
|
+
this.parameters.updateIsLoadingModalVisible(false);
|
|
664
|
+
this.error = `Unable to create room. ${error}`;
|
|
665
|
+
}
|
|
629
666
|
}
|
|
667
|
+
} else {
|
|
668
|
+
await this.roomCreator({
|
|
669
|
+
payload,
|
|
670
|
+
apiUserName: this.credentials.apiUserName,
|
|
671
|
+
apiKey: this.credentials.apiKey,
|
|
672
|
+
validate: true,
|
|
673
|
+
});
|
|
630
674
|
}
|
|
675
|
+
}
|
|
631
676
|
|
|
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
|
-
}
|
|
677
|
+
async handleJoinRoom(): Promise<void> {
|
|
678
|
+
if (this.preJoinForm.invalid) {
|
|
679
|
+
this.error = 'Please fill all the fields.';
|
|
680
|
+
return;
|
|
681
|
+
}
|
|
652
682
|
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
683
|
+
const { name, eventID } = this.preJoinForm.value;
|
|
684
|
+
|
|
685
|
+
if (!name || !eventID) {
|
|
686
|
+
this.error = 'Please fill all the fields.';
|
|
687
|
+
return;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
const payload = {
|
|
691
|
+
action: 'join',
|
|
692
|
+
meetingID: eventID,
|
|
693
|
+
userName: name,
|
|
694
|
+
};
|
|
695
|
+
|
|
696
|
+
if (this.localLink && !this.localLink.includes('mediasfu.com')) {
|
|
697
|
+
const joinData = {
|
|
698
|
+
eventID: eventID,
|
|
699
|
+
userName: name,
|
|
700
|
+
secureCode: '',
|
|
701
|
+
videoPreference: null,
|
|
702
|
+
audioPreference: null,
|
|
703
|
+
audioOutputPreference: null,
|
|
704
|
+
};
|
|
705
|
+
|
|
706
|
+
await this.joinLocalRoom({ joinData: joinData });
|
|
707
|
+
return;
|
|
670
708
|
}
|
|
671
709
|
|
|
672
|
-
|
|
710
|
+
this.parameters.updateIsLoadingModalVisible(true);
|
|
711
|
+
try {
|
|
712
|
+
const response = await this.joinRoomService.joinRoomOnMediaSFU({
|
|
673
713
|
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
|
-
}
|
|
714
|
+
apiUserName: this.credentials.apiUserName,
|
|
715
|
+
apiKey: this.credentials.apiKey,
|
|
716
|
+
});
|
|
692
717
|
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
};
|
|
709
|
-
}
|
|
718
|
+
if (response.success && response.data && 'roomName' in response.data) {
|
|
719
|
+
await this.checkLimitsService.checkLimitsAndMakeRequest({
|
|
720
|
+
apiUserName: response.data.roomName,
|
|
721
|
+
apiToken: response.data.secret,
|
|
722
|
+
link: response.data.link,
|
|
723
|
+
userName: name,
|
|
724
|
+
parameters: this.parameters,
|
|
725
|
+
validate: true,
|
|
726
|
+
});
|
|
727
|
+
this.error = '';
|
|
728
|
+
} else {
|
|
729
|
+
this.parameters.updateIsLoadingModalVisible(false);
|
|
730
|
+
this.error = `Unable to connect to room. ${
|
|
731
|
+
response.data ? ('error' in response.data ? response.data.error : '') : ''
|
|
732
|
+
}`;
|
|
710
733
|
}
|
|
734
|
+
} catch (error) {
|
|
735
|
+
this.parameters.updateIsLoadingModalVisible(false);
|
|
736
|
+
this.error = `Unable to connect. ${(error as any).message}`;
|
|
711
737
|
}
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
|
|
712
741
|
```
|
|
713
742
|
|
|
714
743
|
### IP Blockage Warning And Local UI Development
|
|
715
744
|
|
|
745
|
+
**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.
|
|
746
|
+
|
|
716
747
|
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
748
|
|
|
718
749
|
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 +874,130 @@ import {
|
|
|
843
874
|
} from 'mediasfu-angular';
|
|
844
875
|
|
|
845
876
|
|
|
877
|
+
/**
|
|
878
|
+
* The main application component for MediaSFU.
|
|
879
|
+
*
|
|
880
|
+
* This component initializes the necessary configuration and credentials for the MediaSFU application.
|
|
881
|
+
* Users can specify their own Community Edition (CE) server, utilize MediaSFU Cloud by default, or enable MediaSFU Cloud for egress features.
|
|
882
|
+
*
|
|
883
|
+
* @remarks
|
|
884
|
+
* - **Using Your Own Community Edition (CE) Server**: Set the `localLink` to point to your CE server.
|
|
885
|
+
* - **Using MediaSFU Cloud by Default**: If not using a custom server (`localLink` is empty), the application connects to MediaSFU Cloud.
|
|
886
|
+
* - **MediaSFU Cloud Egress Features**: To enable cloud recording, capturing, and returning real-time images and audio buffers,
|
|
887
|
+
* set `connectMediaSFU` to `true` in addition to specifying your `localLink`.
|
|
888
|
+
* - **Credentials Requirement**: If not using your own server, provide `apiUserName` and `apiKey`. The same applies when using MediaSFU Cloud for egress.
|
|
889
|
+
* - **Deprecated Feature**: `useLocalUIMode` is deprecated due to updates for strong typing and improved configuration options.
|
|
890
|
+
*
|
|
891
|
+
* @component
|
|
892
|
+
* @example
|
|
893
|
+
* ```typescript
|
|
894
|
+
* // Example usage of the AppComponent
|
|
895
|
+
* @NgModule({
|
|
896
|
+
* declarations: [AppComponent],
|
|
897
|
+
* imports: [BrowserModule, MediasfuWebinar],
|
|
898
|
+
* bootstrap: [AppComponent]
|
|
899
|
+
* })
|
|
900
|
+
* export class AppModule { }
|
|
901
|
+
* ```
|
|
902
|
+
*/
|
|
846
903
|
@Component({
|
|
847
904
|
selector: 'app-root',
|
|
848
|
-
|
|
849
|
-
imports: [
|
|
850
|
-
MediasfuGeneric,
|
|
851
|
-
MediasfuBroadcast,
|
|
852
|
-
MediasfuChat,
|
|
853
|
-
MediasfuWebinar,
|
|
854
|
-
MediasfuConference,
|
|
855
|
-
PreJoinPage,
|
|
856
|
-
],
|
|
905
|
+
imports: [MediasfuWebinar],
|
|
857
906
|
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
|
-
`
|
|
907
|
+
<app-mediasfu-webinar
|
|
908
|
+
[credentials]="credentials"
|
|
909
|
+
[localLink]="localLink"
|
|
910
|
+
[connectMediaSFU]="connectMediaSFU"
|
|
911
|
+
[PrejoinPage]="PreJoinPage"
|
|
912
|
+
[seedData]="seedData">
|
|
913
|
+
</app-mediasfu-webinar>
|
|
914
|
+
`,
|
|
915
|
+
providers: [
|
|
916
|
+
GenerateRandomParticipants,
|
|
917
|
+
GenerateRandomMessages,
|
|
918
|
+
GenerateRandomRequestList,
|
|
919
|
+
GenerateRandomWaitingRoomList
|
|
920
|
+
],
|
|
980
921
|
})
|
|
981
922
|
export class AppComponent implements OnInit {
|
|
982
|
-
//
|
|
983
|
-
|
|
923
|
+
// ========================
|
|
924
|
+
// ====== CONFIGURATION ======
|
|
925
|
+
// ========================
|
|
984
926
|
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
927
|
+
/**
|
|
928
|
+
* Mediasfu account credentials.
|
|
929
|
+
* Replace 'your_api_username' and 'your_api_key' with your actual credentials.
|
|
930
|
+
* Not needed if using a custom server without MediaSFU Cloud Egress features.
|
|
931
|
+
*/
|
|
988
932
|
credentials = {
|
|
989
933
|
apiUserName: 'your_api_username',
|
|
990
934
|
apiKey: 'your_api_key',
|
|
991
935
|
};
|
|
992
936
|
|
|
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';
|
|
937
|
+
/**
|
|
938
|
+
* Specify your Community Edition (CE) server link.
|
|
939
|
+
* Leave as an empty string if not using a custom server.
|
|
940
|
+
*/
|
|
941
|
+
localLink = 'http://localhost:3000'; // Set to '' if not using your own server
|
|
1001
942
|
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
943
|
+
/**
|
|
944
|
+
* Automatically set `connectMediaSFU` to `true` if `localLink` is provided,
|
|
945
|
+
* indicating the use of MediaSFU Cloud by default.
|
|
946
|
+
*
|
|
947
|
+
* - If `localLink` is not empty, MediaSFU Cloud will be used for additional features.
|
|
948
|
+
* - If `localLink` is empty, the application will connect to MediaSFU Cloud by default.
|
|
949
|
+
*/
|
|
950
|
+
connectMediaSFU = this.localLink.trim() !== ''; // set to false if not using MediaSFU Cloud for Main Server or Egress
|
|
951
|
+
|
|
952
|
+
// ========================
|
|
953
|
+
// ====== USE CASES ======
|
|
954
|
+
// ========================
|
|
955
|
+
|
|
956
|
+
// Deprecated Feature: useLocalUIMode
|
|
957
|
+
// This feature is deprecated due to updates for strong typing.
|
|
958
|
+
// It is no longer required and should not be used in new implementations.
|
|
1005
959
|
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
960
|
+
/**
|
|
961
|
+
* Uncomment and configure the following section if you intend to use seed data
|
|
962
|
+
* for generating random participants and messages.
|
|
963
|
+
*
|
|
964
|
+
* Note: This is deprecated and maintained only for legacy purposes.
|
|
965
|
+
*/
|
|
966
|
+
/*
|
|
967
|
+
useSeed = false;
|
|
968
|
+
seedData: any = {};
|
|
1013
969
|
|
|
1014
970
|
ngOnInit(): void {
|
|
1015
|
-
// If using seed data, generate random participants and messages
|
|
1016
971
|
if (this.useSeed) {
|
|
1017
|
-
const memberName = '
|
|
972
|
+
const memberName = 'Alice';
|
|
1018
973
|
const hostName = 'Fred';
|
|
1019
974
|
|
|
1020
975
|
// Generate random participants
|
|
1021
|
-
const participants_ =
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
this.eventType === 'broadcast' || this.eventType === 'chat',
|
|
1028
|
-
});
|
|
976
|
+
const participants_ = this.generateRandomParticipants.generateRandomParticipants({
|
|
977
|
+
member: memberName,
|
|
978
|
+
coHost: '',
|
|
979
|
+
host: hostName,
|
|
980
|
+
forChatBroadcast: this.eventType === 'broadcast' || this.eventType === 'chat',
|
|
981
|
+
});
|
|
1029
982
|
|
|
1030
983
|
// Generate random messages
|
|
1031
984
|
const messages_ = this.generateRandomMessages.generateRandomMessages({
|
|
1032
985
|
participants: participants_,
|
|
1033
986
|
member: memberName,
|
|
1034
987
|
host: hostName,
|
|
1035
|
-
forChatBroadcast:
|
|
1036
|
-
this.eventType === 'broadcast' || this.eventType === 'chat',
|
|
988
|
+
forChatBroadcast: this.eventType === 'broadcast' || this.eventType === 'chat',
|
|
1037
989
|
});
|
|
1038
990
|
|
|
1039
991
|
// Generate random request list
|
|
1040
|
-
const requests_ =
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
});
|
|
992
|
+
const requests_ = this.generateRandomRequestList.generateRandomRequestList({
|
|
993
|
+
participants: participants_,
|
|
994
|
+
hostName: memberName,
|
|
995
|
+
coHostName: '',
|
|
996
|
+
numberOfRequests: 3,
|
|
997
|
+
});
|
|
1047
998
|
|
|
1048
999
|
// Generate random waiting room list
|
|
1049
|
-
const waitingList_ =
|
|
1050
|
-
this.generateRandomWaitingRoomList.generateRandomWaitingRoomList();
|
|
1000
|
+
const waitingList_ = this.generateRandomWaitingRoomList.generateRandomWaitingRoomList();
|
|
1051
1001
|
|
|
1052
1002
|
// Assign generated data to seedData
|
|
1053
1003
|
this.seedData = {
|
|
@@ -1064,14 +1014,164 @@ export class AppComponent implements OnInit {
|
|
|
1064
1014
|
// Determine whether to use local UI mode
|
|
1065
1015
|
this.useLocalUIMode = this.useSeed;
|
|
1066
1016
|
}
|
|
1017
|
+
*/
|
|
1018
|
+
|
|
1019
|
+
// ========================
|
|
1020
|
+
// ====== COMPONENT SELECTION ======
|
|
1021
|
+
// ========================
|
|
1022
|
+
|
|
1023
|
+
/**
|
|
1024
|
+
* Choose the Mediasfu component based on the event type and use case.
|
|
1025
|
+
* Uncomment the component corresponding to your specific use case.
|
|
1026
|
+
*/
|
|
1027
|
+
|
|
1028
|
+
// ------------------------
|
|
1029
|
+
// ====== SIMPLE USE CASE ======
|
|
1030
|
+
// ------------------------
|
|
1031
|
+
|
|
1032
|
+
/**
|
|
1033
|
+
* **Simple Use Case (Welcome Page)**
|
|
1034
|
+
*
|
|
1035
|
+
* Renders the default welcome page.
|
|
1036
|
+
* No additional inputs required.
|
|
1037
|
+
*/
|
|
1038
|
+
// return <MediasfuWebinar />;
|
|
1039
|
+
|
|
1040
|
+
// ------------------------
|
|
1041
|
+
// ====== PRE-JOIN USE CASE ======
|
|
1042
|
+
// ------------------------
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* **Use Case with Pre-Join Page (Credentials Required)**
|
|
1046
|
+
*
|
|
1047
|
+
* Uses a pre-join page that requires users to enter credentials.
|
|
1048
|
+
*/
|
|
1049
|
+
// return <MediasfuWebinar PrejoinPage={PreJoinPage} credentials={credentials} />;
|
|
1050
|
+
|
|
1051
|
+
// ------------------------
|
|
1052
|
+
// ====== SEED DATA USE CASE ======
|
|
1053
|
+
// ------------------------
|
|
1054
|
+
|
|
1055
|
+
/**
|
|
1056
|
+
* **Use Case with Seed Data (Deprecated)**
|
|
1057
|
+
*
|
|
1058
|
+
* Runs the application using seed data.
|
|
1059
|
+
*
|
|
1060
|
+
* @deprecated Due to updates for strong typing, this feature is deprecated.
|
|
1061
|
+
*/
|
|
1062
|
+
// return <MediasfuWebinar useSeed={useSeed} seedData={useSeed ? seedData : {}} />;
|
|
1063
|
+
|
|
1064
|
+
// ------------------------
|
|
1065
|
+
// ====== WEBINAR EVENT TYPE ======
|
|
1066
|
+
// ------------------------
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* **MediasfuWebinar Component**
|
|
1070
|
+
*
|
|
1071
|
+
* Uncomment to use the webinar event type.
|
|
1072
|
+
*/
|
|
1073
|
+
/*
|
|
1074
|
+
return (
|
|
1075
|
+
<MediasfuWebinar
|
|
1076
|
+
credentials={credentials}
|
|
1077
|
+
localLink={localLink}
|
|
1078
|
+
connectMediaSFU={connectMediaSFU}
|
|
1079
|
+
// seedData={useSeed ? seedData : {}}
|
|
1080
|
+
/>
|
|
1081
|
+
);
|
|
1082
|
+
*/
|
|
1083
|
+
|
|
1084
|
+
// ========================
|
|
1085
|
+
// ====== DEFAULT COMPONENT ======
|
|
1086
|
+
// ========================
|
|
1087
|
+
|
|
1088
|
+
/**
|
|
1089
|
+
* **Default to MediasfuWebinar with Updated Configuration**
|
|
1090
|
+
*
|
|
1091
|
+
* Renders the MediasfuWebinar component with specified server and cloud connection settings.
|
|
1092
|
+
* This is the default use case if no specific event type is selected.
|
|
1093
|
+
*/
|
|
1094
|
+
seedData: any = {}; // Initialize seedData as empty object
|
|
1095
|
+
|
|
1096
|
+
// Reference to the PreJoinPage component
|
|
1097
|
+
PreJoinPage = PreJoinPage;
|
|
1098
|
+
|
|
1099
|
+
constructor(
|
|
1100
|
+
private generateRandomParticipants: GenerateRandomParticipants,
|
|
1101
|
+
private generateRandomMessages: GenerateRandomMessages,
|
|
1102
|
+
private generateRandomRequestList: GenerateRandomRequestList,
|
|
1103
|
+
private generateRandomWaitingRoomList: GenerateRandomWaitingRoomList
|
|
1104
|
+
) { }
|
|
1105
|
+
|
|
1106
|
+
// Deprecated Feature: useSeed and seedData for generating random participants and messages
|
|
1107
|
+
// Uncomment and configure the following section if you intend to use seed data
|
|
1108
|
+
|
|
1109
|
+
// useSeed = false;
|
|
1110
|
+
// eventType = 'webinar';
|
|
1111
|
+
// useLocalUIMode = false;
|
|
1112
|
+
|
|
1113
|
+
ngOnInit(): void {
|
|
1114
|
+
// If using seed data, generate random participants and messages - DEPRECATED FEATURE
|
|
1115
|
+
// Note: This feature is deprecated and maintained only for legacy purposes.
|
|
1116
|
+
// Uncomment and configure the following section if you intend to use seed data
|
|
1117
|
+
|
|
1118
|
+
// if (this.useSeed) {
|
|
1119
|
+
// const memberName = 'Alice';
|
|
1120
|
+
// const hostName = 'Fred';
|
|
1121
|
+
|
|
1122
|
+
// // Generate random participants
|
|
1123
|
+
// const participants_ = this.generateRandomParticipants.generateRandomParticipants({
|
|
1124
|
+
// member: memberName,
|
|
1125
|
+
// coHost: '',
|
|
1126
|
+
// host: hostName,
|
|
1127
|
+
// forChatBroadcast: this.eventType === 'broadcast' || this.eventType === 'chat',
|
|
1128
|
+
// });
|
|
1129
|
+
|
|
1130
|
+
// // Generate random messages
|
|
1131
|
+
// const messages_ = this.generateRandomMessages.generateRandomMessages({
|
|
1132
|
+
// participants: participants_,
|
|
1133
|
+
// member: memberName,
|
|
1134
|
+
// host: hostName,
|
|
1135
|
+
// forChatBroadcast: this.eventType === 'broadcast' || this.eventType === 'chat',
|
|
1136
|
+
// });
|
|
1137
|
+
|
|
1138
|
+
// // Generate random request list
|
|
1139
|
+
// const requests_ = this.generateRandomRequestList.generateRandomRequestList({
|
|
1140
|
+
// participants: participants_,
|
|
1141
|
+
// hostName: memberName,
|
|
1142
|
+
// coHostName: '',
|
|
1143
|
+
// numberOfRequests: 3,
|
|
1144
|
+
// });
|
|
1145
|
+
|
|
1146
|
+
// // Generate random waiting room list
|
|
1147
|
+
// const waitingList_ = this.generateRandomWaitingRoomList.generateRandomWaitingRoomList();
|
|
1148
|
+
|
|
1149
|
+
// // Assign generated data to seedData
|
|
1150
|
+
// this.seedData = {
|
|
1151
|
+
// participants: participants_,
|
|
1152
|
+
// messages: messages_,
|
|
1153
|
+
// requests: requests_,
|
|
1154
|
+
// waitingList: waitingList_,
|
|
1155
|
+
// member: memberName,
|
|
1156
|
+
// host: hostName,
|
|
1157
|
+
// eventType: this.eventType,
|
|
1158
|
+
// };
|
|
1159
|
+
// }
|
|
1160
|
+
|
|
1161
|
+
// Determine whether to use local UI mode, deprecated feature
|
|
1162
|
+
// this.useLocalUIMode = this.useSeed;
|
|
1163
|
+
}
|
|
1067
1164
|
}
|
|
1068
1165
|
|
|
1166
|
+
|
|
1069
1167
|
```
|
|
1070
1168
|
|
|
1071
1169
|
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
1170
|
|
|
1073
1171
|
### Local UI Development in MediaSFU Angular Module
|
|
1074
1172
|
|
|
1173
|
+
|
|
1174
|
+
|
|
1075
1175
|
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
1176
|
|
|
1077
1177
|
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 +1191,112 @@ Expands on the basic usage, covering more advanced features and scenarios.
|
|
|
1091
1191
|
|
|
1092
1192
|
### Intermediate Usage Guide
|
|
1093
1193
|
|
|
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.
|
|
1194
|
+
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.**
|
|
1195
|
+
|
|
1095
1196
|
|
|
1096
1197
|
#### Core Components Overview
|
|
1097
1198
|
|
|
1098
1199
|
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
1200
|
|
|
1100
|
-
##### Media Display Components
|
|
1201
|
+
> ##### **Media Display Components**
|
|
1101
1202
|
|
|
1102
1203
|
| Component Name | Description |
|
|
1103
1204
|
|--------------------------|-------------------------------------------------------------------------------------------------|
|
|
1104
|
-
| **
|
|
1105
|
-
| **
|
|
1106
|
-
| **
|
|
1107
|
-
| **
|
|
1108
|
-
| **
|
|
1109
|
-
| **
|
|
1205
|
+
| **[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. |
|
|
1206
|
+
| **[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. |
|
|
1207
|
+
| **[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. |
|
|
1208
|
+
| **[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. |
|
|
1209
|
+
| **[MainContainerComponent](https://www.mediasfu.com/angular/classes/MainContainerComponent)** | Primary container for the application's content, encapsulating all major components and providing structural organization. |
|
|
1210
|
+
| **[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
1211
|
|
|
1111
|
-
|
|
1212
|
+
> ##### **Control Components**
|
|
1112
1213
|
|
|
1113
1214
|
| Component Name | Description |
|
|
1114
1215
|
|-------------------------------|-------------------------------------------------------------------------------------------------|
|
|
1115
|
-
| **
|
|
1116
|
-
| **
|
|
1117
|
-
| **
|
|
1216
|
+
| **[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. |
|
|
1217
|
+
| **[ControlButtonsAltComponent](https://www.mediasfu.com/angular/classes/ControlButtonsAltComponent)** | Provides alternative button configurations or styles for controlling different aspects of the application. |
|
|
1218
|
+
| **[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. |
|
|
1219
|
+
|
|
1118
1220
|
|
|
1119
1221
|
These components collectively contribute to the overall user interface, facilitating navigation, interaction, and content display within the application.
|
|
1120
1222
|
|
|
1121
|
-
##### Modal Components
|
|
1223
|
+
> ##### **Modal Components**
|
|
1122
1224
|
|
|
1123
1225
|
| Modal Component | Description |
|
|
1124
1226
|
|-----------------|-------------|
|
|
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. |
|
|
1227
|
+
| **[LoadingModal](https://www.mediasfu.com/angular/classes/LoadingModal)** | Modal for displaying loading indicator during data fetching or processing. |
|
|
1228
|
+
| **[MainAspectComponent](https://www.mediasfu.com/angular/classes/MainAspectComponent)** | Component responsible for displaying the main aspect of the event page. |
|
|
1229
|
+
| **[ControlButtonsComponent](https://www.mediasfu.com/angular/classes/ControlButtonsComponent)** | Component for displaying control buttons such as pagination controls. |
|
|
1230
|
+
| **[ControlButtonsAltComponent](https://www.mediasfu.com/angular/classes/ControlButtonsAltComponent)** | Alternate control buttons component for specific use cases. |
|
|
1231
|
+
| **[ControlButtonsComponentTouch](https://www.mediasfu.com/angular/classes/ControlButtonsComponentTouch)** | Touch-enabled control buttons component for mobile devices. |
|
|
1232
|
+
| **[OtherGridComponent](https://www.mediasfu.com/angular/classes/OtherGridComponent)** | Component for displaying additional grid elements on the event page. |
|
|
1233
|
+
| **[MainScreenComponent](https://www.mediasfu.com/angular/classes/MainScreenComponent)** | Component for rendering the main screen content of the event. |
|
|
1234
|
+
| **[MainGridComponent](https://www.mediasfu.com/angular/classes/MainGridComponent)** | Main grid component for displaying primary event content. |
|
|
1235
|
+
| **[SubAspectComponent](https://www.mediasfu.com/angular/classes/SubAspectComponent)** | Component for displaying secondary aspects of the event page. |
|
|
1236
|
+
| **[MainContainerComponent](https://www.mediasfu.com/angular/classes/MainContainerComponent)** | Main container component for the event page content. |
|
|
1237
|
+
| **[AlertComponent](https://www.mediasfu.com/angular/classes/AlertComponent)** | Modal for displaying alert messages to the user. |
|
|
1238
|
+
| **[MenuModal](https://www.mediasfu.com/angular/classes/MenuModal)** | Modal for displaying a menu with various options. |
|
|
1239
|
+
| **[RecordingModal](https://www.mediasfu.com/angular/classes/RecordingModal)** | Modal for managing recording functionality during the event. |
|
|
1240
|
+
| **[RequestsModal](https://www.mediasfu.com/angular/classes/RequestsModal)** | Modal for handling requests from participants during the event. |
|
|
1241
|
+
| **[WaitingRoomModal](https://www.mediasfu.com/angular/classes/WaitingRoomModal)** | Modal for managing waiting room functionality during the event. |
|
|
1242
|
+
| **[DisplaySettingsModal](https://www.mediasfu.com/angular/classes/DisplaySettingsModal)** | Modal for adjusting display settings during the event. |
|
|
1243
|
+
| **[EventSettingsModal](https://www.mediasfu.com/angular/classes/EventSettingsModal)** | Modal for configuring event settings. |
|
|
1244
|
+
| **[CoHostModal](https://www.mediasfu.com/angular/classes/CoHostModal)** | Modal for managing co-host functionality during the event. |
|
|
1245
|
+
| **[ParticipantsModal](https://www.mediasfu.com/angular/classes/ParticipantsModal)** | Modal for displaying participant information and controls. |
|
|
1246
|
+
| **[MessagesModal](https://www.mediasfu.com/angular/classes/MessagesModal)** | Modal for managing messages and chat functionality during the event. |
|
|
1247
|
+
| **[MediaSettingsModal](https://www.mediasfu.com/angular/classes/MediaSettingsModal)** | Modal for adjusting media settings during the event. |
|
|
1248
|
+
| **[ConfirmExitModal](https://www.mediasfu.com/angular/classes/ConfirmExitModal)** | Modal for confirming exit from the event. |
|
|
1249
|
+
| **[ConfirmHereModal](https://www.mediasfu.com/angular/classes/ConfirmHereModal)** | Modal for confirming certain actions or selections. |
|
|
1250
|
+
| **[ShareEventModal](https://www.mediasfu.com/angular/classes/ShareEventModal)** | Modal for sharing the event with others. |
|
|
1251
|
+
| **[WelcomePage](https://www.mediasfu.com/angular/classes/WelcomePage)** | Welcome page modal for the event. |
|
|
1252
|
+
| **[PreJoinPage](https://www.mediasfu.com/angular/classes/PreJoinPage)** | Prejoin page modal for the event. |
|
|
1253
|
+
| **[PollModal](https://www.mediasfu.com/angular/classes/PollModal)** | Modal for conducting polls or surveys during the event. |
|
|
1254
|
+
| **[BreakoutRoomsModal](https://www.mediasfu.com/angular/classes/BreakoutRoomsModal)** | Modal for managing breakout rooms during the event. |
|
|
1255
|
+
| **[ConfigureWhiteboardModal](https://www.mediasfu.com/angular/classes/ConfigureWhiteboardModal)** | Modal for configuring whiteboard settings during the event. |
|
|
1256
|
+
| **[BackgroundModal](https://www.mediasfu.com/angular/classes/BackgroundModal)** | Modal for managing background settings during the event. |
|
|
1257
|
+
| **[ScreenboardModal](https://www.mediasfu.com/angular/classes/ScreenboardModal)** | Modal for managing screen share annotations during the event. |
|
|
1156
1258
|
|
|
1157
1259
|
#### Modal Interactions
|
|
1158
1260
|
|
|
1159
1261
|
Each modal has corresponding functions to trigger its usage:
|
|
1160
1262
|
|
|
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
|
|
1263
|
+
1. [`launchMenuModal`](https://www.mediasfu.com/angular/classes/launchMenuModal): Launches the menu modal for settings and configurations.
|
|
1264
|
+
2. [`launchRecording`](https://www.mediasfu.com/angular/classes/launchRecording): Initiates the recording modal for recording functionalities.
|
|
1265
|
+
3. [`startRecording`](https://www.mediasfu.com/angular/classes/startRecording): Starts the recording process.
|
|
1266
|
+
4. [`confirmRecording`](https://www.mediasfu.com/angular/classes/confirmRecording): Confirms and finalizes the recording.
|
|
1267
|
+
5. [`launchWaiting`](https://www.mediasfu.com/angular/classes/launchWaiting): Opens the waiting room modal for managing waiting room interactions.
|
|
1268
|
+
6. [`launchCoHost`](https://www.mediasfu.com/angular/classes/launchCoHost): Opens the co-host modal for managing co-host functionalities.
|
|
1269
|
+
7. [`launchMediaSettings`](https://www.mediasfu.com/angular/classes/launchMediaSettings): Launches the media settings modal for adjusting media-related configurations.
|
|
1270
|
+
8. [`launchDisplaySettings`](https://www.mediasfu.com/angular/classes/launchDisplaySettings): Opens the display settings modal for adjusting display configurations.
|
|
1271
|
+
9. [`launchSettings`](https://www.mediasfu.com/angular/classes/launchSettings): Initiates the settings modal for general event settings and configurations.
|
|
1272
|
+
10. [`launchRequests`](https://www.mediasfu.com/angular/classes/launchRequests): Opens the requests modal for managing user requests.
|
|
1273
|
+
11. [`launchParticipants`](https://www.mediasfu.com/angular/classes/launchParticipants): Displays the participants modal for viewing and managing event participants.
|
|
1274
|
+
12. [`launchMessages`](https://www.mediasfu.com/angular/classes/launchMessages): Opens the messages modal for communication through chat messages.
|
|
1275
|
+
13. [`launchConfirmExit`](https://www.mediasfu.com/angular/classes/launchConfirmExit): Prompts users to confirm before exiting the event.
|
|
1174
1276
|
|
|
1175
1277
|
#### Media Display and Controls
|
|
1176
1278
|
|
|
1177
1279
|
These components facilitate media display and control functionalities:
|
|
1178
1280
|
|
|
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.
|
|
1281
|
+
1. **[Pagination](https://www.mediasfu.com/angular/classes/Pagination)**: Handles pagination and page switching.
|
|
1282
|
+
2. **[FlexibleGrid](https://www.mediasfu.com/angular/classes/FlexibleGrid)**: Renders flexible grid layouts for media display.
|
|
1283
|
+
3. **[FlexibleVideo](https://www.mediasfu.com/angular/classes/FlexibleVideo)**: Displays videos in a flexible manner within the grid.
|
|
1284
|
+
4. **[AudioGrid](https://www.mediasfu.com/angular/classes/AudioGrid)**: Renders audio components within the grid layout.
|
|
1285
|
+
5. **[Whiteboard](https://www.mediasfu.com/angular/classes/Whiteboard)**: Manages whiteboard functionalities for collaborative drawing.
|
|
1286
|
+
6. **[Screenboard](https://www.mediasfu.com/angular/classes/Screenboard)**: Controls screen share annotations and interactions.
|
|
1185
1287
|
|
|
1186
1288
|
These components enable seamless media presentation and interaction within the event environment, providing users with a rich and immersive experience.
|
|
1187
1289
|
|
|
1188
1290
|
| UI Media Component | Description |
|
|
1189
1291
|
|--------------|-------------|
|
|
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
|
-
|
|
1292
|
+
| **[MeetingProgressTimer](https://www.mediasfu.com/angular/classes/MeetingProgressTimer)** | Component for displaying a timer indicating the progress of a meeting or event. |
|
|
1293
|
+
| **[MiniAudio](https://www.mediasfu.com/angular/classes/MiniAudio)** | Component for rendering a compact audio player with basic controls. |
|
|
1294
|
+
| **[MiniCard](https://www.mediasfu.com/angular/classes/MiniCard)** | Component for displaying a minimized card view with essential information. |
|
|
1295
|
+
| **[AudioCard](https://www.mediasfu.com/angular/classes/AudioCard)** | Component for displaying audio content with control elements, details, and audio decibels. |
|
|
1296
|
+
| **[VideoCard](https://www.mediasfu.com/angular/classes/VideoCard)** | Component for displaying video content with control elements, details, and audio decibels. |
|
|
1297
|
+
| **[CardVideoDisplay](https://www.mediasfu.com/angular/classes/CardVideoDisplay)** | Video player component for displaying embedded videos with controls and details. |
|
|
1298
|
+
| **[MiniCardAudio](https://www.mediasfu.com/angular/classes/MiniCardAudio)** | Component for rendering a compact card view with audio content and controls. |
|
|
1299
|
+
| **[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
1300
|
|
|
1200
1301
|
---
|
|
1201
1302
|
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 +1862,85 @@ These advanced media control functions encompass a wide range of functionalities
|
|
|
1761
1862
|
|
|
1762
1863
|
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
1864
|
|
|
1764
|
-
Here's a tabulated list of advanced control functions along with brief explanations:
|
|
1865
|
+
Here's a tabulated list of advanced control functions along with brief explanations (click the function(link) for full usage guide):
|
|
1765
1866
|
|
|
1766
1867
|
| Function | Explanation |
|
|
1767
1868
|
|----------------------------------|---------------------------------------------------------------------------------------------------------|
|
|
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
|
-
|
|
1869
|
+
| [`connectSocket`](https://www.mediasfu.com/angular/classes/connectSocket) | Connects to the WebSocket server. |
|
|
1870
|
+
| [`disconnectSocket`](https://www.mediasfu.com/angular/classes/disconnectSocket) | Disconnects from the WebSocket server. |
|
|
1871
|
+
| [`joinRoomClient`](https://www.mediasfu.com/angular/classes/joinRoomClient) | Joins a room as a client. |
|
|
1872
|
+
| [`updateRoomParametersClient`](https://www.mediasfu.com/angular/classes/updateRoomParametersClient) | Updates room parameters as a client. |
|
|
1873
|
+
| [`createDeviceClient`](https://www.mediasfu.com/angular/classes/createDeviceClient) | Creates a device as a client. |
|
|
1874
|
+
| [`switchVideoAlt`](https://www.mediasfu.com/angular/classes/switchVideoAlt) | Switches video/camera streams. |
|
|
1875
|
+
| [`clickVideo`](https://www.mediasfu.com/angular/classes/clickVideo) | Handles clicking on video controls. |
|
|
1876
|
+
| [`clickAudio`](https://www.mediasfu.com/angular/classes/clickAudio) | Handles clicking on audio controls. |
|
|
1877
|
+
| [`clickScreenShare`](https://www.mediasfu.com/angular/classes/clickScreenShare) | Handles clicking on screen share controls. |
|
|
1878
|
+
| [`streamSuccessVideo`](https://www.mediasfu.com/angular/classes/streamSuccessVideo) | Handles successful video streaming. |
|
|
1879
|
+
| [`streamSuccessAudio`](https://www.mediasfu.com/angular/classes/streamSuccessAudio) | Handles successful audio streaming. |
|
|
1880
|
+
| [`streamSuccessScreen`](https://www.mediasfu.com/angular/classes/streamSuccessScreen) | Handles successful screen sharing. |
|
|
1881
|
+
| [`streamSuccessAudioSwitch`](https://www.mediasfu.com/angular/classes/streamSuccessAudioSwitch) | Handles successful audio switching. |
|
|
1882
|
+
| [`checkPermission`](https://www.mediasfu.com/angular/classes/checkPermission) | Checks for media access permissions. |
|
|
1883
|
+
| [`producerClosed`](https://www.mediasfu.com/angular/classes/producerClosed) | Handles the closure of a producer. |
|
|
1884
|
+
| [`newPipeProducer`](https://www.mediasfu.com/angular/classes/newPipeProducer) | Creates receive transport for a new piped producer. |
|
|
1885
|
+
| [`updateMiniCardsGrid`](https://www.mediasfu.com/angular/classes/updateMiniCardsGrid) | Updates the mini-grids (mini cards) grid. |
|
|
1886
|
+
| [`mixStreams`](https://www.mediasfu.com/angular/classes/mixStreams) | Mixes streams and prioritizes interesting ones together. |
|
|
1887
|
+
| [`dispStreams`](https://www.mediasfu.com/angular/classes/dispStreams) | Displays streams (media). |
|
|
1888
|
+
| [`stopShareScreen`](https://www.mediasfu.com/angular/classes/stopShareScreen) | Stops screen sharing. |
|
|
1889
|
+
| [`checkScreenShare`](https://www.mediasfu.com/angular/classes/checkScreenShare) | Checks for screen sharing availability. |
|
|
1890
|
+
| [`startShareScreen`](https://www.mediasfu.com/angular/classes/startShareScreen) | Starts screen sharing. |
|
|
1891
|
+
| [`requestScreenShare`](https://www.mediasfu.com/angular/classes/requestScreenShare) | Requests permission for screen sharing. |
|
|
1892
|
+
| [`reorderStreams`](https://www.mediasfu.com/angular/classes/reorderStreams) | Reorders streams (based on interest level). |
|
|
1893
|
+
| [`prepopulateUserMedia`](https://www.mediasfu.com/angular/classes/prepopulateUserMedia) | Populates user media (for main grid). |
|
|
1894
|
+
| [`getVideos`](https://www.mediasfu.com/angular/classes/getVideos) | Retrieves videos that are pending. |
|
|
1895
|
+
| [`rePort`](https://www.mediasfu.com/angular/classes/rePort) | Handles re-porting (updates of changes in UI when recording). |
|
|
1896
|
+
| [`trigger`](https://www.mediasfu.com/angular/classes/trigger) | Triggers actions (reports changes in UI to backend for recording). |
|
|
1897
|
+
| [`consumerResume`](https://www.mediasfu.com/angular/classes/consumerResume) | Resumes consumers. |
|
|
1898
|
+
| [`connectSendTransportAudio`](https://www.mediasfu.com/angular/classes/connectSendTransportAudio) | Connects send transport for audio. |
|
|
1899
|
+
| [`connectSendTransportVideo`](https://www.mediasfu.com/angular/classes/connectSendTransportVideo) | Connects send transport for video. |
|
|
1900
|
+
| [`connectSendTransportScreen`](https://www.mediasfu.com/angular/classes/connectSendTransportScreen) | Connects send transport for screen sharing. |
|
|
1901
|
+
| [`processConsumerTransports`](https://www.mediasfu.com/angular/classes/processConsumerTransports) | Processes consumer transports to pause/resume based on the current active page. |
|
|
1902
|
+
| [`resumePauseStreams`](https://www.mediasfu.com/angular/classes/resumePauseStreams) | Resumes or pauses streams. |
|
|
1903
|
+
| [`readjust`](https://www.mediasfu.com/angular/classes/readjust) | Readjusts display elements. |
|
|
1904
|
+
| [`checkGrid`](https://www.mediasfu.com/angular/classes/checkGrid) | Checks the grid sizes to display. |
|
|
1905
|
+
| [`getEstimate`](https://www.mediasfu.com/angular/classes/getEstimate) | Gets an estimate of grids to add. |
|
|
1906
|
+
| [`calculateRowsAndColumns`](https://www.mediasfu.com/angular/classes/calculateRowsAndColumns) | Calculates rows and columns for the grid. |
|
|
1907
|
+
| [`addVideosGrid`](https://www.mediasfu.com/angular/classes/addVideosGrid) | Adds videos to the grid. |
|
|
1908
|
+
| [`onScreenChanges`](https://www.mediasfu.com/angular/classes/onScreenChanges) | Handles screen changes (orientation and resize). |
|
|
1909
|
+
| [`sleep`](https://www.mediasfu.com/angular/classes/sleep) | Pauses execution for a specified duration. |
|
|
1910
|
+
| [`changeVids`](https://www.mediasfu.com/angular/classes/changeVids) | Changes videos. |
|
|
1911
|
+
| [`compareActiveNames`](https://www.mediasfu.com/angular/classes/compareActiveNames) | Compares active names (for recording UI changes reporting). |
|
|
1912
|
+
| [`compareScreenStates`](https://www.mediasfu.com/angular/classes/compareScreenStates) | Compares screen states (for recording changes in grid sizes reporting). |
|
|
1913
|
+
| [`createSendTransport`](https://www.mediasfu.com/angular/classes/createSendTransport) | Creates a send transport. |
|
|
1914
|
+
| [`resumeSendTransportAudio`](https://www.mediasfu.com/angular/classes/resumeSendTransportAudio) | Resumes a send transport for audio. |
|
|
1915
|
+
| [`receiveAllPipedTransports`](https://www.mediasfu.com/angular/classes/receiveAllPipedTransports) | Receives all piped transports. |
|
|
1916
|
+
| [`disconnectSendTransportVideo`](https://www.mediasfu.com/angular/classes/disconnectSendTransportVideo) | Disconnects send transport for video. |
|
|
1917
|
+
| [`disconnectSendTransportAudio`](https://www.mediasfu.com/angular/classes/disconnectSendTransportAudio) | Disconnects send transport for audio. |
|
|
1918
|
+
| [`disconnectSendTransportScreen`](https://www.mediasfu.com/angular/classes/disconnectSendTransportScreen) | Disconnects send transport for screen sharing. |
|
|
1919
|
+
| [`connectSendTransport`](https://www.mediasfu.com/angular/classes/connectSendTransport) | Connects a send transport. |
|
|
1920
|
+
| [`getPipedProducersAlt`](https://www.mediasfu.com/angular/classes/getPipedProducersAlt) | Gets piped producers. |
|
|
1921
|
+
| [`signalNewConsumerTransport`](https://www.mediasfu.com/angular/classes/signalNewConsumerTransport) | Signals a new consumer transport. |
|
|
1922
|
+
| [`connectRecvTransport`](https://www.mediasfu.com/angular/classes/connectRecvTransport) | Connects a receive transport. |
|
|
1923
|
+
| [`reUpdateInter`](https://www.mediasfu.com/angular/classes/reUpdateInter) | Re-updates the interface based on audio decibels. |
|
|
1924
|
+
| [`updateParticipantAudioDecibels`](https://www.mediasfu.com/angular/classes/updateParticipantAudioDecibels) | Updates participant audio decibels. |
|
|
1925
|
+
| [`closeAndResize`](https://www.mediasfu.com/angular/classes/closeAndResize) | Closes and resizes the media elements. |
|
|
1926
|
+
| [`autoAdjust`](https://www.mediasfu.com/angular/classes/autoAdjust) | Automatically adjusts display elements. |
|
|
1927
|
+
| [`switchUserVideoAlt`](https://www.mediasfu.com/angular/classes/switchUserVideoAlt) | Switches user video (alternate) (back/front). |
|
|
1928
|
+
| [`switchUserVideo`](https://www.mediasfu.com/angular/classes/switchUserVideo) | Switches user video (specific video id). |
|
|
1929
|
+
| [`switchUserAudio`](https://www.mediasfu.com/angular/classes/switchUserAudio) | Switches user audio. |
|
|
1930
|
+
| [`receiveRoomMessages`](https://www.mediasfu.com/angular/classes/receiveRoomMessages) | Receives room messages. |
|
|
1931
|
+
| [`formatNumber`](https://www.mediasfu.com/angular/classes/formatNumber) | Formats a number (for broadcast viewers). |
|
|
1932
|
+
| [`connectIps`](https://www.mediasfu.com/angular/classes/connectIps) | Connects IPs (connect to consuming servers) |
|
|
1933
|
+
| [`startMeetingProgressTimer`](https://www.mediasfu.com/angular/classes/startMeetingProgressTimer) | Starts the meeting progress timer. |
|
|
1934
|
+
| [`stopRecording`](https://www.mediasfu.com/angular/classes/stopRecording) | Stops the recording process. |
|
|
1935
|
+
| [`pollUpdated`](https://www.mediasfu.com/angular/classes/pollUpdated) | Handles updated poll data. |
|
|
1936
|
+
| [`handleVotePoll`](https://www.mediasfu.com/angular/classes/handleVotePoll) | Handles voting in a poll. |
|
|
1937
|
+
| [`handleCreatePoll`](https://www.mediasfu.com/angular/classes/handleCreatePoll) | Handles creating a poll. |
|
|
1938
|
+
| [`handleEndPoll`](https://www.mediasfu.com/angular/classes/handleEndPoll) | Handles ending a poll. |
|
|
1939
|
+
| [`breakoutRoomUpdated`](https://www.mediasfu.com/angular/classes/breakoutRoomUpdated) | Handles updated breakout room data. |
|
|
1940
|
+
| [`captureCanvasStream`](https://www.mediasfu.com/angular/classes/captureCanvasStream) | Captures a canvas stream. |
|
|
1941
|
+
| [`resumePauseAudioStreams`](https://www.mediasfu.com/angular/classes/resumePauseAudioStreams) | Resumes or pauses audio streams. |
|
|
1942
|
+
| [`processConsumerTransportsAudio`](https://www.mediasfu.com/angular/classes/processConsumerTransportsAudio) | Processes consumer transports for audio. |
|
|
1943
|
+
|
|
1842
1944
|
|
|
1843
1945
|
### Room Socket Events
|
|
1844
1946
|
|
|
@@ -1848,41 +1950,41 @@ In the context of a room's real-time communication, various events occur, such a
|
|
|
1848
1950
|
|
|
1849
1951
|
| Function | Explanation |
|
|
1850
1952
|
|-------------------------------|---------------------------------------------------------------------------------------------------------|
|
|
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
|
|
1953
|
+
| [`userWaiting`](https://www.mediasfu.com/angular/classes/userWaiting) | Triggered when a user is waiting. |
|
|
1954
|
+
| [`personJoined`](https://www.mediasfu.com/angular/classes/personJoined) | Triggered when a person joins the room. |
|
|
1955
|
+
| [`allWaitingRoomMembers`](https://www.mediasfu.com/angular/classes/allWaitingRoomMembers) | Triggered when information about all waiting room members is received. |
|
|
1956
|
+
| [`roomRecordParams`](https://www.mediasfu.com/angular/classes/roomRecordParams) | Triggered when room recording parameters are received. |
|
|
1957
|
+
| [`banParticipant`](https://www.mediasfu.com/angular/classes/banParticipant) | Triggered when a participant is banned. |
|
|
1958
|
+
| [`updatedCoHost`](https://www.mediasfu.com/angular/classes/updatedCoHost) | Triggered when the co-host information is updated. |
|
|
1959
|
+
| [`participantRequested`](https://www.mediasfu.com/angular/classes/participantRequested) | Triggered when a participant requests access. |
|
|
1960
|
+
| [`screenProducerId`](https://www.mediasfu.com/angular/classes/screenProducerId) | Triggered when the screen producer ID is received. |
|
|
1961
|
+
| [`updateMediaSettings`](https://www.mediasfu.com/angular/classes/updateMediaSettings) | Triggered when media settings are updated. |
|
|
1962
|
+
| [`producerMediaPaused`](https://www.mediasfu.com/angular/classes/producerMediaPaused) | Triggered when producer media is paused. |
|
|
1963
|
+
| [`producerMediaResumed`](https://www.mediasfu.com/angular/classes/producerMediaResumed) | Triggered when producer media is resumed. |
|
|
1964
|
+
| [`producerMediaClosed`](https://www.mediasfu.com/angular/classes/producerMediaClosed) | Triggered when producer media is closed. |
|
|
1965
|
+
| [`controlMediaHost`](https://www.mediasfu.com/angular/classes/controlMediaHost) | Triggered when media control is hosted. |
|
|
1966
|
+
| [`meetingEnded`](https://www.mediasfu.com/angular/classes/meetingEnded) | Triggered when the meeting ends. |
|
|
1967
|
+
| [`disconnectUserSelf`](https://www.mediasfu.com/angular/classes/disconnectUserSelf) | Triggered when a user disconnects. |
|
|
1968
|
+
| [`receiveMessage`](https://www.mediasfu.com/angular/classes/receiveMessage) | Triggered when a message is received. |
|
|
1969
|
+
| [`meetingTimeRemaining`](https://www.mediasfu.com/angular/classes/meetingTimeRemaining) | Triggered when meeting time remaining is received. |
|
|
1970
|
+
| [`meetingStillThere`](https://www.mediasfu.com/angular/classes/meetingStillThere) | Triggered when the meeting is still active. |
|
|
1971
|
+
| [`startRecords`](https://www.mediasfu.com/angular/classes/startRecords) | Triggered when recording starts. |
|
|
1972
|
+
| [`reInitiateRecording`](https://www.mediasfu.com/angular/classes/reInitiateRecording) | Triggered when recording needs to be re-initiated. |
|
|
1973
|
+
| [`getDomains`](https://www.mediasfu.com/angular/classes/getDomains) | Triggered when domains are received. |
|
|
1974
|
+
| [`updateConsumingDomains`](https://www.mediasfu.com/angular/classes/updateConsumingDomains) | Triggered when consuming domains are updated. |
|
|
1975
|
+
| [`recordingNotice`](https://www.mediasfu.com/angular/classes/recordingNotice) | Triggered when a recording notice is received. |
|
|
1976
|
+
| [`timeLeftRecording`](https://www.mediasfu.com/angular/classes/timeLeftRecording) | Triggered when time left for recording is received. |
|
|
1977
|
+
| [`stoppedRecording`](https://www.mediasfu.com/angular/classes/stoppedRecording) | Triggered when recording stops. |
|
|
1978
|
+
| [`hostRequestResponse`](https://www.mediasfu.com/angular/classes/hostRequestResponse) | Triggered when the host request response is received. |
|
|
1979
|
+
| [`allMembers`](https://www.mediasfu.com/angular/classes/allMembers) | Triggered when information about all members is received. |
|
|
1980
|
+
| [`allMembersRest`](https://www.mediasfu.com/angular/classes/allMembersRest) | Triggered when information about all members is received (rest of the members). |
|
|
1981
|
+
| [`disconnect`](https://www.mediasfu.com/angular/classes/disconnect) | Triggered when a disconnect event occurs. |
|
|
1982
|
+
| [`pollUpdated`](https://www.mediasfu.com/angular/classes/pollUpdated) | Triggered when a poll is updated. |
|
|
1983
|
+
| [`breakoutRoomUpdated`](https://www.mediasfu.com/angular/classes/breakoutRoomUpdated) | Triggered when a breakout room is updated.
|
|
1984
|
+
| [`whiteboardUpdated`](https://www.mediasfu.com/angular/classes/whiteboardUpdated) | Handles updated whiteboard data.
|
|
1985
|
+
| [`whiteboardAction`](https://www.mediasfu.com/angular/classes/whiteboardAction) | Handles whiteboard actions. |
|
|
1986
|
+
|
|
1987
|
+
#### Sample Usage
|
|
1886
1988
|
|
|
1887
1989
|
```javascript
|
|
1888
1990
|
// Example usage of provided socket event handling functions
|