mediasfu-shared 1.0.6 → 1.1.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/HEADLESS_GUIDE.md +156 -0
- package/README.md +113 -62
- package/dist/ProducerClient/producerClientEmits/createDeviceClient.d.ts +23 -0
- package/dist/ProducerClient/producerClientEmits/createDeviceClient.d.ts.map +1 -0
- package/dist/ProducerClient/producerClientEmits/joinRoomClient.d.ts +22 -0
- package/dist/ProducerClient/producerClientEmits/joinRoomClient.d.ts.map +1 -0
- package/dist/ProducerClient/producerClientEmits/updateRoomParametersClient.d.ts +85 -0
- package/dist/ProducerClient/producerClientEmits/updateRoomParametersClient.d.ts.map +1 -0
- package/dist/consumers/addVideosGrid.d.ts +10 -0
- package/dist/consumers/addVideosGrid.d.ts.map +1 -0
- package/dist/consumers/autoAdjust.d.ts +41 -0
- package/dist/consumers/autoAdjust.d.ts.map +1 -0
- package/dist/consumers/calculateRowsAndColumns.d.ts +24 -0
- package/dist/consumers/calculateRowsAndColumns.d.ts.map +1 -0
- package/dist/consumers/changeVids.d.ts +252 -0
- package/dist/consumers/changeVids.d.ts.map +1 -0
- package/dist/consumers/checkGrid.d.ts +42 -0
- package/dist/consumers/checkGrid.d.ts.map +1 -0
- package/dist/consumers/checkPermission.d.ts +42 -0
- package/dist/consumers/checkPermission.d.ts.map +1 -0
- package/dist/consumers/checkScreenShare.d.ts +59 -0
- package/dist/consumers/checkScreenShare.d.ts.map +1 -0
- package/dist/consumers/closeAndResize.d.ts +157 -0
- package/dist/consumers/closeAndResize.d.ts.map +1 -0
- package/dist/consumers/compareActiveNames.d.ts +50 -0
- package/dist/consumers/compareActiveNames.d.ts.map +1 -0
- package/dist/consumers/compareScreenStates.d.ts +55 -0
- package/dist/consumers/compareScreenStates.d.ts.map +1 -0
- package/dist/consumers/connectIps.d.ts +66 -0
- package/dist/consumers/connectIps.d.ts.map +1 -0
- package/dist/consumers/connectLocalIps.d.ts +52 -0
- package/dist/consumers/connectLocalIps.d.ts.map +1 -0
- package/dist/consumers/connectRecvTransport.d.ts +64 -0
- package/dist/consumers/connectRecvTransport.d.ts.map +1 -0
- package/dist/consumers/connectSendTransport.d.ts +75 -0
- package/dist/consumers/connectSendTransport.d.ts.map +1 -0
- package/dist/consumers/connectSendTransportAudio.d.ts +62 -0
- package/dist/consumers/connectSendTransportAudio.d.ts.map +1 -0
- package/dist/consumers/connectSendTransportScreen.d.ts +72 -0
- package/dist/consumers/connectSendTransportScreen.d.ts.map +1 -0
- package/dist/consumers/connectSendTransportVideo.d.ts +75 -0
- package/dist/consumers/connectSendTransportVideo.d.ts.map +1 -0
- package/dist/consumers/consumerResume.d.ts +16 -0
- package/dist/consumers/consumerResume.d.ts.map +1 -0
- package/dist/consumers/controlMedia.d.ts +61 -0
- package/dist/consumers/controlMedia.d.ts.map +1 -0
- package/dist/consumers/createSendTransport.d.ts +80 -0
- package/dist/consumers/createSendTransport.d.ts.map +1 -0
- package/dist/consumers/disconnectSendTransportAudio.d.ts +79 -0
- package/dist/consumers/disconnectSendTransportAudio.d.ts.map +1 -0
- package/dist/consumers/disconnectSendTransportScreen.d.ts +61 -0
- package/dist/consumers/disconnectSendTransportScreen.d.ts.map +1 -0
- package/dist/consumers/disconnectSendTransportVideo.d.ts +72 -0
- package/dist/consumers/disconnectSendTransportVideo.d.ts.map +1 -0
- package/dist/consumers/dispStreams.d.ts +189 -0
- package/dist/consumers/dispStreams.d.ts.map +1 -0
- package/dist/consumers/frameworkConsumerContract.d.ts +2 -0
- package/dist/consumers/frameworkConsumerContract.d.ts.map +1 -0
- package/dist/consumers/generatePageContent.d.ts +68 -0
- package/dist/consumers/generatePageContent.d.ts.map +1 -0
- package/dist/consumers/getEstimate.d.ts +62 -0
- package/dist/consumers/getEstimate.d.ts.map +1 -0
- package/dist/consumers/getPipedProducersAlt.d.ts +62 -0
- package/dist/consumers/getPipedProducersAlt.d.ts.map +1 -0
- package/dist/consumers/getProducersPiped.d.ts +49 -0
- package/dist/consumers/getProducersPiped.d.ts.map +1 -0
- package/dist/consumers/getVideos.d.ts +49 -0
- package/dist/consumers/getVideos.d.ts.map +1 -0
- package/dist/consumers/gridLayout/addVideosGrid.engine.d.ts +19 -0
- package/dist/consumers/gridLayout/addVideosGrid.engine.d.ts.map +1 -0
- package/dist/consumers/gridLayout/prepopulateUserMedia.engine.d.ts +138 -0
- package/dist/consumers/gridLayout/prepopulateUserMedia.engine.d.ts.map +1 -0
- package/dist/consumers/mixStreams.d.ts +37 -0
- package/dist/consumers/mixStreams.d.ts.map +1 -0
- package/dist/consumers/onScreenChanges.d.ts +62 -0
- package/dist/consumers/onScreenChanges.d.ts.map +1 -0
- package/dist/consumers/prepopulateUserMedia.d.ts +10 -0
- package/dist/consumers/prepopulateUserMedia.d.ts.map +1 -0
- package/dist/consumers/processConsumerTransports.d.ts +73 -0
- package/dist/consumers/processConsumerTransports.d.ts.map +1 -0
- package/dist/consumers/processConsumerTransportsAudio.d.ts +57 -0
- package/dist/consumers/processConsumerTransportsAudio.d.ts.map +1 -0
- package/dist/consumers/rePort.d.ts +63 -0
- package/dist/consumers/rePort.d.ts.map +1 -0
- package/dist/consumers/reUpdateInter.d.ts +142 -0
- package/dist/consumers/reUpdateInter.d.ts.map +1 -0
- package/dist/consumers/readjust.d.ts +68 -0
- package/dist/consumers/readjust.d.ts.map +1 -0
- package/dist/consumers/receiveAllPipedTransports.d.ts +44 -0
- package/dist/consumers/receiveAllPipedTransports.d.ts.map +1 -0
- package/dist/consumers/receiveRoomMessages.d.ts +31 -0
- package/dist/consumers/receiveRoomMessages.d.ts.map +1 -0
- package/dist/consumers/reorderStreams.d.ts +98 -0
- package/dist/consumers/reorderStreams.d.ts.map +1 -0
- package/dist/consumers/requestScreenShare.d.ts +47 -0
- package/dist/consumers/requestScreenShare.d.ts.map +1 -0
- package/dist/consumers/resumePauseAudioStreams.d.ts +85 -0
- package/dist/consumers/resumePauseAudioStreams.d.ts.map +1 -0
- package/dist/consumers/resumePauseStreams.d.ts +68 -0
- package/dist/consumers/resumePauseStreams.d.ts.map +1 -0
- package/dist/consumers/resumeSendTransportAudio.d.ts +65 -0
- package/dist/consumers/resumeSendTransportAudio.d.ts.map +1 -0
- package/dist/consumers/signalNewConsumerTransport.d.ts +59 -0
- package/dist/consumers/signalNewConsumerTransport.d.ts.map +1 -0
- package/dist/consumers/socketReceiveMethods/joinConsumeRoom.d.ts +76 -0
- package/dist/consumers/socketReceiveMethods/joinConsumeRoom.d.ts.map +1 -0
- package/dist/consumers/socketReceiveMethods/newPipeProducer.d.ts +119 -0
- package/dist/consumers/socketReceiveMethods/newPipeProducer.d.ts.map +1 -0
- package/dist/consumers/socketReceiveMethods/producerClosed.d.ts +53 -0
- package/dist/consumers/socketReceiveMethods/producerClosed.d.ts.map +1 -0
- package/dist/consumers/startShareScreen.d.ts +58 -0
- package/dist/consumers/startShareScreen.d.ts.map +1 -0
- package/dist/consumers/stopShareScreen.d.ts +127 -0
- package/dist/consumers/stopShareScreen.d.ts.map +1 -0
- package/dist/consumers/streamSuccessAudio.d.ts +149 -0
- package/dist/consumers/streamSuccessAudio.d.ts.map +1 -0
- package/dist/consumers/streamSuccessAudioSwitch.d.ts +131 -0
- package/dist/consumers/streamSuccessAudioSwitch.d.ts.map +1 -0
- package/dist/consumers/streamSuccessScreen.d.ts +109 -0
- package/dist/consumers/streamSuccessScreen.d.ts.map +1 -0
- package/dist/consumers/streamSuccessVideo.d.ts +160 -0
- package/dist/consumers/streamSuccessVideo.d.ts.map +1 -0
- package/dist/consumers/switchUserAudio.d.ts +56 -0
- package/dist/consumers/switchUserAudio.d.ts.map +1 -0
- package/dist/consumers/switchUserVideo.d.ts +77 -0
- package/dist/consumers/switchUserVideo.d.ts.map +1 -0
- package/dist/consumers/switchUserVideoAlt.d.ts +69 -0
- package/dist/consumers/switchUserVideoAlt.d.ts.map +1 -0
- package/dist/consumers/translationConsumerSwitch.d.ts +67 -0
- package/dist/consumers/translationConsumerSwitch.d.ts.map +1 -0
- package/dist/consumers/trigger.d.ts +71 -0
- package/dist/consumers/trigger.d.ts.map +1 -0
- package/dist/consumers/updateMiniCardsGrid.d.ts +65 -0
- package/dist/consumers/updateMiniCardsGrid.d.ts.map +1 -0
- package/dist/consumers/updateParticipantAudioDecibels.d.ts +31 -0
- package/dist/consumers/updateParticipantAudioDecibels.d.ts.map +1 -0
- package/dist/getParticipantMedia-D9ChmEqq.js +15265 -0
- package/dist/getParticipantMedia-D9ChmEqq.js.map +1 -0
- package/dist/getParticipantMedia-DWvIhPPY.cjs +15281 -0
- package/dist/getParticipantMedia-DWvIhPPY.cjs.map +1 -0
- package/dist/index.cjs +2677 -13249
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +191 -11233
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2668 -13222
- package/dist/index.js.map +1 -1
- package/dist/index.native.cjs +346 -0
- package/dist/index.native.cjs.map +1 -0
- package/dist/index.native.d.ts +204 -0
- package/dist/index.native.d.ts.map +1 -0
- package/dist/index.native.js +346 -0
- package/dist/index.native.js.map +1 -0
- package/dist/methods/background/launchBackground.d.ts +10 -0
- package/dist/methods/background/launchBackground.d.ts.map +1 -0
- package/dist/methods/breakoutRooms/breakoutRoomUpdated.d.ts +67 -0
- package/dist/methods/breakoutRooms/breakoutRoomUpdated.d.ts.map +1 -0
- package/dist/methods/breakoutRooms/handleStartBreakout.d.ts +42 -0
- package/dist/methods/breakoutRooms/handleStartBreakout.d.ts.map +1 -0
- package/dist/methods/breakoutRooms/handleStopBreakout.d.ts +33 -0
- package/dist/methods/breakoutRooms/handleStopBreakout.d.ts.map +1 -0
- package/dist/methods/breakoutRooms/index.d.ts +5 -0
- package/dist/methods/breakoutRooms/index.d.ts.map +1 -0
- package/dist/methods/breakoutRooms/launchBreakoutRooms.d.ts +25 -0
- package/dist/methods/breakoutRooms/launchBreakoutRooms.d.ts.map +1 -0
- package/dist/methods/coHost/launchCoHost.d.ts +25 -0
- package/dist/methods/coHost/launchCoHost.d.ts.map +1 -0
- package/dist/methods/coHostMethods/index.d.ts +3 -0
- package/dist/methods/coHostMethods/index.d.ts.map +1 -0
- package/dist/methods/coHostMethods/modifyCoHostSettings.d.ts +49 -0
- package/dist/methods/coHostMethods/modifyCoHostSettings.d.ts.map +1 -0
- package/dist/methods/displaySettings/index.d.ts +2 -0
- package/dist/methods/displaySettings/index.d.ts.map +1 -0
- package/dist/methods/displaySettings/launchDisplaySettings.d.ts +25 -0
- package/dist/methods/displaySettings/launchDisplaySettings.d.ts.map +1 -0
- package/dist/methods/displaySettings/modifyDisplaySettings.d.ts +106 -0
- package/dist/methods/displaySettings/modifyDisplaySettings.d.ts.map +1 -0
- package/dist/methods/exit/confirmExit.d.ts +38 -0
- package/dist/methods/exit/confirmExit.d.ts.map +1 -0
- package/dist/methods/exit/index.d.ts +3 -0
- package/dist/methods/exit/index.d.ts.map +1 -0
- package/dist/methods/exit/launchConfirmExit.d.ts +23 -0
- package/dist/methods/exit/launchConfirmExit.d.ts.map +1 -0
- package/dist/methods/index.d.ts +66 -0
- package/dist/methods/index.d.ts.map +1 -0
- package/dist/methods/mediaSettings/launchMediaSettings.d.ts +38 -0
- package/dist/methods/mediaSettings/launchMediaSettings.d.ts.map +1 -0
- package/dist/methods/menu/launchMenuModal.d.ts +22 -0
- package/dist/methods/menu/launchMenuModal.d.ts.map +1 -0
- package/dist/methods/message/index.d.ts +2 -0
- package/dist/methods/message/index.d.ts.map +1 -0
- package/dist/methods/message/launchMessages.d.ts +24 -0
- package/dist/methods/message/launchMessages.d.ts.map +1 -0
- package/dist/methods/message/sendMessage.d.ts +63 -0
- package/dist/methods/message/sendMessage.d.ts.map +1 -0
- package/dist/methods/panelists/focusPanelists.d.ts +24 -0
- package/dist/methods/panelists/focusPanelists.d.ts.map +1 -0
- package/dist/methods/panelists/index.d.ts +4 -0
- package/dist/methods/panelists/index.d.ts.map +1 -0
- package/dist/methods/panelists/launchPanelists.d.ts +7 -0
- package/dist/methods/panelists/launchPanelists.d.ts.map +1 -0
- package/dist/methods/panelists/updatePanelists.d.ts +35 -0
- package/dist/methods/panelists/updatePanelists.d.ts.map +1 -0
- package/dist/methods/participants/index.d.ts +4 -0
- package/dist/methods/participants/index.d.ts.map +1 -0
- package/dist/methods/participants/launchParticipants.d.ts +22 -0
- package/dist/methods/participants/launchParticipants.d.ts.map +1 -0
- package/dist/methods/participants/messageParticipants.d.ts +43 -0
- package/dist/methods/participants/messageParticipants.d.ts.map +1 -0
- package/dist/methods/participants/muteParticipants.d.ts +41 -0
- package/dist/methods/participants/muteParticipants.d.ts.map +1 -0
- package/dist/methods/participants/removeParticipants.d.ts +47 -0
- package/dist/methods/participants/removeParticipants.d.ts.map +1 -0
- package/dist/methods/permissions/index.d.ts +4 -0
- package/dist/methods/permissions/index.d.ts.map +1 -0
- package/dist/methods/permissions/launchPermissions.d.ts +7 -0
- package/dist/methods/permissions/launchPermissions.d.ts.map +1 -0
- package/dist/methods/permissions/updateParticipantPermission.d.ts +25 -0
- package/dist/methods/permissions/updateParticipantPermission.d.ts.map +1 -0
- package/dist/methods/permissions/updatePermissionConfig.d.ts +22 -0
- package/dist/methods/permissions/updatePermissionConfig.d.ts.map +1 -0
- package/dist/methods/polls/handleCreatePoll.d.ts +39 -0
- package/dist/methods/polls/handleCreatePoll.d.ts.map +1 -0
- package/dist/methods/polls/handleEndPoll.d.ts +34 -0
- package/dist/methods/polls/handleEndPoll.d.ts.map +1 -0
- package/dist/methods/polls/handleVotePoll.d.ts +39 -0
- package/dist/methods/polls/handleVotePoll.d.ts.map +1 -0
- package/dist/methods/polls/index.d.ts +4 -0
- package/dist/methods/polls/index.d.ts.map +1 -0
- package/dist/methods/polls/launchPoll.d.ts +22 -0
- package/dist/methods/polls/launchPoll.d.ts.map +1 -0
- package/dist/methods/polls/pollUpdated.d.ts +38 -0
- package/dist/methods/polls/pollUpdated.d.ts.map +1 -0
- package/dist/methods/prejoin/handleCreateRoom.d.ts +77 -0
- package/dist/methods/prejoin/handleCreateRoom.d.ts.map +1 -0
- package/dist/methods/prejoin/handleJoinRoom.d.ts +56 -0
- package/dist/methods/prejoin/handleJoinRoom.d.ts.map +1 -0
- package/dist/methods/prejoin/index.d.ts +5 -0
- package/dist/methods/prejoin/index.d.ts.map +1 -0
- package/dist/methods/recording/checkPauseState.d.ts +34 -0
- package/dist/methods/recording/checkPauseState.d.ts.map +1 -0
- package/dist/methods/recording/checkResumeState.d.ts +30 -0
- package/dist/methods/recording/checkResumeState.d.ts.map +1 -0
- package/dist/methods/recording/confirmRecording.d.ts +46 -0
- package/dist/methods/recording/confirmRecording.d.ts.map +1 -0
- package/dist/methods/recording/launchRecording.d.ts +56 -0
- package/dist/methods/recording/launchRecording.d.ts.map +1 -0
- package/dist/methods/recording/recordPauseTimer.d.ts +31 -0
- package/dist/methods/recording/recordPauseTimer.d.ts.map +1 -0
- package/dist/methods/recording/recordResumeTimer.d.ts +29 -0
- package/dist/methods/recording/recordResumeTimer.d.ts.map +1 -0
- package/dist/methods/recording/recordStartTimer.d.ts +45 -0
- package/dist/methods/recording/recordStartTimer.d.ts.map +1 -0
- package/dist/methods/recording/recordUpdateTimer.d.ts +29 -0
- package/dist/methods/recording/recordUpdateTimer.d.ts.map +1 -0
- package/dist/methods/recording/startRecording.d.ts +122 -0
- package/dist/methods/recording/startRecording.d.ts.map +1 -0
- package/dist/methods/recording/stopRecording.d.ts +36 -0
- package/dist/methods/recording/stopRecording.d.ts.map +1 -0
- package/dist/methods/recording/timeLeftRecording.d.ts +13 -0
- package/dist/methods/recording/timeLeftRecording.d.ts.map +1 -0
- package/dist/methods/recording/updateRecording.d.ts +49 -0
- package/dist/methods/recording/updateRecording.d.ts.map +1 -0
- package/dist/methods/requests/hostRequestResponse.d.ts +33 -0
- package/dist/methods/requests/hostRequestResponse.d.ts.map +1 -0
- package/dist/methods/requests/index.d.ts +2 -0
- package/dist/methods/requests/index.d.ts.map +1 -0
- package/dist/methods/requests/launchRequests.d.ts +22 -0
- package/dist/methods/requests/launchRequests.d.ts.map +1 -0
- package/dist/methods/requests/respondToRequests.d.ts +38 -0
- package/dist/methods/requests/respondToRequests.d.ts.map +1 -0
- package/dist/methods/settings/index.d.ts +3 -0
- package/dist/methods/settings/index.d.ts.map +1 -0
- package/dist/methods/settings/launchSettings.d.ts +22 -0
- package/dist/methods/settings/launchSettings.d.ts.map +1 -0
- package/dist/methods/settings/modifySettings.d.ts +45 -0
- package/dist/methods/settings/modifySettings.d.ts.map +1 -0
- package/dist/methods/socketReceive/allMembers.d.ts +117 -0
- package/dist/methods/socketReceive/allMembers.d.ts.map +1 -0
- package/dist/methods/socketReceive/allMembersRest.d.ts +122 -0
- package/dist/methods/socketReceive/allMembersRest.d.ts.map +1 -0
- package/dist/methods/socketReceive/allWaitingRoomMembers.d.ts +24 -0
- package/dist/methods/socketReceive/allWaitingRoomMembers.d.ts.map +1 -0
- package/dist/methods/socketReceive/banParticipant.d.ts +44 -0
- package/dist/methods/socketReceive/banParticipant.d.ts.map +1 -0
- package/dist/methods/socketReceive/controlMediaHost.d.ts +62 -0
- package/dist/methods/socketReceive/controlMediaHost.d.ts.map +1 -0
- package/dist/methods/socketReceive/disconnect.d.ts +24 -0
- package/dist/methods/socketReceive/disconnect.d.ts.map +1 -0
- package/dist/methods/socketReceive/disconnectUserSelf.d.ts +29 -0
- package/dist/methods/socketReceive/disconnectUserSelf.d.ts.map +1 -0
- package/dist/methods/socketReceive/getDomains.d.ts +48 -0
- package/dist/methods/socketReceive/getDomains.d.ts.map +1 -0
- package/dist/methods/socketReceive/meetingEnded.d.ts +27 -0
- package/dist/methods/socketReceive/meetingEnded.d.ts.map +1 -0
- package/dist/methods/socketReceive/meetingStillThere.d.ts +19 -0
- package/dist/methods/socketReceive/meetingStillThere.d.ts.map +1 -0
- package/dist/methods/socketReceive/panelistReceiveMethods.d.ts +66 -0
- package/dist/methods/socketReceive/panelistReceiveMethods.d.ts.map +1 -0
- package/dist/methods/socketReceive/participantRequested.d.ts +28 -0
- package/dist/methods/socketReceive/participantRequested.d.ts.map +1 -0
- package/dist/methods/socketReceive/permissionReceiveMethods.d.ts +23 -0
- package/dist/methods/socketReceive/permissionReceiveMethods.d.ts.map +1 -0
- package/dist/methods/socketReceive/personJoined.d.ts +24 -0
- package/dist/methods/socketReceive/personJoined.d.ts.map +1 -0
- package/dist/methods/socketReceive/producerMediaClosed.d.ts +66 -0
- package/dist/methods/socketReceive/producerMediaClosed.d.ts.map +1 -0
- package/dist/methods/socketReceive/producerMediaPaused.d.ts +70 -0
- package/dist/methods/socketReceive/producerMediaPaused.d.ts.map +1 -0
- package/dist/methods/socketReceive/producerMediaResumed.d.ts +53 -0
- package/dist/methods/socketReceive/producerMediaResumed.d.ts.map +1 -0
- package/dist/methods/socketReceive/reInitiateRecording.d.ts +33 -0
- package/dist/methods/socketReceive/reInitiateRecording.d.ts.map +1 -0
- package/dist/methods/socketReceive/receiveMessage.d.ts +36 -0
- package/dist/methods/socketReceive/receiveMessage.d.ts.map +1 -0
- package/dist/methods/socketReceive/recordingNotice.d.ts +98 -0
- package/dist/methods/socketReceive/recordingNotice.d.ts.map +1 -0
- package/dist/methods/socketReceive/roomRecordParams.d.ts +60 -0
- package/dist/methods/socketReceive/roomRecordParams.d.ts.map +1 -0
- package/dist/methods/socketReceive/screenProducerId.d.ts +36 -0
- package/dist/methods/socketReceive/screenProducerId.d.ts.map +1 -0
- package/dist/methods/socketReceive/startRecords.d.ts +31 -0
- package/dist/methods/socketReceive/startRecords.d.ts.map +1 -0
- package/dist/methods/socketReceive/stoppedRecording.d.ts +24 -0
- package/dist/methods/socketReceive/stoppedRecording.d.ts.map +1 -0
- package/dist/methods/socketReceive/translationReceiveMethods.d.ts +227 -0
- package/dist/methods/socketReceive/translationReceiveMethods.d.ts.map +1 -0
- package/dist/methods/socketReceive/updateConsumingDomains.d.ts +60 -0
- package/dist/methods/socketReceive/updateConsumingDomains.d.ts.map +1 -0
- package/dist/methods/socketReceive/updateMediaSettings.d.ts +28 -0
- package/dist/methods/socketReceive/updateMediaSettings.d.ts.map +1 -0
- package/dist/methods/socketReceive/updatedCoHost.d.ts +38 -0
- package/dist/methods/socketReceive/updatedCoHost.d.ts.map +1 -0
- package/dist/methods/socketReceive/userWaiting.d.ts +30 -0
- package/dist/methods/socketReceive/userWaiting.d.ts.map +1 -0
- package/dist/methods/stream/clickAudio.d.ts +71 -0
- package/dist/methods/stream/clickAudio.d.ts.map +1 -0
- package/dist/methods/stream/clickChat.d.ts +11 -0
- package/dist/methods/stream/clickChat.d.ts.map +1 -0
- package/dist/methods/stream/clickScreenShare.d.ts +45 -0
- package/dist/methods/stream/clickScreenShare.d.ts.map +1 -0
- package/dist/methods/stream/clickVideo.d.ts +101 -0
- package/dist/methods/stream/clickVideo.d.ts.map +1 -0
- package/dist/methods/stream/index.d.ts +5 -0
- package/dist/methods/stream/index.d.ts.map +1 -0
- package/dist/methods/stream/switchAudio.d.ts +40 -0
- package/dist/methods/stream/switchAudio.d.ts.map +1 -0
- package/dist/methods/stream/switchVideo.d.ts +56 -0
- package/dist/methods/stream/switchVideo.d.ts.map +1 -0
- package/dist/methods/stream/switchVideoAlt.d.ts +55 -0
- package/dist/methods/stream/switchVideoAlt.d.ts.map +1 -0
- package/dist/methods/utils/SoundPlayer.d.ts +19 -0
- package/dist/methods/utils/SoundPlayer.d.ts.map +1 -0
- package/dist/methods/utils/checkLimitsAndMakeRequest.d.ts +30 -0
- package/dist/methods/utils/checkLimitsAndMakeRequest.d.ts.map +1 -0
- package/dist/methods/utils/createResponseJoinRoom.d.ts +24 -0
- package/dist/methods/utils/createResponseJoinRoom.d.ts.map +1 -0
- package/dist/methods/utils/createRoomOnMediaSFU.d.ts +28 -0
- package/dist/methods/utils/createRoomOnMediaSFU.d.ts.map +1 -0
- package/dist/methods/utils/formatNumber.d.ts +21 -0
- package/dist/methods/utils/formatNumber.d.ts.map +1 -0
- package/dist/methods/utils/generateRandomMessages.d.ts +11 -0
- package/dist/methods/utils/generateRandomMessages.d.ts.map +1 -0
- package/dist/methods/utils/generateRandomParticipants.d.ts +10 -0
- package/dist/methods/utils/generateRandomParticipants.d.ts.map +1 -0
- package/dist/methods/utils/generateRandomPolls.d.ts +7 -0
- package/dist/methods/utils/generateRandomPolls.d.ts.map +1 -0
- package/dist/methods/utils/generateRandomRequestList.d.ts +10 -0
- package/dist/methods/utils/generateRandomRequestList.d.ts.map +1 -0
- package/dist/methods/utils/generateRandomWaitingRoomList.d.ts +4 -0
- package/dist/methods/utils/generateRandomWaitingRoomList.d.ts.map +1 -0
- package/dist/methods/utils/getModalPosition.d.ts +7 -0
- package/dist/methods/utils/getModalPosition.d.ts.map +1 -0
- package/dist/methods/utils/getOverlayPosition.d.ts +22 -0
- package/dist/methods/utils/getOverlayPosition.d.ts.map +1 -0
- package/dist/methods/utils/getParticipantMedia.d.ts +55 -0
- package/dist/methods/utils/getParticipantMedia.d.ts.map +1 -0
- package/dist/methods/utils/headless/getCurrentParams.d.ts +27 -0
- package/dist/methods/utils/headless/getCurrentParams.d.ts.map +1 -0
- package/dist/methods/utils/headless/getMediaStreams.d.ts +96 -0
- package/dist/methods/utils/headless/getMediaStreams.d.ts.map +1 -0
- package/dist/methods/utils/headless/getRoomReadiness.d.ts +25 -0
- package/dist/methods/utils/headless/getRoomReadiness.d.ts.map +1 -0
- package/dist/methods/utils/headless/headlessTypes.d.ts +89 -0
- package/dist/methods/utils/headless/headlessTypes.d.ts.map +1 -0
- package/dist/methods/utils/headless/index.d.ts +29 -0
- package/dist/methods/utils/headless/index.d.ts.map +1 -0
- package/dist/methods/utils/headless/mediaPermissions.d.ts +53 -0
- package/dist/methods/utils/headless/mediaPermissions.d.ts.map +1 -0
- package/dist/methods/utils/headless/mediaProduction.d.ts +177 -0
- package/dist/methods/utils/headless/mediaProduction.d.ts.map +1 -0
- package/dist/methods/utils/headless/moderation.d.ts +157 -0
- package/dist/methods/utils/headless/moderation.d.ts.map +1 -0
- package/dist/methods/utils/headless/participantState.d.ts +128 -0
- package/dist/methods/utils/headless/participantState.d.ts.map +1 -0
- package/dist/methods/utils/headless/playback.d.ts +106 -0
- package/dist/methods/utils/headless/playback.d.ts.map +1 -0
- package/dist/methods/utils/headless/roomActions.d.ts +88 -0
- package/dist/methods/utils/headless/roomActions.d.ts.map +1 -0
- package/dist/methods/utils/headless/sessionControls.d.ts +159 -0
- package/dist/methods/utils/headless/sessionControls.d.ts.map +1 -0
- package/dist/methods/utils/headless/sessionExtras.d.ts +291 -0
- package/dist/methods/utils/headless/sessionExtras.d.ts.map +1 -0
- package/dist/methods/utils/headless/sessionFeatures.d.ts +159 -0
- package/dist/methods/utils/headless/sessionFeatures.d.ts.map +1 -0
- package/dist/methods/utils/headless/viewerSession.d.ts +125 -0
- package/dist/methods/utils/headless/viewerSession.d.ts.map +1 -0
- package/dist/methods/utils/headless/virtualBackground.d.ts +72 -0
- package/dist/methods/utils/headless/virtualBackground.d.ts.map +1 -0
- package/dist/methods/utils/initialValuesState.d.ts +388 -0
- package/dist/methods/utils/initialValuesState.d.ts.map +1 -0
- package/dist/methods/utils/joinRoomOnMediaSFU.d.ts +56 -0
- package/dist/methods/utils/joinRoomOnMediaSFU.d.ts.map +1 -0
- package/dist/methods/utils/liveSubtitle.d.ts +36 -0
- package/dist/methods/utils/liveSubtitle.d.ts.map +1 -0
- package/dist/methods/utils/meetingTimeRemaining.d.ts +15 -0
- package/dist/methods/utils/meetingTimeRemaining.d.ts.map +1 -0
- package/dist/methods/utils/meetingTimer/startMeetingProgressTimer.d.ts +35 -0
- package/dist/methods/utils/meetingTimer/startMeetingProgressTimer.d.ts.map +1 -0
- package/dist/methods/utils/producer/aParams.d.ts +3 -0
- package/dist/methods/utils/producer/aParams.d.ts.map +1 -0
- package/dist/methods/utils/producer/hParams.d.ts +3 -0
- package/dist/methods/utils/producer/hParams.d.ts.map +1 -0
- package/dist/methods/utils/producer/screenParams.d.ts +3 -0
- package/dist/methods/utils/producer/screenParams.d.ts.map +1 -0
- package/dist/methods/utils/producer/vParams.d.ts +3 -0
- package/dist/methods/utils/producer/vParams.d.ts.map +1 -0
- package/dist/methods/utils/producer/videoCaptureConstraints.d.ts +145 -0
- package/dist/methods/utils/producer/videoCaptureConstraints.d.ts.map +1 -0
- package/dist/methods/utils/resolveMediaSFURoomApi.d.ts +4 -0
- package/dist/methods/utils/resolveMediaSFURoomApi.d.ts.map +1 -0
- package/dist/methods/utils/sleep.d.ts +21 -0
- package/dist/methods/utils/sleep.d.ts.map +1 -0
- package/dist/methods/utils/translationLanguages.d.ts +100 -0
- package/dist/methods/utils/translationLanguages.d.ts.map +1 -0
- package/dist/methods/utils/validateAlphanumeric.d.ts +21 -0
- package/dist/methods/utils/validateAlphanumeric.d.ts.map +1 -0
- package/dist/methods/utils/webrtc.d.ts +18 -0
- package/dist/methods/utils/webrtc.d.ts.map +1 -0
- package/dist/methods/waiting/index.d.ts +2 -0
- package/dist/methods/waiting/index.d.ts.map +1 -0
- package/dist/methods/waiting/launchWaiting.d.ts +23 -0
- package/dist/methods/waiting/launchWaiting.d.ts.map +1 -0
- package/dist/methods/waiting/respondToWaiting.d.ts +40 -0
- package/dist/methods/waiting/respondToWaiting.d.ts.map +1 -0
- package/dist/methods/welcome/handleWelcomeRequest.d.ts +47 -0
- package/dist/methods/welcome/handleWelcomeRequest.d.ts.map +1 -0
- package/dist/methods/welcome/index.d.ts +3 -0
- package/dist/methods/welcome/index.d.ts.map +1 -0
- package/dist/methods/whiteboard/captureCanvasStream.d.ts +38 -0
- package/dist/methods/whiteboard/captureCanvasStream.d.ts.map +1 -0
- package/dist/methods/whiteboard/handleStartWhiteboard.d.ts +31 -0
- package/dist/methods/whiteboard/handleStartWhiteboard.d.ts.map +1 -0
- package/dist/methods/whiteboard/handleStopWhiteboard.d.ts +25 -0
- package/dist/methods/whiteboard/handleStopWhiteboard.d.ts.map +1 -0
- package/dist/methods/whiteboard/index.d.ts +5 -0
- package/dist/methods/whiteboard/index.d.ts.map +1 -0
- package/dist/methods/whiteboard/launchConfigureWhiteboard.d.ts +23 -0
- package/dist/methods/whiteboard/launchConfigureWhiteboard.d.ts.map +1 -0
- package/dist/producers/producerEmits/joinConRoom.d.ts +54 -0
- package/dist/producers/producerEmits/joinConRoom.d.ts.map +1 -0
- package/dist/producers/producerEmits/joinLocalRoom.d.ts +30 -0
- package/dist/producers/producerEmits/joinLocalRoom.d.ts.map +1 -0
- package/dist/producers/producerEmits/joinRoom.d.ts +35 -0
- package/dist/producers/producerEmits/joinRoom.d.ts.map +1 -0
- package/dist/readme/mediasfu-platform-capabilities.webp +0 -0
- package/dist/sockets/SocketManager.d.ts +102 -0
- package/dist/sockets/SocketManager.d.ts.map +1 -0
- package/dist/types/shared-base-types.d.ts +656 -0
- package/dist/types/shared-base-types.d.ts.map +1 -0
- package/dist/types/types.d.ts +124 -0
- package/dist/types/types.d.ts.map +1 -0
- package/package.json +106 -99
- package/src/consumers/connectSendTransportScreen.ts +4 -1
- package/src/consumers/createSendTransport.ts +33 -28
- package/src/consumers/streamSuccessVideo.ts +34 -5
- package/src/index.native.ts +24 -1
- package/src/index.ts +5 -0
- package/src/methods/exit/confirmExit.ts +11 -4
- package/src/methods/utils/getParticipantMedia.ts +112 -0
- package/src/methods/utils/headless/getCurrentParams.ts +44 -0
- package/src/methods/utils/headless/getMediaStreams.ts +256 -0
- package/src/methods/utils/headless/getRoomReadiness.ts +49 -0
- package/src/methods/utils/headless/headlessTypes.ts +102 -0
- package/src/methods/utils/headless/index.ts +28 -0
- package/src/methods/utils/headless/mediaPermissions.ts +124 -0
- package/src/methods/utils/headless/mediaProduction.ts +505 -0
- package/src/methods/utils/headless/moderation.ts +455 -0
- package/src/methods/utils/headless/participantState.ts +254 -0
- package/src/methods/utils/headless/playback.ts +336 -0
- package/src/methods/utils/headless/roomActions.ts +230 -0
- package/src/methods/utils/headless/sessionControls.ts +335 -0
- package/src/methods/utils/headless/sessionExtras.ts +593 -0
- package/src/methods/utils/headless/sessionFeatures.ts +480 -0
- package/src/methods/utils/headless/viewerSession.ts +246 -0
- package/src/methods/utils/headless/virtualBackground.ts +265 -0
- package/src/methods/utils/resolveMediaSFURoomApi.ts +2 -2
package/src/index.native.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './types/types';
|
|
1
2
|
export * from './consumers/autoAdjust';
|
|
2
3
|
export * from './consumers/calculateRowsAndColumns';
|
|
3
4
|
export * from './consumers/changeVids';
|
|
@@ -217,4 +218,26 @@ export * from './producers/producerEmits/joinRoom';
|
|
|
217
218
|
|
|
218
219
|
export * from './sockets/SocketManager';
|
|
219
220
|
|
|
220
|
-
export * from './methods/stream/clickVideo';
|
|
221
|
+
export * from './methods/stream/clickVideo';
|
|
222
|
+
|
|
223
|
+
// Native headless exports deliberately omit virtualBackground because native
|
|
224
|
+
// runtimes do not provide the browser canvas-backed captureStream() pipeline.
|
|
225
|
+
export * from './methods/utils/headless/headlessTypes';
|
|
226
|
+
export * from './methods/utils/headless/getRoomReadiness';
|
|
227
|
+
export * from './methods/utils/headless/getMediaStreams';
|
|
228
|
+
export * from './methods/utils/headless/getCurrentParams';
|
|
229
|
+
export * from './methods/utils/headless/roomActions';
|
|
230
|
+
export * from './methods/utils/headless/participantState';
|
|
231
|
+
export * from './methods/utils/headless/mediaPermissions';
|
|
232
|
+
export * from './methods/utils/headless/moderation';
|
|
233
|
+
export * from './methods/utils/headless/sessionFeatures';
|
|
234
|
+
export * from './methods/utils/headless/sessionExtras';
|
|
235
|
+
export * from './methods/utils/headless/sessionControls';
|
|
236
|
+
// WHEP works through a compatible native WebRTC implementation. HLS requires a
|
|
237
|
+
// platform player and reports a clear unsupported error when none is supplied.
|
|
238
|
+
export * from './methods/utils/headless/playback';
|
|
239
|
+
export * from './methods/utils/headless/viewerSession';
|
|
240
|
+
export * from './methods/utils/headless/mediaProduction';
|
|
241
|
+
export * from './methods/utils/getParticipantMedia';
|
|
242
|
+
|
|
243
|
+
export * from './ProducerClient/producerClientEmits/createDeviceClient';
|
package/src/index.ts
CHANGED
|
@@ -223,3 +223,8 @@ export * from './producers/producerEmits/joinRoom';
|
|
|
223
223
|
export * from './sockets/SocketManager';
|
|
224
224
|
// Stream method exports (clickVideo)
|
|
225
225
|
export * from './methods/stream/clickVideo';
|
|
226
|
+
|
|
227
|
+
// Framework-neutral headless helper suite. The web entry includes
|
|
228
|
+
// virtualBackground, which requires an offscreen canvas and captureStream().
|
|
229
|
+
export * from './methods/utils/headless';
|
|
230
|
+
export * from './methods/utils/getParticipantMedia';
|
|
@@ -6,6 +6,8 @@ export interface ConfirmExitOptions {
|
|
|
6
6
|
member: string
|
|
7
7
|
roomName: string
|
|
8
8
|
ban?: boolean
|
|
9
|
+
/** Whether a host exit should end the room for everyone. Defaults to true. */
|
|
10
|
+
endRoomOnHostExit?: boolean
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
// Export the type definition for the function
|
|
@@ -20,6 +22,7 @@ export type ConfirmExitType = (options: ConfirmExitOptions) => Promise<void>
|
|
|
20
22
|
* @param {string} options.member - The member who is exiting.
|
|
21
23
|
* @param {string} options.roomName - The name of the room the member is exiting from.
|
|
22
24
|
* @param {boolean} [options.ban=false] - Whether to ban the member from the room.
|
|
25
|
+
* @param {boolean} [options.endRoomOnHostExit=true] - Whether a host exit ends the room for everyone.
|
|
23
26
|
* @returns {Promise<void>} A promise that resolves when the exit is confirmed.
|
|
24
27
|
*
|
|
25
28
|
* @example
|
|
@@ -29,7 +32,8 @@ export type ConfirmExitType = (options: ConfirmExitOptions) => Promise<void>
|
|
|
29
32
|
* localSocket: localSocketInstance,
|
|
30
33
|
* member: "JohnDoe",
|
|
31
34
|
* roomName: "Room123",
|
|
32
|
-
* ban:
|
|
35
|
+
* ban: false,
|
|
36
|
+
* endRoomOnHostExit: false, // Let the host rejoin without ending the room.
|
|
33
37
|
* };
|
|
34
38
|
* await confirmExit(options);
|
|
35
39
|
* ```
|
|
@@ -40,13 +44,15 @@ export const confirmExit = async ({
|
|
|
40
44
|
localSocket,
|
|
41
45
|
member,
|
|
42
46
|
roomName,
|
|
43
|
-
ban = false
|
|
47
|
+
ban = false,
|
|
48
|
+
endRoomOnHostExit = true
|
|
44
49
|
}: ConfirmExitOptions): Promise<void> => {
|
|
45
50
|
// Emit a socket event to disconnect the user from the room
|
|
46
51
|
socket.emit('disconnectUser', {
|
|
47
52
|
member: member,
|
|
48
53
|
roomName: roomName,
|
|
49
|
-
ban: ban
|
|
54
|
+
ban: ban,
|
|
55
|
+
endRoomOnHostExit
|
|
50
56
|
})
|
|
51
57
|
|
|
52
58
|
if (localSocket && localSocket.id) {
|
|
@@ -54,7 +60,8 @@ export const confirmExit = async ({
|
|
|
54
60
|
localSocket.emit('disconnectUser', {
|
|
55
61
|
member: member,
|
|
56
62
|
roomName: roomName,
|
|
57
|
-
ban: ban
|
|
63
|
+
ban: ban,
|
|
64
|
+
endRoomOnHostExit
|
|
58
65
|
})
|
|
59
66
|
}
|
|
60
67
|
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { Participant, Stream } from '../../types/types';
|
|
2
|
+
|
|
3
|
+
export interface GetParticipantMediaOptions {
|
|
4
|
+
/**
|
|
5
|
+
* A participant id, or a producer id when the caller already holds one.
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
/** A participant display name. Used when `id` resolves nothing. */
|
|
9
|
+
name?: string;
|
|
10
|
+
/** Which media to resolve. Defaults to `video`. */
|
|
11
|
+
kind?: 'video' | 'audio';
|
|
12
|
+
/**
|
|
13
|
+
* The MediaSFU parameter bag — the object handed to `updateSourceParameters`,
|
|
14
|
+
* or anything exposing `participants`, `allVideoStreams` and `allAudioStreams`.
|
|
15
|
+
*/
|
|
16
|
+
parameters: {
|
|
17
|
+
participants?: Participant[];
|
|
18
|
+
allVideoStreams?: (Participant | Stream)[];
|
|
19
|
+
allAudioStreams?: (Participant | Stream)[];
|
|
20
|
+
getCurrentParams?: () => any;
|
|
21
|
+
getUpdatedAllParams?: () => any;
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type GetParticipantMediaType = (
|
|
27
|
+
options: GetParticipantMediaOptions
|
|
28
|
+
) => Promise<MediaStream | null>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Resolve a participant's live MediaStream from a MediaSFU parameter bag.
|
|
32
|
+
*
|
|
33
|
+
* This is the SDK-level counterpart of the `getParticipantMedia` helper that
|
|
34
|
+
* MediaSFU components publish through `sourceParameters`. That helper remains
|
|
35
|
+
* available for backwards compatibility; prefer this export when you drive the
|
|
36
|
+
* SDK headlessly (`returnUI={false}`) and only hold the parameter bag.
|
|
37
|
+
*
|
|
38
|
+
* Resolution order:
|
|
39
|
+
* 1. `parameters.participants` matched by `id`, then by `name`.
|
|
40
|
+
* 2. The matched participant's `videoID` / `audioID`, looked up against
|
|
41
|
+
* `allVideoStreams` / `allAudioStreams` by `producerId`. These collections
|
|
42
|
+
* are keyed by producer id only — a participant's `id` is its membership id
|
|
43
|
+
* and never matches, which is why an id-keyed lookup silently returns null.
|
|
44
|
+
* 3. `id` treated directly as a producer id, for callers that already hold one.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* import { getParticipantMedia } from 'mediasfu-reactjs';
|
|
49
|
+
*
|
|
50
|
+
* const stream = await getParticipantMedia({
|
|
51
|
+
* name: 'Paul',
|
|
52
|
+
* kind: 'video',
|
|
53
|
+
* parameters: sourceParameters.current,
|
|
54
|
+
* });
|
|
55
|
+
* if (stream) videoElement.srcObject = stream;
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export async function getParticipantMedia({
|
|
59
|
+
id = '',
|
|
60
|
+
name = '',
|
|
61
|
+
kind = 'video',
|
|
62
|
+
parameters,
|
|
63
|
+
}: GetParticipantMediaOptions): Promise<MediaStream | null> {
|
|
64
|
+
try {
|
|
65
|
+
if (!parameters) return null;
|
|
66
|
+
// Prefer the freshest bag when the caller holds an older snapshot.
|
|
67
|
+
const live =
|
|
68
|
+
typeof parameters.getCurrentParams === 'function'
|
|
69
|
+
? parameters.getCurrentParams() || parameters
|
|
70
|
+
: parameters;
|
|
71
|
+
|
|
72
|
+
const participants: Participant[] = Array.isArray(live.participants)
|
|
73
|
+
? live.participants
|
|
74
|
+
: [];
|
|
75
|
+
const streams: (Participant | Stream)[] = Array.isArray(
|
|
76
|
+
kind === 'video' ? live.allVideoStreams : live.allAudioStreams
|
|
77
|
+
)
|
|
78
|
+
? kind === 'video'
|
|
79
|
+
? live.allVideoStreams
|
|
80
|
+
: live.allAudioStreams
|
|
81
|
+
: [];
|
|
82
|
+
if (streams.length === 0) return null;
|
|
83
|
+
|
|
84
|
+
let participant = id
|
|
85
|
+
? participants.find((part) => part.id === id)
|
|
86
|
+
: undefined;
|
|
87
|
+
if (!participant && name) {
|
|
88
|
+
participant = participants.find((part) => part.name === name);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const producerId = participant
|
|
92
|
+
? kind === 'video'
|
|
93
|
+
? participant.videoID
|
|
94
|
+
: participant.audioID
|
|
95
|
+
: '';
|
|
96
|
+
if (producerId) {
|
|
97
|
+
const match = streams.find((stream) => stream.producerId === producerId);
|
|
98
|
+
if (match && match.stream) return match.stream;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (id) {
|
|
102
|
+
const direct = streams.find((stream) => stream.producerId === id);
|
|
103
|
+
if (direct && direct.stream) return direct.stream;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return null;
|
|
107
|
+
} catch {
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export default getParticipantMedia;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { HeadlessOptions, HeadlessParameters } from './headlessTypes';
|
|
2
|
+
|
|
3
|
+
export type GetCurrentParamsType = (
|
|
4
|
+
options: HeadlessOptions
|
|
5
|
+
) => HeadlessParameters;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Read the freshest parameter bag **without** triggering a republish.
|
|
9
|
+
*
|
|
10
|
+
* `parameters.getUpdatedAllParams()` looks like a getter but is not one: it
|
|
11
|
+
* reassigns `sourceParameters` and calls `updateSourceParameters` as a side
|
|
12
|
+
* effect. Calling it from a React event handler or a polling loop therefore
|
|
13
|
+
* re-enters your own update path, which at best causes a render storm and at
|
|
14
|
+
* worst locks the tab before `getUserMedia` resolves.
|
|
15
|
+
*
|
|
16
|
+
* MediaSFU components now publish a pure `getCurrentParams()` on the bag; this
|
|
17
|
+
* helper uses it when present and otherwise returns the bag you already hold.
|
|
18
|
+
* It never calls `getUpdatedAllParams()` and never throws.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { getCurrentParams } from 'mediasfu-shared';
|
|
23
|
+
*
|
|
24
|
+
* // Safe inside a click handler — no re-entrant publish.
|
|
25
|
+
* const live = getCurrentParams({ parameters: parameterStore.getCurrent() });
|
|
26
|
+
* await live.clickVideo({ parameters: live });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export function getCurrentParams({
|
|
30
|
+
parameters,
|
|
31
|
+
}: HeadlessOptions): HeadlessParameters {
|
|
32
|
+
const source = parameters || {};
|
|
33
|
+
if (typeof source.getCurrentParams === 'function') {
|
|
34
|
+
try {
|
|
35
|
+
const refreshed = source.getCurrentParams();
|
|
36
|
+
if (refreshed && typeof refreshed === 'object') return refreshed;
|
|
37
|
+
} catch {
|
|
38
|
+
// Fall through to the bag the caller already holds.
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return source;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export default getCurrentParams;
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { Participant, Stream } from '../../../types/types';
|
|
2
|
+
import { HeadlessOptions, HeadlessParameters, ResolvedMedia } from './headlessTypes';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* MediaSFU seeds its own grid collections with a self marker rather than a real
|
|
6
|
+
* producer. Rendering it as a remote peer shows the local user twice.
|
|
7
|
+
*/
|
|
8
|
+
const SELF_PRODUCER_IDS = new Set(['youyou', 'youyouyou']);
|
|
9
|
+
|
|
10
|
+
function toMediaStream(value: any): MediaStream | null {
|
|
11
|
+
if (value && typeof value.getTracks === 'function') return value as MediaStream;
|
|
12
|
+
const nested = value?.stream;
|
|
13
|
+
return nested && typeof nested.getTracks === 'function'
|
|
14
|
+
? (nested as MediaStream)
|
|
15
|
+
: null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A stream is only renderable if it still carries a live track of that kind.
|
|
21
|
+
*
|
|
22
|
+
* MediaSFU keeps `localStreamVideo` assigned after the camera is switched off —
|
|
23
|
+
* the track goes `enabled: false` or `readyState: 'ended'` rather than the
|
|
24
|
+
* field being cleared. Returning it regardless paints a black <video> instead
|
|
25
|
+
* of falling back to an audio or identity card.
|
|
26
|
+
*
|
|
27
|
+
* `enabled` is only meaningful for local media: the app clears it when the user
|
|
28
|
+
* turns their own camera off. It is never applied to remote tracks, where
|
|
29
|
+
* `muted: true` is a normal transient state before the first frame decodes.
|
|
30
|
+
*/
|
|
31
|
+
function hasRenderableTrack(
|
|
32
|
+
stream: MediaStream | null,
|
|
33
|
+
kind: 'video' | 'audio',
|
|
34
|
+
requireEnabled: boolean
|
|
35
|
+
): stream is MediaStream {
|
|
36
|
+
if (!stream || typeof stream.getTracks !== 'function') return false;
|
|
37
|
+
try {
|
|
38
|
+
return stream.getTracks().some(
|
|
39
|
+
(track) =>
|
|
40
|
+
track.kind === kind &&
|
|
41
|
+
track.readyState === 'live' &&
|
|
42
|
+
(!requireEnabled || track.enabled !== false)
|
|
43
|
+
);
|
|
44
|
+
} catch {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function collect(
|
|
50
|
+
entries: (Participant | Stream)[] | undefined
|
|
51
|
+
): (Participant | Stream)[] {
|
|
52
|
+
return Array.isArray(entries) ? entries : [];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function dedupe(entries: (Participant | Stream)[]): ResolvedMedia[] {
|
|
56
|
+
const seen = new Set<string>();
|
|
57
|
+
const resolved: ResolvedMedia[] = [];
|
|
58
|
+
for (const entry of entries) {
|
|
59
|
+
const producerId = (entry as any)?.producerId || '';
|
|
60
|
+
if (SELF_PRODUCER_IDS.has(producerId)) continue;
|
|
61
|
+
const stream = toMediaStream(entry);
|
|
62
|
+
if (!hasRenderableTrack(stream, 'video', false)) continue;
|
|
63
|
+
const key = producerId || stream.id || '';
|
|
64
|
+
if (key && seen.has(key)) continue;
|
|
65
|
+
if (key) seen.add(key);
|
|
66
|
+
resolved.push({
|
|
67
|
+
stream,
|
|
68
|
+
producerId,
|
|
69
|
+
name: (entry as any)?.name || '',
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
return resolved;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type GetRemoteVideoStreamsType = (
|
|
76
|
+
options: HeadlessOptions
|
|
77
|
+
) => ResolvedMedia[];
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Every remote camera in the room, in render order.
|
|
81
|
+
*
|
|
82
|
+
* Two details make this hard to get right by hand, and both are why headless
|
|
83
|
+
* integrations lose the host's video:
|
|
84
|
+
*
|
|
85
|
+
* - **`oldAllStreams` matters.** During normal conference layout processing the
|
|
86
|
+
* SDK moves a stream out of `allVideoStreams` into `oldAllStreams`. Reading
|
|
87
|
+
* only `allVideoStreams` makes the host disappear mid-call.
|
|
88
|
+
* - **The self marker must go.** `allVideoStreams` is seeded with a
|
|
89
|
+
* `producerId: 'youyou'` placeholder for the local user.
|
|
90
|
+
*
|
|
91
|
+
* Entries are de-duplicated by `producerId`, falling back to the stream id, so a
|
|
92
|
+
* stream present in both collections is returned once.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```ts
|
|
96
|
+
* import { getRemoteVideoStreams } from 'mediasfu-shared';
|
|
97
|
+
*
|
|
98
|
+
* const remotes = getRemoteVideoStreams({ parameters });
|
|
99
|
+
* const primary = remotes[0]?.stream ?? null;
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
export function getRemoteVideoStreams({
|
|
103
|
+
parameters,
|
|
104
|
+
}: HeadlessOptions): ResolvedMedia[] {
|
|
105
|
+
const source: HeadlessParameters = parameters || {};
|
|
106
|
+
return dedupe([
|
|
107
|
+
...collect(source.oldAllStreams),
|
|
108
|
+
...collect(source.allVideoStreams),
|
|
109
|
+
]);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export type GetRemoteAudioStreamsType = (
|
|
113
|
+
options: HeadlessOptions
|
|
114
|
+
) => ResolvedMedia[];
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Every remote audio producer in the room.
|
|
118
|
+
*
|
|
119
|
+
* Note that for *hearing* participants you normally want
|
|
120
|
+
* {@link getAudioGridComponents} instead — MediaSFU prepares its own audio
|
|
121
|
+
* elements and mounting those is what actually plays sound. This helper is for
|
|
122
|
+
* cases where you need the raw `MediaStream` (recording, analysis, metering).
|
|
123
|
+
*/
|
|
124
|
+
export function getRemoteAudioStreams({
|
|
125
|
+
parameters,
|
|
126
|
+
}: HeadlessOptions): ResolvedMedia[] {
|
|
127
|
+
const source: HeadlessParameters = parameters || {};
|
|
128
|
+
return dedupe(collect(source.allAudioStreams));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export type GetLocalVideoStreamType = (
|
|
132
|
+
options: HeadlessOptions
|
|
133
|
+
) => MediaStream | null;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The local camera stream to render as the self-view.
|
|
137
|
+
*
|
|
138
|
+
* The virtual-background case is the one everyone misses: when `keepBackground`
|
|
139
|
+
* is on, the stream that carries the processed frames is `virtualStream`, and
|
|
140
|
+
* `localStreamVideo` still holds the raw camera. Rendering the wrong one shows
|
|
141
|
+
* the user their unprocessed background. This mirrors the SDK's own grid rule.
|
|
142
|
+
*
|
|
143
|
+
* Returns `null` when the camera is off, so a falsy result is a truthful
|
|
144
|
+
* "no self-view" rather than something to paint black.
|
|
145
|
+
*
|
|
146
|
+
* Note: transport state such as `videoParams` or `videoProducer` is **not**
|
|
147
|
+
* renderable media and is deliberately never consulted here.
|
|
148
|
+
*/
|
|
149
|
+
export function getLocalVideoStream({
|
|
150
|
+
parameters,
|
|
151
|
+
}: HeadlessOptions): MediaStream | null {
|
|
152
|
+
const source: HeadlessParameters = parameters || {};
|
|
153
|
+
if (source.keepBackground && source.virtualStream) {
|
|
154
|
+
const virtual = toMediaStream(source.virtualStream);
|
|
155
|
+
if (hasRenderableTrack(virtual, 'video', true)) return virtual;
|
|
156
|
+
}
|
|
157
|
+
const camera = toMediaStream(source.localStreamVideo);
|
|
158
|
+
if (hasRenderableTrack(camera, 'video', true)) return camera;
|
|
159
|
+
const combined = toMediaStream(source.localStream);
|
|
160
|
+
return hasRenderableTrack(combined, 'video', true) ? combined : null;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export type GetLocalAudioStreamType = (
|
|
164
|
+
options: HeadlessOptions
|
|
165
|
+
) => MediaStream | null;
|
|
166
|
+
|
|
167
|
+
/** The local microphone stream, or `null` when the mic is off. */
|
|
168
|
+
export function getLocalAudioStream({
|
|
169
|
+
parameters,
|
|
170
|
+
}: HeadlessOptions): MediaStream | null {
|
|
171
|
+
const source: HeadlessParameters = parameters || {};
|
|
172
|
+
const mic = toMediaStream(source.localStreamAudio);
|
|
173
|
+
if (hasRenderableTrack(mic, 'audio', true)) return mic;
|
|
174
|
+
const combined = toMediaStream(source.localStream);
|
|
175
|
+
return hasRenderableTrack(combined, 'audio', true) ? combined : null;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export interface ScreenShareState {
|
|
179
|
+
/** The stream to render, local or remote, or `null` when nobody is sharing. */
|
|
180
|
+
stream: MediaStream | null;
|
|
181
|
+
/** True when the stream is this user's own screen. */
|
|
182
|
+
isLocal: boolean;
|
|
183
|
+
/** True when any screen share is active in the room. */
|
|
184
|
+
active: boolean;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export type GetScreenShareStreamType = (
|
|
188
|
+
options: HeadlessOptions
|
|
189
|
+
) => ScreenShareState;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* The active screen share, remote first.
|
|
193
|
+
*
|
|
194
|
+
* `remoteScreenStream` is an array in some SDK paths and a bare object in
|
|
195
|
+
* others; both shapes are handled here so callers do not have to guess.
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* ```ts
|
|
199
|
+
* const share = getScreenShareStream({ parameters });
|
|
200
|
+
* const primary = share.stream ?? remotes[0]?.stream ?? localVideo;
|
|
201
|
+
* ```
|
|
202
|
+
*/
|
|
203
|
+
export function getScreenShareStream({
|
|
204
|
+
parameters,
|
|
205
|
+
}: HeadlessOptions): ScreenShareState {
|
|
206
|
+
const source: HeadlessParameters = parameters || {};
|
|
207
|
+
const remoteRaw: any = source.remoteScreenStream;
|
|
208
|
+
const remote = Array.isArray(remoteRaw)
|
|
209
|
+
? toMediaStream(remoteRaw[0])
|
|
210
|
+
: toMediaStream(remoteRaw);
|
|
211
|
+
// Liveness matters most here. When a sharer stops, the SDK ends the track but
|
|
212
|
+
// `remoteScreenStream` keeps referencing it, so a viewer that trusts the field
|
|
213
|
+
// renders a dead track — a screen share that "ends" into a black stage.
|
|
214
|
+
// `enabled` is not required: it is a local-only flag and never set on a
|
|
215
|
+
// received screen track.
|
|
216
|
+
if (hasRenderableTrack(remote, 'video', false)) {
|
|
217
|
+
return { stream: remote, isLocal: false, active: true };
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
const local = toMediaStream(source.localStreamScreen);
|
|
221
|
+
if (hasRenderableTrack(local, 'video', true)) {
|
|
222
|
+
return { stream: local, isLocal: true, active: true };
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
return {
|
|
226
|
+
stream: null,
|
|
227
|
+
isLocal: false,
|
|
228
|
+
active: Boolean(source.shareScreenStarted || source.shared),
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export type GetAudioGridComponentsType = (options: HeadlessOptions) => any[];
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* The prepared audio elements to mount so participants are actually audible.
|
|
236
|
+
*
|
|
237
|
+
* Mount **all** of them. Truncating this list to the participants you happen to
|
|
238
|
+
* draw on screen silently mutes everyone else — audio playback is decoupled from
|
|
239
|
+
* your video layout. The usual pattern is a visually hidden container:
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* ```tsx
|
|
243
|
+
* import { getAudioGridComponents } from 'mediasfu-shared';
|
|
244
|
+
*
|
|
245
|
+
* <div style={{ position: 'absolute', width: 1, height: 1, opacity: 0 }}>
|
|
246
|
+
* <AudioGrid componentsToRender={getAudioGridComponents({ parameters })} />
|
|
247
|
+
* </div>
|
|
248
|
+
* ```
|
|
249
|
+
*/
|
|
250
|
+
export function getAudioGridComponents({ parameters }: HeadlessOptions): any[] {
|
|
251
|
+
const source: HeadlessParameters = parameters || {};
|
|
252
|
+
return [
|
|
253
|
+
...(Array.isArray(source.audioOnlyStreams) ? source.audioOnlyStreams : []),
|
|
254
|
+
...(Array.isArray(source.translationStreams) ? source.translationStreams : []),
|
|
255
|
+
].filter(Boolean);
|
|
256
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { HeadlessOptions, RoomReadiness } from './headlessTypes';
|
|
2
|
+
|
|
3
|
+
export type GetRoomReadinessType = (options: HeadlessOptions) => RoomReadiness;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Is the room actually usable yet?
|
|
7
|
+
*
|
|
8
|
+
* Headless consumers repeatedly re-derive this same predicate and each one picks
|
|
9
|
+
* a slightly different subset, so a control fires before the transport exists
|
|
10
|
+
* and fails silently. The five conditions below are the real gate: a room name,
|
|
11
|
+
* a member identity, server-side validation, a connected emittable socket, and a
|
|
12
|
+
* loaded mediasoup device.
|
|
13
|
+
*
|
|
14
|
+
* `reason` is safe to show a user — it names what is still pending, never an
|
|
15
|
+
* endpoint, credential, or internal identifier.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* import { getRoomReadiness } from 'mediasfu-shared';
|
|
20
|
+
*
|
|
21
|
+
* const { ready, reason } = getRoomReadiness({ parameters });
|
|
22
|
+
* if (!ready) return <p>{reason}</p>;
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export function getRoomReadiness({ parameters }: HeadlessOptions): RoomReadiness {
|
|
26
|
+
const source = parameters || {};
|
|
27
|
+
if (!source.roomName) {
|
|
28
|
+
return { ready: false, reason: 'Waiting for the room name.' };
|
|
29
|
+
}
|
|
30
|
+
if (!source.member) {
|
|
31
|
+
return { ready: false, reason: 'Waiting for the participant identity.' };
|
|
32
|
+
}
|
|
33
|
+
if (source.validated !== true) {
|
|
34
|
+
return { ready: false, reason: 'Waiting for MediaSFU to validate the room.' };
|
|
35
|
+
}
|
|
36
|
+
const socket = source.socket;
|
|
37
|
+
if (!socket || socket.connected !== true) {
|
|
38
|
+
return { ready: false, reason: 'Connecting to the MediaSFU room.' };
|
|
39
|
+
}
|
|
40
|
+
if (typeof socket.emit !== 'function') {
|
|
41
|
+
return { ready: false, reason: 'The room signal is not ready yet.' };
|
|
42
|
+
}
|
|
43
|
+
if (source.device?.loaded !== true) {
|
|
44
|
+
return { ready: false, reason: 'Waiting for the MediaSFU media device.' };
|
|
45
|
+
}
|
|
46
|
+
return { ready: true, reason: '' };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export default getRoomReadiness;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { Participant, Stream } from '../../../types/types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The MediaSFU parameter bag.
|
|
5
|
+
*
|
|
6
|
+
* This is the object handed to `updateSourceParameters`. Every field on it is a
|
|
7
|
+
* snapshot of an internal ref (`allVideoStreams.current`, `localStreamVideo.current`,
|
|
8
|
+
* …) taken at publish time, and the SDK **reassigns** those refs rather than
|
|
9
|
+
* mutating them — so a bag you hold onto goes stale as soon as a producer or
|
|
10
|
+
* consumer changes. Always read from the most recent publication.
|
|
11
|
+
*/
|
|
12
|
+
export interface HeadlessParameters {
|
|
13
|
+
// Room identity / readiness
|
|
14
|
+
roomName?: string;
|
|
15
|
+
member?: string;
|
|
16
|
+
islevel?: string;
|
|
17
|
+
validated?: boolean;
|
|
18
|
+
socket?: any;
|
|
19
|
+
localSocket?: any;
|
|
20
|
+
device?: { loaded?: boolean; [key: string]: any };
|
|
21
|
+
|
|
22
|
+
// Participants
|
|
23
|
+
participants?: Participant[];
|
|
24
|
+
participantsAll?: Participant[];
|
|
25
|
+
|
|
26
|
+
// Media collections
|
|
27
|
+
allVideoStreams?: (Participant | Stream)[];
|
|
28
|
+
allAudioStreams?: (Participant | Stream)[];
|
|
29
|
+
oldAllStreams?: (Participant | Stream)[];
|
|
30
|
+
audioOnlyStreams?: any[];
|
|
31
|
+
translationStreams?: any[];
|
|
32
|
+
|
|
33
|
+
// Local media
|
|
34
|
+
localStream?: MediaStream | null;
|
|
35
|
+
localStreamVideo?: MediaStream | null;
|
|
36
|
+
localStreamAudio?: MediaStream | null;
|
|
37
|
+
localStreamScreen?: MediaStream | null;
|
|
38
|
+
virtualStream?: MediaStream | null;
|
|
39
|
+
keepBackground?: boolean;
|
|
40
|
+
audioAlreadyOn?: boolean;
|
|
41
|
+
videoAlreadyOn?: boolean;
|
|
42
|
+
|
|
43
|
+
// Screen share
|
|
44
|
+
remoteScreenStream?: (Participant | Stream)[] | { stream?: MediaStream } | null;
|
|
45
|
+
shareScreenStarted?: boolean;
|
|
46
|
+
shared?: boolean;
|
|
47
|
+
|
|
48
|
+
// Chat
|
|
49
|
+
messages?: any[];
|
|
50
|
+
coHost?: string;
|
|
51
|
+
coHostResponsibility?: any[];
|
|
52
|
+
chatSetting?: string;
|
|
53
|
+
showAlert?: (options: any) => void;
|
|
54
|
+
|
|
55
|
+
// Audio activity
|
|
56
|
+
audioLevel?: number;
|
|
57
|
+
audioDecibels?: { name: string; averageLoudness: number }[];
|
|
58
|
+
|
|
59
|
+
// SDK function map
|
|
60
|
+
/** Republishes as a side effect — prefer `getCurrentParams`. */
|
|
61
|
+
getUpdatedAllParams?: () => any;
|
|
62
|
+
/** Pure read of the current bag. No republish. */
|
|
63
|
+
getCurrentParams?: () => any;
|
|
64
|
+
getParticipantMedia?: (...args: any[]) => Promise<MediaStream | null>;
|
|
65
|
+
getMediaDevicesList?: (
|
|
66
|
+
kind: 'videoinput' | 'audioinput'
|
|
67
|
+
) => Promise<MediaDeviceInfo[]>;
|
|
68
|
+
updateAutoWave?: (value: boolean) => void;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Server-provided playback URLs, when the room has them provisioned.
|
|
72
|
+
*
|
|
73
|
+
* Unlike WebRTC media these are never consumed automatically — see
|
|
74
|
+
* getPlaybackSources/attachPlayback. Absence means the room has no HLS or
|
|
75
|
+
* WHEP egress, not an error.
|
|
76
|
+
*/
|
|
77
|
+
hlsUrl?: string;
|
|
78
|
+
hlsPlaybackUrl?: string;
|
|
79
|
+
playbackUrl?: string;
|
|
80
|
+
whepUrl?: string;
|
|
81
|
+
whepPlaybackUrl?: string;
|
|
82
|
+
[key: string]: any;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface HeadlessOptions {
|
|
86
|
+
/** The most recent parameter bag from `updateSourceParameters`. */
|
|
87
|
+
parameters: HeadlessParameters;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** A resolved media entry with the producer reference that identifies it. */
|
|
91
|
+
export interface ResolvedMedia {
|
|
92
|
+
stream: MediaStream;
|
|
93
|
+
producerId: string;
|
|
94
|
+
/** Participant display name when the SDK exposes one for this producer. */
|
|
95
|
+
name: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface RoomReadiness {
|
|
99
|
+
ready: boolean;
|
|
100
|
+
/** Empty when ready; otherwise a short, user-safe explanation. */
|
|
101
|
+
reason: string;
|
|
102
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Headless helpers for `returnUI={false}` integrations.
|
|
3
|
+
*
|
|
4
|
+
* These exist because every headless consumer was re-deriving the same handful
|
|
5
|
+
* of rules from the raw parameter bag, and getting them subtly wrong in ways
|
|
6
|
+
* that only show up on a live call: a host whose video vanishes when the SDK
|
|
7
|
+
* moves their stream to `oldAllStreams`, participants who are silently
|
|
8
|
+
* inaudible because the audio element list was truncated, a self-view showing
|
|
9
|
+
* the unprocessed camera when a virtual background is on, or a tab that locks
|
|
10
|
+
* because `getUpdatedAllParams()` was called from a click handler.
|
|
11
|
+
*
|
|
12
|
+
* Import the individual helpers when your adapter needs finer control.
|
|
13
|
+
*/
|
|
14
|
+
export * from './headlessTypes';
|
|
15
|
+
export * from './getRoomReadiness';
|
|
16
|
+
export * from './getMediaStreams';
|
|
17
|
+
export * from './getCurrentParams';
|
|
18
|
+
export * from './roomActions';
|
|
19
|
+
export * from './participantState';
|
|
20
|
+
export * from './mediaPermissions';
|
|
21
|
+
export * from './moderation';
|
|
22
|
+
export * from './sessionFeatures';
|
|
23
|
+
export * from './sessionExtras';
|
|
24
|
+
export * from './virtualBackground';
|
|
25
|
+
export * from './sessionControls';
|
|
26
|
+
export * from './playback';
|
|
27
|
+
export * from './viewerSession';
|
|
28
|
+
export * from './mediaProduction';
|