@signalwire/js 3.29.2 → 4.0.0-beta.1
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/dist/base-A5AZTrAd.d.cts +23 -0
- package/dist/base-A5AZTrAd.d.cts.map +1 -0
- package/dist/base-aVtoG8Wk.d.mts +23 -0
- package/dist/base-aVtoG8Wk.d.mts.map +1 -0
- package/dist/browser.mjs +16628 -0
- package/dist/browser.mjs.map +1 -0
- package/dist/browser.umd.js +16649 -0
- package/dist/browser.umd.js.map +1 -0
- package/dist/index.cjs +6213 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2690 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +2690 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +6197 -0
- package/dist/index.mjs.map +1 -0
- package/dist/operators/index.cjs +6 -0
- package/dist/operators/index.d.cts +109 -0
- package/dist/operators/index.d.cts.map +1 -0
- package/dist/operators/index.d.mts +109 -0
- package/dist/operators/index.d.mts.map +1 -0
- package/dist/operators/index.mjs +3 -0
- package/dist/operators-BHQMSEzq.mjs +371 -0
- package/dist/operators-BHQMSEzq.mjs.map +1 -0
- package/dist/operators-DT4UB24-.cjs +596 -0
- package/dist/operators-DT4UB24-.cjs.map +1 -0
- package/package.json +73 -37
- package/README.md +0 -40
- package/dist/core/src/BaseClient.d.ts +0 -19
- package/dist/core/src/BaseClient.d.ts.map +0 -1
- package/dist/core/src/BaseComponent.d.ts +0 -101
- package/dist/core/src/BaseComponent.d.ts.map +0 -1
- package/dist/core/src/BaseComponent.test.d.ts +0 -2
- package/dist/core/src/BaseComponent.test.d.ts.map +0 -1
- package/dist/core/src/BaseConsumer.d.ts +0 -18
- package/dist/core/src/BaseConsumer.d.ts.map +0 -1
- package/dist/core/src/BaseConsumer.test.d.ts +0 -2
- package/dist/core/src/BaseConsumer.test.d.ts.map +0 -1
- package/dist/core/src/BaseJWTSession.d.ts +0 -47
- package/dist/core/src/BaseJWTSession.d.ts.map +0 -1
- package/dist/core/src/BaseJWTSession.test.d.ts +0 -2
- package/dist/core/src/BaseJWTSession.test.d.ts.map +0 -1
- package/dist/core/src/BaseSession.d.ts +0 -117
- package/dist/core/src/BaseSession.d.ts.map +0 -1
- package/dist/core/src/BaseSession.test.d.ts +0 -2
- package/dist/core/src/BaseSession.test.d.ts.map +0 -1
- package/dist/core/src/CustomErrors.d.ts +0 -17
- package/dist/core/src/CustomErrors.d.ts.map +0 -1
- package/dist/core/src/RPCMessages/RPCConnect.d.ts +0 -42
- package/dist/core/src/RPCMessages/RPCConnect.d.ts.map +0 -1
- package/dist/core/src/RPCMessages/RPCDisconnect.d.ts +0 -8
- package/dist/core/src/RPCMessages/RPCDisconnect.d.ts.map +0 -1
- package/dist/core/src/RPCMessages/RPCEventAck.d.ts +0 -8
- package/dist/core/src/RPCMessages/RPCEventAck.d.ts.map +0 -1
- package/dist/core/src/RPCMessages/RPCExecute.d.ts +0 -16
- package/dist/core/src/RPCMessages/RPCExecute.d.ts.map +0 -1
- package/dist/core/src/RPCMessages/RPCPing.d.ts +0 -16
- package/dist/core/src/RPCMessages/RPCPing.d.ts.map +0 -1
- package/dist/core/src/RPCMessages/RPCReauthenticate.d.ts +0 -13
- package/dist/core/src/RPCMessages/RPCReauthenticate.d.ts.map +0 -1
- package/dist/core/src/RPCMessages/VertoMessages.d.ts +0 -84
- package/dist/core/src/RPCMessages/VertoMessages.d.ts.map +0 -1
- package/dist/core/src/RPCMessages/helpers.d.ts +0 -31
- package/dist/core/src/RPCMessages/helpers.d.ts.map +0 -1
- package/dist/core/src/RPCMessages/index.d.ts +0 -9
- package/dist/core/src/RPCMessages/index.d.ts.map +0 -1
- package/dist/core/src/RPCMessages/index.test.d.ts +0 -2
- package/dist/core/src/RPCMessages/index.test.d.ts.map +0 -1
- package/dist/core/src/chat/BaseChat.d.ts +0 -23
- package/dist/core/src/chat/BaseChat.d.ts.map +0 -1
- package/dist/core/src/chat/ChatMember.d.ts +0 -15
- package/dist/core/src/chat/ChatMember.d.ts.map +0 -1
- package/dist/core/src/chat/ChatMessage.d.ts +0 -10
- package/dist/core/src/chat/ChatMessage.d.ts.map +0 -1
- package/dist/core/src/chat/applyCommonMethods.d.ts +0 -22
- package/dist/core/src/chat/applyCommonMethods.d.ts.map +0 -1
- package/dist/core/src/chat/index.d.ts +0 -6
- package/dist/core/src/chat/index.d.ts.map +0 -1
- package/dist/core/src/chat/methods.d.ts +0 -31
- package/dist/core/src/chat/methods.d.ts.map +0 -1
- package/dist/core/src/chat/utils/index.d.ts +0 -3
- package/dist/core/src/chat/utils/index.d.ts.map +0 -1
- package/dist/core/src/chat/utils/toInternalChatChannels.d.ts +0 -3
- package/dist/core/src/chat/utils/toInternalChatChannels.d.ts.map +0 -1
- package/dist/core/src/chat/utils/toInternalChatChannels.test.d.ts +0 -2
- package/dist/core/src/chat/utils/toInternalChatChannels.test.d.ts.map +0 -1
- package/dist/core/src/chat/workers/chatWorker.d.ts +0 -4
- package/dist/core/src/chat/workers/chatWorker.d.ts.map +0 -1
- package/dist/core/src/chat/workers/index.d.ts +0 -2
- package/dist/core/src/chat/workers/index.d.ts.map +0 -1
- package/dist/core/src/index.d.ts +0 -45
- package/dist/core/src/index.d.ts.map +0 -1
- package/dist/core/src/index.test.d.ts +0 -1
- package/dist/core/src/index.test.d.ts.map +0 -1
- package/dist/core/src/memberPosition/index.d.ts +0 -2
- package/dist/core/src/memberPosition/index.d.ts.map +0 -1
- package/dist/core/src/memberPosition/workers.d.ts +0 -13
- package/dist/core/src/memberPosition/workers.d.ts.map +0 -1
- package/dist/core/src/memberPosition/workers.test.d.ts +0 -2
- package/dist/core/src/memberPosition/workers.test.d.ts.map +0 -1
- package/dist/core/src/pubSub/BasePubSub.d.ts +0 -43
- package/dist/core/src/pubSub/BasePubSub.d.ts.map +0 -1
- package/dist/core/src/pubSub/PubSubMessage.d.ts +0 -19
- package/dist/core/src/pubSub/PubSubMessage.d.ts.map +0 -1
- package/dist/core/src/pubSub/index.d.ts +0 -3
- package/dist/core/src/pubSub/index.d.ts.map +0 -1
- package/dist/core/src/pubSub/workers/index.d.ts +0 -2
- package/dist/core/src/pubSub/workers/index.d.ts.map +0 -1
- package/dist/core/src/pubSub/workers/pubSubWorker.d.ts +0 -4
- package/dist/core/src/pubSub/workers/pubSubWorker.d.ts.map +0 -1
- package/dist/core/src/redux/actions.d.ts +0 -25
- package/dist/core/src/redux/actions.d.ts.map +0 -1
- package/dist/core/src/redux/connect.d.ts +0 -23
- package/dist/core/src/redux/connect.d.ts.map +0 -1
- package/dist/core/src/redux/connect.test.d.ts +0 -2
- package/dist/core/src/redux/connect.test.d.ts.map +0 -1
- package/dist/core/src/redux/features/component/componentSaga.d.ts +0 -4
- package/dist/core/src/redux/features/component/componentSaga.d.ts.map +0 -1
- package/dist/core/src/redux/features/component/componentSaga.test.d.ts +0 -2
- package/dist/core/src/redux/features/component/componentSaga.test.d.ts.map +0 -1
- package/dist/core/src/redux/features/component/componentSelectors.d.ts +0 -7
- package/dist/core/src/redux/features/component/componentSelectors.d.ts.map +0 -1
- package/dist/core/src/redux/features/component/componentSelectors.test.d.ts +0 -2
- package/dist/core/src/redux/features/component/componentSelectors.test.d.ts.map +0 -1
- package/dist/core/src/redux/features/component/componentSlice.d.ts +0 -2319
- package/dist/core/src/redux/features/component/componentSlice.d.ts.map +0 -1
- package/dist/core/src/redux/features/component/componentSlice.test.d.ts +0 -2
- package/dist/core/src/redux/features/component/componentSlice.test.d.ts.map +0 -1
- package/dist/core/src/redux/features/index.d.ts +0 -3
- package/dist/core/src/redux/features/index.d.ts.map +0 -1
- package/dist/core/src/redux/features/session/sessionSaga.d.ts +0 -11
- package/dist/core/src/redux/features/session/sessionSaga.d.ts.map +0 -1
- package/dist/core/src/redux/features/session/sessionSelectors.d.ts +0 -9
- package/dist/core/src/redux/features/session/sessionSelectors.d.ts.map +0 -1
- package/dist/core/src/redux/features/session/sessionSlice.d.ts +0 -521
- package/dist/core/src/redux/features/session/sessionSlice.d.ts.map +0 -1
- package/dist/core/src/redux/features/session/sessionSlice.test.d.ts +0 -2
- package/dist/core/src/redux/features/session/sessionSlice.test.d.ts.map +0 -1
- package/dist/core/src/redux/index.d.ts +0 -31
- package/dist/core/src/redux/index.d.ts.map +0 -1
- package/dist/core/src/redux/interfaces.d.ts +0 -87
- package/dist/core/src/redux/interfaces.d.ts.map +0 -1
- package/dist/core/src/redux/rootReducer.d.ts +0 -457
- package/dist/core/src/redux/rootReducer.d.ts.map +0 -1
- package/dist/core/src/redux/rootSaga.d.ts +0 -40
- package/dist/core/src/redux/rootSaga.d.ts.map +0 -1
- package/dist/core/src/redux/rootSaga.test.d.ts +0 -2
- package/dist/core/src/redux/rootSaga.test.d.ts.map +0 -1
- package/dist/core/src/redux/toolkit/configureStore.d.ts +0 -77
- package/dist/core/src/redux/toolkit/configureStore.d.ts.map +0 -1
- package/dist/core/src/redux/toolkit/createAction.d.ts +0 -180
- package/dist/core/src/redux/toolkit/createAction.d.ts.map +0 -1
- package/dist/core/src/redux/toolkit/createReducer.d.ts +0 -42
- package/dist/core/src/redux/toolkit/createReducer.d.ts.map +0 -1
- package/dist/core/src/redux/toolkit/createSlice.d.ts +0 -142
- package/dist/core/src/redux/toolkit/createSlice.d.ts.map +0 -1
- package/dist/core/src/redux/toolkit/devtoolsExtension.d.ts +0 -185
- package/dist/core/src/redux/toolkit/devtoolsExtension.d.ts.map +0 -1
- package/dist/core/src/redux/toolkit/getDefaultMiddleware.d.ts +0 -12
- package/dist/core/src/redux/toolkit/getDefaultMiddleware.d.ts.map +0 -1
- package/dist/core/src/redux/toolkit/index.d.ts +0 -13
- package/dist/core/src/redux/toolkit/index.d.ts.map +0 -1
- package/dist/core/src/redux/toolkit/isPlainObject.d.ts +0 -12
- package/dist/core/src/redux/toolkit/isPlainObject.d.ts.map +0 -1
- package/dist/core/src/redux/toolkit/mapBuilders.d.ts +0 -38
- package/dist/core/src/redux/toolkit/mapBuilders.d.ts.map +0 -1
- package/dist/core/src/redux/toolkit/tsHelpers.d.ts +0 -51
- package/dist/core/src/redux/toolkit/tsHelpers.d.ts.map +0 -1
- package/dist/core/src/redux/toolkit/utils.d.ts +0 -11
- package/dist/core/src/redux/toolkit/utils.d.ts.map +0 -1
- package/dist/core/src/redux/utils/createDestroyableSlice.d.ts +0 -9
- package/dist/core/src/redux/utils/createDestroyableSlice.d.ts.map +0 -1
- package/dist/core/src/redux/utils/createDestroyableSlice.test.d.ts +0 -2
- package/dist/core/src/redux/utils/createDestroyableSlice.test.d.ts.map +0 -1
- package/dist/core/src/redux/utils/sagaHelpers.d.ts +0 -5
- package/dist/core/src/redux/utils/sagaHelpers.d.ts.map +0 -1
- package/dist/core/src/redux/utils/useInstanceMap.d.ts +0 -3
- package/dist/core/src/redux/utils/useInstanceMap.d.ts.map +0 -1
- package/dist/core/src/redux/utils/useSession.d.ts +0 -16
- package/dist/core/src/redux/utils/useSession.d.ts.map +0 -1
- package/dist/core/src/rooms/RoomSessionPlayback.d.ts +0 -40
- package/dist/core/src/rooms/RoomSessionPlayback.d.ts.map +0 -1
- package/dist/core/src/rooms/RoomSessionPlayback.test.d.ts +0 -2
- package/dist/core/src/rooms/RoomSessionPlayback.test.d.ts.map +0 -1
- package/dist/core/src/rooms/RoomSessionRecording.d.ts +0 -30
- package/dist/core/src/rooms/RoomSessionRecording.d.ts.map +0 -1
- package/dist/core/src/rooms/RoomSessionRecording.test.d.ts +0 -2
- package/dist/core/src/rooms/RoomSessionRecording.test.d.ts.map +0 -1
- package/dist/core/src/rooms/RoomSessionStream.d.ts +0 -29
- package/dist/core/src/rooms/RoomSessionStream.d.ts.map +0 -1
- package/dist/core/src/rooms/RoomSessionStream.test.d.ts +0 -2
- package/dist/core/src/rooms/RoomSessionStream.test.d.ts.map +0 -1
- package/dist/core/src/rooms/index.d.ts +0 -11
- package/dist/core/src/rooms/index.d.ts.map +0 -1
- package/dist/core/src/rooms/methods.d.ts +0 -179
- package/dist/core/src/rooms/methods.d.ts.map +0 -1
- package/dist/core/src/rooms/methods.test.d.ts +0 -2
- package/dist/core/src/rooms/methods.test.d.ts.map +0 -1
- package/dist/core/src/setupTests.d.ts +0 -1
- package/dist/core/src/setupTests.d.ts.map +0 -1
- package/dist/core/src/testUtils.d.ts +0 -54
- package/dist/core/src/testUtils.d.ts.map +0 -1
- package/dist/core/src/types/cantina.d.ts +0 -82
- package/dist/core/src/types/cantina.d.ts.map +0 -1
- package/dist/core/src/types/chat.d.ts +0 -270
- package/dist/core/src/types/chat.d.ts.map +0 -1
- package/dist/core/src/types/common.d.ts +0 -34
- package/dist/core/src/types/common.d.ts.map +0 -1
- package/dist/core/src/types/conversation.d.ts +0 -33
- package/dist/core/src/types/conversation.d.ts.map +0 -1
- package/dist/core/src/types/fabric.d.ts +0 -15
- package/dist/core/src/types/fabric.d.ts.map +0 -1
- package/dist/core/src/types/fabricLayout.d.ts +0 -25
- package/dist/core/src/types/fabricLayout.d.ts.map +0 -1
- package/dist/core/src/types/fabricMember.d.ts +0 -148
- package/dist/core/src/types/fabricMember.d.ts.map +0 -1
- package/dist/core/src/types/fabricRoomSession.d.ts +0 -631
- package/dist/core/src/types/fabricRoomSession.d.ts.map +0 -1
- package/dist/core/src/types/index.d.ts +0 -276
- package/dist/core/src/types/index.d.ts.map +0 -1
- package/dist/core/src/types/messaging.d.ts +0 -90
- package/dist/core/src/types/messaging.d.ts.map +0 -1
- package/dist/core/src/types/pubSub.d.ts +0 -123
- package/dist/core/src/types/pubSub.d.ts.map +0 -1
- package/dist/core/src/types/task.d.ts +0 -36
- package/dist/core/src/types/task.d.ts.map +0 -1
- package/dist/core/src/types/utils.d.ts +0 -71
- package/dist/core/src/types/utils.d.ts.map +0 -1
- package/dist/core/src/types/video.d.ts +0 -62
- package/dist/core/src/types/video.d.ts.map +0 -1
- package/dist/core/src/types/videoLayout.d.ts +0 -75
- package/dist/core/src/types/videoLayout.d.ts.map +0 -1
- package/dist/core/src/types/videoMember.d.ts +0 -384
- package/dist/core/src/types/videoMember.d.ts.map +0 -1
- package/dist/core/src/types/videoPlayback.d.ts +0 -123
- package/dist/core/src/types/videoPlayback.d.ts.map +0 -1
- package/dist/core/src/types/videoRecording.d.ts +0 -114
- package/dist/core/src/types/videoRecording.d.ts.map +0 -1
- package/dist/core/src/types/videoRoomDevice.d.ts +0 -23
- package/dist/core/src/types/videoRoomDevice.d.ts.map +0 -1
- package/dist/core/src/types/videoRoomSession.d.ts +0 -921
- package/dist/core/src/types/videoRoomSession.d.ts.map +0 -1
- package/dist/core/src/types/videoStream.d.ts +0 -104
- package/dist/core/src/types/videoStream.d.ts.map +0 -1
- package/dist/core/src/types/voice.d.ts +0 -15
- package/dist/core/src/types/voice.d.ts.map +0 -1
- package/dist/core/src/types/voiceCall.d.ts +0 -253
- package/dist/core/src/types/voiceCall.d.ts.map +0 -1
- package/dist/core/src/types/voiceCollect.d.ts +0 -166
- package/dist/core/src/types/voiceCollect.d.ts.map +0 -1
- package/dist/core/src/types/voiceConnect.d.ts +0 -77
- package/dist/core/src/types/voiceConnect.d.ts.map +0 -1
- package/dist/core/src/types/voiceDetect.d.ts +0 -127
- package/dist/core/src/types/voiceDetect.d.ts.map +0 -1
- package/dist/core/src/types/voicePlayback.d.ts +0 -141
- package/dist/core/src/types/voicePlayback.d.ts.map +0 -1
- package/dist/core/src/types/voicePrompt.d.ts +0 -105
- package/dist/core/src/types/voicePrompt.d.ts.map +0 -1
- package/dist/core/src/types/voiceRecording.d.ts +0 -107
- package/dist/core/src/types/voiceRecording.d.ts.map +0 -1
- package/dist/core/src/types/voiceSendDigits.d.ts +0 -21
- package/dist/core/src/types/voiceSendDigits.d.ts.map +0 -1
- package/dist/core/src/types/voiceTap.d.ts +0 -116
- package/dist/core/src/types/voiceTap.d.ts.map +0 -1
- package/dist/core/src/utils/EventEmitter.d.ts +0 -9
- package/dist/core/src/utils/EventEmitter.d.ts.map +0 -1
- package/dist/core/src/utils/EventEmitter.test.d.ts +0 -2
- package/dist/core/src/utils/EventEmitter.test.d.ts.map +0 -1
- package/dist/core/src/utils/SWCloseEvent.d.ts +0 -18
- package/dist/core/src/utils/SWCloseEvent.d.ts.map +0 -1
- package/dist/core/src/utils/asyncRetry.d.ts +0 -18
- package/dist/core/src/utils/asyncRetry.d.ts.map +0 -1
- package/dist/core/src/utils/asyncRetry.test.d.ts +0 -2
- package/dist/core/src/utils/asyncRetry.test.d.ts.map +0 -1
- package/dist/core/src/utils/common.d.ts +0 -9
- package/dist/core/src/utils/common.d.ts.map +0 -1
- package/dist/core/src/utils/constants.d.ts +0 -44
- package/dist/core/src/utils/constants.d.ts.map +0 -1
- package/dist/core/src/utils/debounce.d.ts +0 -8
- package/dist/core/src/utils/debounce.d.ts.map +0 -1
- package/dist/core/src/utils/eventUtils.d.ts +0 -2
- package/dist/core/src/utils/eventUtils.d.ts.map +0 -1
- package/dist/core/src/utils/extendComponent.d.ts +0 -4
- package/dist/core/src/utils/extendComponent.d.ts.map +0 -1
- package/dist/core/src/utils/extendComponent.test.d.ts +0 -2
- package/dist/core/src/utils/extendComponent.test.d.ts.map +0 -1
- package/dist/core/src/utils/index.d.ts +0 -47
- package/dist/core/src/utils/index.d.ts.map +0 -1
- package/dist/core/src/utils/index.test.d.ts +0 -2
- package/dist/core/src/utils/index.test.d.ts.map +0 -1
- package/dist/core/src/utils/interfaces.d.ts +0 -296
- package/dist/core/src/utils/interfaces.d.ts.map +0 -1
- package/dist/core/src/utils/logger.d.ts +0 -6
- package/dist/core/src/utils/logger.d.ts.map +0 -1
- package/dist/core/src/utils/logger.test.d.ts +0 -2
- package/dist/core/src/utils/logger.test.d.ts.map +0 -1
- package/dist/core/src/utils/parseRPCResponse.d.ts +0 -10
- package/dist/core/src/utils/parseRPCResponse.d.ts.map +0 -1
- package/dist/core/src/utils/parseRPCResponse.test.d.ts +0 -2
- package/dist/core/src/utils/parseRPCResponse.test.d.ts.map +0 -1
- package/dist/core/src/utils/storage/index.d.ts +0 -11
- package/dist/core/src/utils/storage/index.d.ts.map +0 -1
- package/dist/core/src/utils/storage/index.native.d.ts +0 -11
- package/dist/core/src/utils/storage/index.native.d.ts.map +0 -1
- package/dist/core/src/utils/toExternalJSON.d.ts +0 -34
- package/dist/core/src/utils/toExternalJSON.d.ts.map +0 -1
- package/dist/core/src/utils/toExternalJSON.test.d.ts +0 -2
- package/dist/core/src/utils/toExternalJSON.test.d.ts.map +0 -1
- package/dist/core/src/utils/toInternalAction.d.ts +0 -7
- package/dist/core/src/utils/toInternalAction.d.ts.map +0 -1
- package/dist/core/src/utils/toInternalAction.test.d.ts +0 -2
- package/dist/core/src/utils/toInternalAction.test.d.ts.map +0 -1
- package/dist/core/src/utils/toInternalEventName.d.ts +0 -8
- package/dist/core/src/utils/toInternalEventName.d.ts.map +0 -1
- package/dist/core/src/utils/toInternalEventName.test.d.ts +0 -2
- package/dist/core/src/utils/toInternalEventName.test.d.ts.map +0 -1
- package/dist/core/src/utils/toSnakeCaseKeys.d.ts +0 -7
- package/dist/core/src/utils/toSnakeCaseKeys.d.ts.map +0 -1
- package/dist/core/src/utils/toSnakeCaseKeys.test.d.ts +0 -2
- package/dist/core/src/utils/toSnakeCaseKeys.test.d.ts.map +0 -1
- package/dist/core/src/workers/executeActionWorker.d.ts +0 -7
- package/dist/core/src/workers/executeActionWorker.d.ts.map +0 -1
- package/dist/core/src/workers/index.d.ts +0 -2
- package/dist/core/src/workers/index.d.ts.map +0 -1
- package/dist/index.esm.js +0 -4673
- package/dist/index.esm.js.map +0 -7
- package/dist/index.js +0 -4655
- package/dist/index.js.map +0 -7
- package/dist/index.umd.js +0 -31
- package/dist/index.umd.js.map +0 -1
- package/dist/js/src/BaseRoomSession.d.ts +0 -52
- package/dist/js/src/BaseRoomSession.d.ts.map +0 -1
- package/dist/js/src/Client.d.ts +0 -38
- package/dist/js/src/Client.d.ts.map +0 -1
- package/dist/js/src/JWTSession.d.ts +0 -31
- package/dist/js/src/JWTSession.d.ts.map +0 -1
- package/dist/js/src/RoomSessionDevice.d.ts +0 -30
- package/dist/js/src/RoomSessionDevice.d.ts.map +0 -1
- package/dist/js/src/RoomSessionScreenShare.d.ts +0 -26
- package/dist/js/src/RoomSessionScreenShare.d.ts.map +0 -1
- package/dist/js/src/VideoOverlays.d.ts +0 -42
- package/dist/js/src/VideoOverlays.d.ts.map +0 -1
- package/dist/js/src/buildVideoElement.d.ts +0 -18
- package/dist/js/src/buildVideoElement.d.ts.map +0 -1
- package/dist/js/src/cantina/VideoManager.d.ts +0 -16
- package/dist/js/src/cantina/VideoManager.d.ts.map +0 -1
- package/dist/js/src/cantina/index.d.ts +0 -2
- package/dist/js/src/cantina/index.d.ts.map +0 -1
- package/dist/js/src/cantina/workers/index.d.ts +0 -2
- package/dist/js/src/cantina/workers/index.d.ts.map +0 -1
- package/dist/js/src/cantina/workers/videoManagerRoomWorker.d.ts +0 -4
- package/dist/js/src/cantina/workers/videoManagerRoomWorker.d.ts.map +0 -1
- package/dist/js/src/cantina/workers/videoManagerRoomsWorker.d.ts +0 -4
- package/dist/js/src/cantina/workers/videoManagerRoomsWorker.d.ts.map +0 -1
- package/dist/js/src/cantina/workers/videoManagerWorker.d.ts +0 -7
- package/dist/js/src/cantina/workers/videoManagerWorker.d.ts.map +0 -1
- package/dist/js/src/chat/Client.d.ts +0 -46
- package/dist/js/src/chat/Client.d.ts.map +0 -1
- package/dist/js/src/chat/index.d.ts +0 -5
- package/dist/js/src/chat/index.d.ts.map +0 -1
- package/dist/js/src/createClient.d.ts +0 -26
- package/dist/js/src/createClient.d.ts.map +0 -1
- package/dist/js/src/createRoomObject.d.ts +0 -38
- package/dist/js/src/createRoomObject.d.ts.map +0 -1
- package/dist/js/src/fabric/FabricRoomSession.d.ts +0 -80
- package/dist/js/src/fabric/FabricRoomSession.d.ts.map +0 -1
- package/dist/js/src/fabric/FabricRoomSessionMember.d.ts +0 -46
- package/dist/js/src/fabric/FabricRoomSessionMember.d.ts.map +0 -1
- package/dist/js/src/fabric/HTTPClient.d.ts +0 -16
- package/dist/js/src/fabric/HTTPClient.d.ts.map +0 -1
- package/dist/js/src/fabric/IncomingCallManager.d.ts +0 -19
- package/dist/js/src/fabric/IncomingCallManager.d.ts.map +0 -1
- package/dist/js/src/fabric/SATSession.d.ts +0 -25
- package/dist/js/src/fabric/SATSession.d.ts.map +0 -1
- package/dist/js/src/fabric/SignalWire.d.ts +0 -3
- package/dist/js/src/fabric/SignalWire.d.ts.map +0 -1
- package/dist/js/src/fabric/WSClient.d.ts +0 -33
- package/dist/js/src/fabric/WSClient.d.ts.map +0 -1
- package/dist/js/src/fabric/createHttpClient.d.ts +0 -22
- package/dist/js/src/fabric/createHttpClient.d.ts.map +0 -1
- package/dist/js/src/fabric/createWSClient.d.ts +0 -38
- package/dist/js/src/fabric/createWSClient.d.ts.map +0 -1
- package/dist/js/src/fabric/index.d.ts +0 -15
- package/dist/js/src/fabric/index.d.ts.map +0 -1
- package/dist/js/src/fabric/interfaces/address.d.ts +0 -37
- package/dist/js/src/fabric/interfaces/address.d.ts.map +0 -1
- package/dist/js/src/fabric/interfaces/capabilities.d.ts +0 -29
- package/dist/js/src/fabric/interfaces/capabilities.d.ts.map +0 -1
- package/dist/js/src/fabric/interfaces/conversation.d.ts +0 -105
- package/dist/js/src/fabric/interfaces/conversation.d.ts.map +0 -1
- package/dist/js/src/fabric/interfaces/device.d.ts +0 -18
- package/dist/js/src/fabric/interfaces/device.d.ts.map +0 -1
- package/dist/js/src/fabric/interfaces/httpClient.d.ts +0 -41
- package/dist/js/src/fabric/interfaces/httpClient.d.ts.map +0 -1
- package/dist/js/src/fabric/interfaces/incomingCallManager.d.ts +0 -30
- package/dist/js/src/fabric/interfaces/incomingCallManager.d.ts.map +0 -1
- package/dist/js/src/fabric/interfaces/index.d.ts +0 -71
- package/dist/js/src/fabric/interfaces/index.d.ts.map +0 -1
- package/dist/js/src/fabric/interfaces/wsClient.d.ts +0 -132
- package/dist/js/src/fabric/interfaces/wsClient.d.ts.map +0 -1
- package/dist/js/src/fabric/utils/capabilitiesHelpers.d.ts +0 -28
- package/dist/js/src/fabric/utils/capabilitiesHelpers.d.ts.map +0 -1
- package/dist/js/src/fabric/utils/constants.d.ts +0 -5
- package/dist/js/src/fabric/utils/constants.d.ts.map +0 -1
- package/dist/js/src/fabric/utils/eventMappers.d.ts +0 -151
- package/dist/js/src/fabric/utils/eventMappers.d.ts.map +0 -1
- package/dist/js/src/fabric/utils/typeGuard.d.ts +0 -6
- package/dist/js/src/fabric/utils/typeGuard.d.ts.map +0 -1
- package/dist/js/src/fabric/utils/validationProxy.d.ts +0 -13
- package/dist/js/src/fabric/utils/validationProxy.d.ts.map +0 -1
- package/dist/js/src/fabric/utils/validators.d.ts +0 -20
- package/dist/js/src/fabric/utils/validators.d.ts.map +0 -1
- package/dist/js/src/fabric/workers/callJoinWorker.d.ts +0 -4
- package/dist/js/src/fabric/workers/callJoinWorker.d.ts.map +0 -1
- package/dist/js/src/fabric/workers/callLeftWorker.d.ts +0 -4
- package/dist/js/src/fabric/workers/callLeftWorker.d.ts.map +0 -1
- package/dist/js/src/fabric/workers/callSegmentWorker.d.ts +0 -4
- package/dist/js/src/fabric/workers/callSegmentWorker.d.ts.map +0 -1
- package/dist/js/src/fabric/workers/fabricMemberWorker.d.ts +0 -4
- package/dist/js/src/fabric/workers/fabricMemberWorker.d.ts.map +0 -1
- package/dist/js/src/fabric/workers/fabricWorker.d.ts +0 -7
- package/dist/js/src/fabric/workers/fabricWorker.d.ts.map +0 -1
- package/dist/js/src/fabric/workers/index.d.ts +0 -3
- package/dist/js/src/fabric/workers/index.d.ts.map +0 -1
- package/dist/js/src/fabric/workers/wsClientWorker.d.ts +0 -4
- package/dist/js/src/fabric/workers/wsClientWorker.d.ts.map +0 -1
- package/dist/js/src/features/actions.d.ts +0 -2
- package/dist/js/src/features/actions.d.ts.map +0 -1
- package/dist/js/src/features/mediaElements/mediaElementsSagas.d.ts +0 -7
- package/dist/js/src/features/mediaElements/mediaElementsSagas.d.ts.map +0 -1
- package/dist/js/src/index.d.ts +0 -87
- package/dist/js/src/index.d.ts.map +0 -1
- package/dist/js/src/joinRoom.d.ts +0 -24
- package/dist/js/src/joinRoom.d.ts.map +0 -1
- package/dist/js/src/pubSub/Client.d.ts +0 -46
- package/dist/js/src/pubSub/Client.d.ts.map +0 -1
- package/dist/js/src/pubSub/index.d.ts +0 -6
- package/dist/js/src/pubSub/index.d.ts.map +0 -1
- package/dist/js/src/setupTests.d.ts +0 -2
- package/dist/js/src/setupTests.d.ts.map +0 -1
- package/dist/js/src/testUtils.d.ts +0 -77
- package/dist/js/src/testUtils.d.ts.map +0 -1
- package/dist/js/src/utils/CloseEvent.d.ts +0 -7
- package/dist/js/src/utils/CloseEvent.d.ts.map +0 -1
- package/dist/js/src/utils/audioElement.d.ts +0 -6
- package/dist/js/src/utils/audioElement.d.ts.map +0 -1
- package/dist/js/src/utils/constants.d.ts +0 -2
- package/dist/js/src/utils/constants.d.ts.map +0 -1
- package/dist/js/src/utils/interfaces/base.d.ts +0 -55
- package/dist/js/src/utils/interfaces/base.d.ts.map +0 -1
- package/dist/js/src/utils/interfaces/fabric.d.ts +0 -71
- package/dist/js/src/utils/interfaces/fabric.d.ts.map +0 -1
- package/dist/js/src/utils/interfaces/index.d.ts +0 -4
- package/dist/js/src/utils/interfaces/index.d.ts.map +0 -1
- package/dist/js/src/utils/interfaces/video.d.ts +0 -307
- package/dist/js/src/utils/interfaces/video.d.ts.map +0 -1
- package/dist/js/src/utils/makeQueryParamsUrl.d.ts +0 -9
- package/dist/js/src/utils/makeQueryParamsUrl.d.ts.map +0 -1
- package/dist/js/src/utils/paginatedResult.d.ts +0 -12
- package/dist/js/src/utils/paginatedResult.d.ts.map +0 -1
- package/dist/js/src/utils/roomSession.d.ts +0 -26
- package/dist/js/src/utils/roomSession.d.ts.map +0 -1
- package/dist/js/src/utils/storage.d.ts +0 -10
- package/dist/js/src/utils/storage.d.ts.map +0 -1
- package/dist/js/src/utils/videoElement.d.ts +0 -35
- package/dist/js/src/utils/videoElement.d.ts.map +0 -1
- package/dist/js/src/video/RoomSession.d.ts +0 -38
- package/dist/js/src/video/RoomSession.d.ts.map +0 -1
- package/dist/js/src/video/VideoRoomSession.d.ts +0 -57
- package/dist/js/src/video/VideoRoomSession.d.ts.map +0 -1
- package/dist/js/src/video/index.d.ts +0 -16
- package/dist/js/src/video/index.d.ts.map +0 -1
- package/dist/js/src/video/workers/childMemberJoinedWorker.d.ts +0 -10
- package/dist/js/src/video/workers/childMemberJoinedWorker.d.ts.map +0 -1
- package/dist/js/src/video/workers/index.d.ts +0 -7
- package/dist/js/src/video/workers/index.d.ts.map +0 -1
- package/dist/js/src/video/workers/memberListUpdatedWorker.d.ts +0 -14
- package/dist/js/src/video/workers/memberListUpdatedWorker.d.ts.map +0 -1
- package/dist/js/src/video/workers/videoPlaybackWorker.d.ts +0 -4
- package/dist/js/src/video/workers/videoPlaybackWorker.d.ts.map +0 -1
- package/dist/js/src/video/workers/videoRecordWorker.d.ts +0 -4
- package/dist/js/src/video/workers/videoRecordWorker.d.ts.map +0 -1
- package/dist/js/src/video/workers/videoStreamWorker.d.ts +0 -4
- package/dist/js/src/video/workers/videoStreamWorker.d.ts.map +0 -1
- package/dist/js/src/video/workers/videoWorker.d.ts +0 -7
- package/dist/js/src/video/workers/videoWorker.d.ts.map +0 -1
- package/dist/js/src/webrtc.d.ts +0 -3
- package/dist/js/src/webrtc.d.ts.map +0 -1
- package/dist/js/tsconfig.build.tsbuildinfo +0 -1
- package/dist/webrtc/src/BaseConnection.d.ts +0 -232
- package/dist/webrtc/src/BaseConnection.d.ts.map +0 -1
- package/dist/webrtc/src/RTCPeer.d.ts +0 -134
- package/dist/webrtc/src/RTCPeer.d.ts.map +0 -1
- package/dist/webrtc/src/RTCPeer.test.d.ts +0 -2
- package/dist/webrtc/src/RTCPeer.test.d.ts.map +0 -1
- package/dist/webrtc/src/RTCPeerConnectionManager.d.ts +0 -63
- package/dist/webrtc/src/RTCPeerConnectionManager.d.ts.map +0 -1
- package/dist/webrtc/src/RTCPeerConnectionManager.test.d.ts +0 -2
- package/dist/webrtc/src/RTCPeerConnectionManager.test.d.ts.map +0 -1
- package/dist/webrtc/src/connectionPoolManager.d.ts +0 -14
- package/dist/webrtc/src/connectionPoolManager.d.ts.map +0 -1
- package/dist/webrtc/src/index.d.ts +0 -7
- package/dist/webrtc/src/index.d.ts.map +0 -1
- package/dist/webrtc/src/index.test.d.ts +0 -1
- package/dist/webrtc/src/index.test.d.ts.map +0 -1
- package/dist/webrtc/src/setupTests.d.ts +0 -2
- package/dist/webrtc/src/setupTests.d.ts.map +0 -1
- package/dist/webrtc/src/utils/constants.d.ts +0 -7
- package/dist/webrtc/src/utils/constants.d.ts.map +0 -1
- package/dist/webrtc/src/utils/deviceHelpers.d.ts +0 -319
- package/dist/webrtc/src/utils/deviceHelpers.d.ts.map +0 -1
- package/dist/webrtc/src/utils/deviceHelpers.test.d.ts +0 -2
- package/dist/webrtc/src/utils/deviceHelpers.test.d.ts.map +0 -1
- package/dist/webrtc/src/utils/enumerateDevices.d.ts +0 -25
- package/dist/webrtc/src/utils/enumerateDevices.d.ts.map +0 -1
- package/dist/webrtc/src/utils/getDisplayMedia.d.ts +0 -17
- package/dist/webrtc/src/utils/getDisplayMedia.d.ts.map +0 -1
- package/dist/webrtc/src/utils/getUserMedia.d.ts +0 -35
- package/dist/webrtc/src/utils/getUserMedia.d.ts.map +0 -1
- package/dist/webrtc/src/utils/helpers.d.ts +0 -18
- package/dist/webrtc/src/utils/helpers.d.ts.map +0 -1
- package/dist/webrtc/src/utils/helpers.test.d.ts +0 -2
- package/dist/webrtc/src/utils/helpers.test.d.ts.map +0 -1
- package/dist/webrtc/src/utils/index.d.ts +0 -8
- package/dist/webrtc/src/utils/index.d.ts.map +0 -1
- package/dist/webrtc/src/utils/interfaces.d.ts +0 -139
- package/dist/webrtc/src/utils/interfaces.d.ts.map +0 -1
- package/dist/webrtc/src/utils/mockTracks.d.ts +0 -26
- package/dist/webrtc/src/utils/mockTracks.d.ts.map +0 -1
- package/dist/webrtc/src/utils/permissions.d.ts +0 -48
- package/dist/webrtc/src/utils/permissions.d.ts.map +0 -1
- package/dist/webrtc/src/utils/primitives.d.ts +0 -54
- package/dist/webrtc/src/utils/primitives.d.ts.map +0 -1
- package/dist/webrtc/src/utils/primitives.native.d.ts +0 -36
- package/dist/webrtc/src/utils/primitives.native.d.ts.map +0 -1
- package/dist/webrtc/src/utils/requestPermissions.d.ts +0 -27
- package/dist/webrtc/src/utils/requestPermissions.d.ts.map +0 -1
- package/dist/webrtc/src/utils/sdpHelpers.d.ts +0 -61
- package/dist/webrtc/src/utils/sdpHelpers.d.ts.map +0 -1
- package/dist/webrtc/src/utils/sdpHelpers.test.d.ts +0 -2
- package/dist/webrtc/src/utils/sdpHelpers.test.d.ts.map +0 -1
- package/dist/webrtc/src/utils/watchRTCPeerMediaPackets.d.ts +0 -7
- package/dist/webrtc/src/utils/watchRTCPeerMediaPackets.d.ts.map +0 -1
- package/dist/webrtc/src/utils/webrtcHelpers.test.d.ts +0 -2
- package/dist/webrtc/src/utils/webrtcHelpers.test.d.ts.map +0 -1
- package/dist/webrtc/src/webrtcMocks.d.ts +0 -110
- package/dist/webrtc/src/webrtcMocks.d.ts.map +0 -1
- package/dist/webrtc/src/workers/connectionPoolWorker.d.ts +0 -7
- package/dist/webrtc/src/workers/connectionPoolWorker.d.ts.map +0 -1
- package/dist/webrtc/src/workers/index.d.ts +0 -7
- package/dist/webrtc/src/workers/index.d.ts.map +0 -1
- package/dist/webrtc/src/workers/promoteDemoteWorker.d.ts +0 -10
- package/dist/webrtc/src/workers/promoteDemoteWorker.d.ts.map +0 -1
- package/dist/webrtc/src/workers/roomSubscribedWorker.d.ts +0 -10
- package/dist/webrtc/src/workers/roomSubscribedWorker.d.ts.map +0 -1
- package/dist/webrtc/src/workers/sessionAuthWorker.d.ts +0 -10
- package/dist/webrtc/src/workers/sessionAuthWorker.d.ts.map +0 -1
- package/dist/webrtc/src/workers/sessionConnectionPoolWorker.d.ts +0 -7
- package/dist/webrtc/src/workers/sessionConnectionPoolWorker.d.ts.map +0 -1
- package/dist/webrtc/src/workers/vertoEventWorker.d.ts +0 -10
- package/dist/webrtc/src/workers/vertoEventWorker.d.ts.map +0 -1
- package/dist/webrtc/src/workers/vertoEventWorker.test.d.ts +0 -2
- package/dist/webrtc/src/workers/vertoEventWorker.test.d.ts.map +0 -1
- package/src/BaseRoomSession.ts +0 -302
- package/src/Client.ts +0 -193
- package/src/JWTSession.test.ts +0 -60
- package/src/JWTSession.ts +0 -146
- package/src/RoomSessionDevice.test.ts +0 -25
- package/src/RoomSessionDevice.ts +0 -62
- package/src/RoomSessionScreenShare.test.ts +0 -25
- package/src/RoomSessionScreenShare.ts +0 -58
- package/src/VideoOverlays.ts +0 -171
- package/src/buildVideoElement.test.ts +0 -933
- package/src/buildVideoElement.ts +0 -290
- package/src/cantina/VideoManager.test.ts +0 -95
- package/src/cantina/VideoManager.ts +0 -72
- package/src/cantina/index.ts +0 -1
- package/src/cantina/workers/index.ts +0 -1
- package/src/cantina/workers/videoManagerRoomWorker.ts +0 -28
- package/src/cantina/workers/videoManagerRoomsWorker.ts +0 -34
- package/src/cantina/workers/videoManagerWorker.ts +0 -64
- package/src/chat/Client.test.ts +0 -688
- package/src/chat/Client.ts +0 -94
- package/src/chat/index.ts +0 -31
- package/src/createClient.test.ts +0 -124
- package/src/createClient.ts +0 -48
- package/src/createRoomObject.ts +0 -149
- package/src/fabric/FabricRoomSession.test.ts +0 -695
- package/src/fabric/FabricRoomSession.ts +0 -446
- package/src/fabric/FabricRoomSessionMember.ts +0 -188
- package/src/fabric/HTTPClient.test.ts +0 -28
- package/src/fabric/HTTPClient.ts +0 -154
- package/src/fabric/IncomingCallManager.test.ts +0 -295
- package/src/fabric/IncomingCallManager.ts +0 -92
- package/src/fabric/SATSession.test.ts +0 -65
- package/src/fabric/SATSession.ts +0 -102
- package/src/fabric/SignalWire.test.ts +0 -115
- package/src/fabric/SignalWire.ts +0 -101
- package/src/fabric/WSClient.ts +0 -430
- package/src/fabric/createHttpClient.ts +0 -188
- package/src/fabric/createWSClient.ts +0 -12
- package/src/fabric/index.ts +0 -30
- package/src/fabric/interfaces/address.ts +0 -46
- package/src/fabric/interfaces/capabilities.ts +0 -30
- package/src/fabric/interfaces/conversation.ts +0 -145
- package/src/fabric/interfaces/device.ts +0 -21
- package/src/fabric/interfaces/httpClient.ts +0 -50
- package/src/fabric/interfaces/incomingCallManager.ts +0 -36
- package/src/fabric/interfaces/index.ts +0 -118
- package/src/fabric/interfaces/wsClient.ts +0 -154
- package/src/fabric/utils/capabilitiesHelpers.test.ts +0 -201
- package/src/fabric/utils/capabilitiesHelpers.ts +0 -208
- package/src/fabric/utils/constants.ts +0 -4
- package/src/fabric/utils/eventMappers.ts +0 -184
- package/src/fabric/utils/typeGuard.ts +0 -31
- package/src/fabric/utils/validationProxy.ts +0 -83
- package/src/fabric/utils/validators.ts +0 -242
- package/src/fabric/workers/callJoinWorker.ts +0 -88
- package/src/fabric/workers/callLeftWorker.ts +0 -32
- package/src/fabric/workers/callSegmentWorker.ts +0 -154
- package/src/fabric/workers/fabricMemberWorker.ts +0 -62
- package/src/fabric/workers/fabricWorker.ts +0 -100
- package/src/fabric/workers/index.ts +0 -2
- package/src/fabric/workers/wsClientWorker.ts +0 -60
- package/src/features/actions.ts +0 -5
- package/src/features/mediaElements/mediaElementsSagas.ts +0 -129
- package/src/index.test.ts +0 -5
- package/src/index.ts +0 -153
- package/src/joinRoom.ts +0 -29
- package/src/pubSub/Client.test.ts +0 -245
- package/src/pubSub/Client.ts +0 -90
- package/src/pubSub/index.ts +0 -10
- package/src/setupTests.ts +0 -122
- package/src/testUtils.ts +0 -259
- package/src/utils/CloseEvent.ts +0 -6
- package/src/utils/audioElement.ts +0 -21
- package/src/utils/constants.ts +0 -7
- package/src/utils/interfaces/base.ts +0 -55
- package/src/utils/interfaces/fabric.ts +0 -156
- package/src/utils/interfaces/index.ts +0 -3
- package/src/utils/interfaces/video.ts +0 -440
- package/src/utils/makeQueryParamsUrl.ts +0 -14
- package/src/utils/paginatedResult.ts +0 -35
- package/src/utils/roomSession.test.ts +0 -140
- package/src/utils/roomSession.ts +0 -85
- package/src/utils/storage.test.ts +0 -24
- package/src/utils/storage.ts +0 -37
- package/src/utils/videoElement.ts +0 -342
- package/src/video/RoomSession.test.ts +0 -31
- package/src/video/RoomSession.ts +0 -290
- package/src/video/VideoRoomSession.test.ts +0 -672
- package/src/video/VideoRoomSession.ts +0 -304
- package/src/video/index.ts +0 -43
- package/src/video/workers/childMemberJoinedWorker.test.ts +0 -99
- package/src/video/workers/childMemberJoinedWorker.ts +0 -75
- package/src/video/workers/index.ts +0 -6
- package/src/video/workers/memberListUpdatedWorker.ts +0 -217
- package/src/video/workers/videoPlaybackWorker.ts +0 -54
- package/src/video/workers/videoRecordWorker.ts +0 -54
- package/src/video/workers/videoStreamWorker.ts +0 -48
- package/src/video/workers/videoWorker.ts +0 -113
- package/src/webrtc.ts +0 -33
package/src/utils/roomSession.ts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { getLogger } from '@signalwire/core'
|
|
2
|
-
import type { VideoAuthorization } from '@signalwire/core'
|
|
3
|
-
import type { BaseRoomSessionJoinParams } from './interfaces'
|
|
4
|
-
|
|
5
|
-
type GetJoinMediaParamsOptions = BaseRoomSessionJoinParams & {
|
|
6
|
-
authorization: VideoAuthorization
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* getJoinMediaParams returns whether the Join method must send/recv
|
|
10
|
-
* audio and video.
|
|
11
|
-
* Based on values on the Auth block (media allowed and join_as type)
|
|
12
|
-
* it matches the user's preferences and return an object that tells
|
|
13
|
-
* if the negotiation has to include sendrecv/sendonly or recvonly
|
|
14
|
-
* for audio and video.
|
|
15
|
-
*/
|
|
16
|
-
export const getJoinMediaParams = (options: GetJoinMediaParamsOptions) => {
|
|
17
|
-
const {
|
|
18
|
-
authorization,
|
|
19
|
-
audio = true,
|
|
20
|
-
video = true,
|
|
21
|
-
sendAudio,
|
|
22
|
-
sendVideo,
|
|
23
|
-
receiveAudio,
|
|
24
|
-
receiveVideo,
|
|
25
|
-
} = options
|
|
26
|
-
getLogger().debug('getJoinMediaParams options', { ...options })
|
|
27
|
-
const { audio_allowed, video_allowed, join_as } = authorization
|
|
28
|
-
// Fallback to 'member' in case of null/undefined
|
|
29
|
-
const joinAs = join_as ?? 'member'
|
|
30
|
-
const canSend = joinAs === 'member'
|
|
31
|
-
|
|
32
|
-
const canSendAudio = canSend && audio_allowed === 'both'
|
|
33
|
-
const canSendVideo = canSend && video_allowed === 'both'
|
|
34
|
-
const canReceiveAudio = audio_allowed !== 'none'
|
|
35
|
-
const canReceiveVideo = video_allowed !== 'none'
|
|
36
|
-
|
|
37
|
-
const reqToSendAudio = Boolean(sendAudio ?? audio)
|
|
38
|
-
const reqToSendVideo = Boolean(sendVideo ?? video)
|
|
39
|
-
const reqToReceiveAudio = Boolean(receiveAudio ?? audio)
|
|
40
|
-
const reqToReceiveVideo = Boolean(receiveVideo ?? video)
|
|
41
|
-
|
|
42
|
-
if (!canSendAudio && reqToSendAudio) {
|
|
43
|
-
getLogger().info(
|
|
44
|
-
'Not allowed to send audio on this room. Default values will be used.'
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
if (!canSendVideo && reqToSendVideo) {
|
|
48
|
-
getLogger().info(
|
|
49
|
-
'Not allowed to send video on this room. Default values will be used.'
|
|
50
|
-
)
|
|
51
|
-
}
|
|
52
|
-
if (!canReceiveAudio && reqToReceiveAudio) {
|
|
53
|
-
getLogger().info(
|
|
54
|
-
'Not allowed to receive video from the room. Default values will be used.'
|
|
55
|
-
)
|
|
56
|
-
}
|
|
57
|
-
if (!canReceiveVideo && reqToReceiveVideo) {
|
|
58
|
-
getLogger().info(
|
|
59
|
-
'Not allowed to receive video from the room. Default values will be used.'
|
|
60
|
-
)
|
|
61
|
-
}
|
|
62
|
-
return {
|
|
63
|
-
mustSendAudio: canSendAudio && reqToSendAudio,
|
|
64
|
-
mustSendVideo: canSendVideo && reqToSendVideo,
|
|
65
|
-
mustRecvAudio: canReceiveAudio && reqToReceiveAudio,
|
|
66
|
-
mustRecvVideo: canReceiveVideo && reqToReceiveVideo,
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export const checkMediaParams = (
|
|
71
|
-
options: Record<string, boolean | undefined>
|
|
72
|
-
) => {
|
|
73
|
-
// At least one value must be true
|
|
74
|
-
return Object.values(options).some(Boolean)
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export const SDK_PREFIX = 'sw-sdk-'
|
|
78
|
-
export const addSDKPrefix = (id: string) => {
|
|
79
|
-
return `${SDK_PREFIX}${id}`
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export const OVERLAY_PREFIX = 'sw-overlay-'
|
|
83
|
-
export const addOverlayPrefix = (id: string) => {
|
|
84
|
-
return `${OVERLAY_PREFIX}${id}`
|
|
85
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { sessionStorageManager } from './storage'
|
|
2
|
-
|
|
3
|
-
describe('sessionStorageManager', () => {
|
|
4
|
-
it('should return expected keys', () => {
|
|
5
|
-
const token =
|
|
6
|
-
'eyJ0eXBiOiJWUlQiLCJjaCI6InJlbGF5LnNpZ25hbHdpcmUuY29tIiwiYWxnIjoiPOE1MTIifQ.eyJpYXQiOjE2ODg0NjE3MDMsImp0aSI6IjA1YWZkODczLTI4MGUtNDYzNC1iNmQzLWMwMzk4YzE2NGVlMSIsInN1YiI6IjRiN2FlNzhhLWQwMmUtNDg4OS1hNjNiLTA4YjE1NmQ1OTE2ZSIsInUiOiJqZXN0IiwiamEiOiJtZW1iZXIiLCJyIjoidGVhbS10ZXN0IiwicyI6W10sImFjciI6dHJ1ZSwibWEiOiJhbGwiLCJtdGEiOnt9LCJybXRhIjp7fX0.r1JWiEckaids8mm9ESUraCuXWc6Ysa6qMMmuNzRiOf94PO8VwoL_gIr1LDopDtffk-EFUUB4ZsOl8gK-u-qU7A'
|
|
7
|
-
const manager = sessionStorageManager(token)
|
|
8
|
-
expect(manager).toStrictEqual({
|
|
9
|
-
authStateKey: 'as-team-test',
|
|
10
|
-
protocolKey: 'pt-team-test',
|
|
11
|
-
callIdKey: 'ci-team-test',
|
|
12
|
-
})
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
it('should return falsy values', () => {
|
|
16
|
-
const token = 'foo'
|
|
17
|
-
const manager = sessionStorageManager(token)
|
|
18
|
-
expect(manager).toStrictEqual({
|
|
19
|
-
authStateKey: false,
|
|
20
|
-
protocolKey: false,
|
|
21
|
-
callIdKey: false,
|
|
22
|
-
})
|
|
23
|
-
})
|
|
24
|
-
})
|
package/src/utils/storage.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import jwtDecode from 'jwt-decode'
|
|
2
|
-
import { getLogger } from '@signalwire/core'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Note: ready to support RN with a "storage.native.ts" file.
|
|
6
|
-
*/
|
|
7
|
-
export const getStorage = () => {
|
|
8
|
-
if (window && window.sessionStorage) {
|
|
9
|
-
return window.sessionStorage
|
|
10
|
-
}
|
|
11
|
-
return undefined
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const sessionStorageManager = (token: string) => {
|
|
15
|
-
let roomName: string = ''
|
|
16
|
-
try {
|
|
17
|
-
const jwtPayload = jwtDecode<{ r: string; ja: string }>(token)
|
|
18
|
-
roomName = jwtPayload?.r ?? ''
|
|
19
|
-
} catch (e) {
|
|
20
|
-
try {
|
|
21
|
-
const jwtPayload = jwtDecode<{ typ: string}>(token, {header: true})
|
|
22
|
-
roomName = jwtPayload.typ || ''
|
|
23
|
-
} catch {
|
|
24
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
25
|
-
getLogger().error('[sessionStorageManager] error decoding JWT', token)
|
|
26
|
-
}
|
|
27
|
-
roomName = ''
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const valid = Boolean(roomName)
|
|
32
|
-
return {
|
|
33
|
-
authStateKey: valid && `as-${roomName}`,
|
|
34
|
-
protocolKey: valid && `pt-${roomName}`,
|
|
35
|
-
callIdKey: valid && `ci-${roomName}`,
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,342 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getLogger,
|
|
3
|
-
InternalVideoLayoutLayer,
|
|
4
|
-
InternalVideoLayout,
|
|
5
|
-
debounce,
|
|
6
|
-
uuid,
|
|
7
|
-
} from '@signalwire/core'
|
|
8
|
-
import { OverlayMap, LocalVideoOverlay, UserOverlay } from '../VideoOverlays'
|
|
9
|
-
import { addOverlayPrefix } from './roomSession'
|
|
10
|
-
|
|
11
|
-
const buildVideo = () => {
|
|
12
|
-
const video = document.createElement('video')
|
|
13
|
-
video.muted = true
|
|
14
|
-
video.autoplay = true
|
|
15
|
-
video.playsInline = true
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Local and Remote video elements should never be paused
|
|
19
|
-
* and Safari/Firefox pause the video (ie: enabling PiP, switch cameras etc)
|
|
20
|
-
* We try to force it to keep playing.
|
|
21
|
-
*/
|
|
22
|
-
video.addEventListener('pause', () => {
|
|
23
|
-
video.play().catch((error) => {
|
|
24
|
-
getLogger().error('Video Element Paused', video, error)
|
|
25
|
-
})
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
return video
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const waitForVideoReady = ({ element }: { element: HTMLVideoElement }) => {
|
|
32
|
-
return new Promise<void>((resolve) => {
|
|
33
|
-
element.addEventListener('canplay', function listener() {
|
|
34
|
-
element.removeEventListener('canplay', listener)
|
|
35
|
-
resolve()
|
|
36
|
-
})
|
|
37
|
-
element.addEventListener('resize', function listener() {
|
|
38
|
-
element.removeEventListener('resize', listener)
|
|
39
|
-
resolve()
|
|
40
|
-
})
|
|
41
|
-
})
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const _getLocationStyles = ({
|
|
45
|
-
x,
|
|
46
|
-
y,
|
|
47
|
-
width,
|
|
48
|
-
height,
|
|
49
|
-
}: InternalVideoLayoutLayer) => {
|
|
50
|
-
return {
|
|
51
|
-
top: `${y}%`,
|
|
52
|
-
left: `${x}%`,
|
|
53
|
-
width: `${width}%`,
|
|
54
|
-
height: `${height}%`,
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const _buildLayer = ({ location }: { location: InternalVideoLayoutLayer }) => {
|
|
59
|
-
const { top, left, width, height } = _getLocationStyles(location)
|
|
60
|
-
const layer = document.createElement('div')
|
|
61
|
-
layer.style.position = 'absolute'
|
|
62
|
-
layer.style.overflow = 'hidden'
|
|
63
|
-
layer.style.top = top
|
|
64
|
-
layer.style.left = left
|
|
65
|
-
layer.style.width = width
|
|
66
|
-
layer.style.height = height
|
|
67
|
-
|
|
68
|
-
return layer
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const _updateLayer = ({
|
|
72
|
-
location,
|
|
73
|
-
element,
|
|
74
|
-
}: {
|
|
75
|
-
location: InternalVideoLayoutLayer
|
|
76
|
-
element: HTMLElement
|
|
77
|
-
}) => {
|
|
78
|
-
const { top, left, width, height } = _getLocationStyles(location)
|
|
79
|
-
element.style.top = top
|
|
80
|
-
element.style.left = left
|
|
81
|
-
element.style.width = width
|
|
82
|
-
element.style.height = height
|
|
83
|
-
|
|
84
|
-
return element
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
interface MakeLayoutChangedHandlerParams {
|
|
88
|
-
applyLocalVideoOverlay?: boolean
|
|
89
|
-
applyMemberOverlay?: boolean
|
|
90
|
-
overlayMap: OverlayMap
|
|
91
|
-
localVideoOverlay: LocalVideoOverlay
|
|
92
|
-
mirrorLocalVideoOverlay?: boolean
|
|
93
|
-
rootElement: HTMLElement
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
interface LayoutChangedHandlerParams {
|
|
97
|
-
layout: InternalVideoLayout
|
|
98
|
-
memberId: string
|
|
99
|
-
localStream: MediaStream
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
const makeLayoutChangedHandler = (params: MakeLayoutChangedHandlerParams) => {
|
|
103
|
-
const {
|
|
104
|
-
applyLocalVideoOverlay,
|
|
105
|
-
applyMemberOverlay,
|
|
106
|
-
overlayMap,
|
|
107
|
-
localVideoOverlay,
|
|
108
|
-
mirrorLocalVideoOverlay,
|
|
109
|
-
rootElement,
|
|
110
|
-
} = params
|
|
111
|
-
|
|
112
|
-
return async (params: LayoutChangedHandlerParams) => {
|
|
113
|
-
getLogger().debug('Process layout.changed')
|
|
114
|
-
try {
|
|
115
|
-
const { layout, memberId, localStream } = params
|
|
116
|
-
const { layers = [] } = layout
|
|
117
|
-
const mcuLayers = rootElement.querySelector('.mcuLayers')
|
|
118
|
-
|
|
119
|
-
// To handle the DOM updates in batch
|
|
120
|
-
const fragment = document.createDocumentFragment()
|
|
121
|
-
const currentOverlayIds = new Set()
|
|
122
|
-
|
|
123
|
-
// Make local video overlay for the self member
|
|
124
|
-
if (applyLocalVideoOverlay) {
|
|
125
|
-
const location = layers.find(({ member_id }) => member_id === memberId)
|
|
126
|
-
const overlayId = localVideoOverlay.id // LocalVideoOverlay ID is already unique
|
|
127
|
-
let myLayerEl = localVideoOverlay.domElement
|
|
128
|
-
currentOverlayIds.add(overlayId)
|
|
129
|
-
|
|
130
|
-
if (!location) {
|
|
131
|
-
getLogger().warn('Local video overlay location not found', memberId)
|
|
132
|
-
localVideoOverlay.status = 'hidden'
|
|
133
|
-
if (myLayerEl) {
|
|
134
|
-
// Should we remove it from the DOM and the OverlayMap?
|
|
135
|
-
localVideoOverlay.hide()
|
|
136
|
-
}
|
|
137
|
-
} else {
|
|
138
|
-
if (myLayerEl) {
|
|
139
|
-
getLogger().debug('Update local video overlay')
|
|
140
|
-
_updateLayer({ location, element: myLayerEl })
|
|
141
|
-
} else {
|
|
142
|
-
getLogger().debug('Build local video overlay')
|
|
143
|
-
myLayerEl = _buildLayer({ location })
|
|
144
|
-
myLayerEl.id = overlayId
|
|
145
|
-
|
|
146
|
-
const localVideo = buildVideo()
|
|
147
|
-
localVideo.srcObject = localStream
|
|
148
|
-
localVideo.disablePictureInPicture = true
|
|
149
|
-
localVideo.style.width = '100%'
|
|
150
|
-
localVideo.style.height = '100%'
|
|
151
|
-
localVideo.style.pointerEvents = 'none'
|
|
152
|
-
localVideo.style.objectFit = 'cover'
|
|
153
|
-
|
|
154
|
-
myLayerEl.appendChild(localVideo)
|
|
155
|
-
localVideoOverlay.domElement = myLayerEl
|
|
156
|
-
|
|
157
|
-
// Mirror the local video if user has requested it
|
|
158
|
-
if (mirrorLocalVideoOverlay) {
|
|
159
|
-
localVideoOverlay.setMirror()
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// Show local overlay element only if the localStream has a valid video track
|
|
164
|
-
const hasVideo =
|
|
165
|
-
localStream
|
|
166
|
-
.getVideoTracks()
|
|
167
|
-
.filter((t) => t.enabled && t.readyState === 'live').length > 0
|
|
168
|
-
if (hasVideo && location.visible) {
|
|
169
|
-
localVideoOverlay.setMediaStream(localStream)
|
|
170
|
-
localVideoOverlay.show()
|
|
171
|
-
} else {
|
|
172
|
-
localVideoOverlay.hide()
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// Append the local video overlay to the fragment
|
|
176
|
-
fragment.appendChild(myLayerEl)
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
// Make overlay for all members (including a self member)
|
|
181
|
-
if (applyMemberOverlay) {
|
|
182
|
-
layers.forEach((location) => {
|
|
183
|
-
const memberIdInLocation = location.member_id
|
|
184
|
-
if (!memberIdInLocation) return
|
|
185
|
-
|
|
186
|
-
const overlayId = addOverlayPrefix(memberIdInLocation)
|
|
187
|
-
currentOverlayIds.add(overlayId)
|
|
188
|
-
|
|
189
|
-
let overlay = overlayMap.get(overlayId)
|
|
190
|
-
|
|
191
|
-
if (overlay && overlay.domElement) {
|
|
192
|
-
// If the overlay already exists, modify its styles
|
|
193
|
-
getLogger().debug('Update an overlay for', memberIdInLocation)
|
|
194
|
-
_updateLayer({ location, element: overlay.domElement })
|
|
195
|
-
} else {
|
|
196
|
-
// If the overlay doesn't exist, create a new overlay
|
|
197
|
-
getLogger().debug('Build an overlay for', memberIdInLocation)
|
|
198
|
-
overlay = new UserOverlay({ id: overlayId })
|
|
199
|
-
overlayMap.set(overlayId, overlay)
|
|
200
|
-
|
|
201
|
-
const newLayer = _buildLayer({ location })
|
|
202
|
-
newLayer.id = `${overlayId}-${uuid()}` // Unique DOM ID since user is allowed to build multiple video elements
|
|
203
|
-
|
|
204
|
-
overlay.domElement = newLayer
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
if (!location.visible) {
|
|
208
|
-
overlay.hide()
|
|
209
|
-
} else {
|
|
210
|
-
overlay.show()
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// Append the overlay element to the fragment
|
|
214
|
-
fragment.appendChild(overlay.domElement)
|
|
215
|
-
})
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
// Remove overlays that are no longer present
|
|
219
|
-
overlayMap.forEach((overlay, overlayId) => {
|
|
220
|
-
if (!currentOverlayIds.has(overlayId)) {
|
|
221
|
-
if (overlay.domElement && overlay.domElement.parentNode) {
|
|
222
|
-
overlay.domElement.parentNode.removeChild(overlay.domElement)
|
|
223
|
-
}
|
|
224
|
-
overlayMap.delete(overlayId)
|
|
225
|
-
}
|
|
226
|
-
})
|
|
227
|
-
|
|
228
|
-
// Replace mcuLayers content in batch with the fragment
|
|
229
|
-
if (mcuLayers) {
|
|
230
|
-
mcuLayers.innerHTML = ''
|
|
231
|
-
mcuLayers.appendChild(fragment)
|
|
232
|
-
}
|
|
233
|
-
} catch (error) {
|
|
234
|
-
getLogger().error('Layout Changed Error', error)
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
const cleanupElement = (rootElement: HTMLElement) => {
|
|
240
|
-
while (rootElement.firstChild) {
|
|
241
|
-
rootElement.removeChild(rootElement.firstChild)
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
const setVideoMediaTrack = ({
|
|
246
|
-
track,
|
|
247
|
-
element,
|
|
248
|
-
}: {
|
|
249
|
-
track: MediaStreamTrack
|
|
250
|
-
element: HTMLVideoElement
|
|
251
|
-
}) => {
|
|
252
|
-
element.srcObject = new MediaStream([track])
|
|
253
|
-
|
|
254
|
-
track.addEventListener('ended', () => {
|
|
255
|
-
element.srcObject = null
|
|
256
|
-
element.remove()
|
|
257
|
-
})
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
const createRootElementResizeObserver = ({
|
|
261
|
-
video,
|
|
262
|
-
rootElement,
|
|
263
|
-
paddingWrapper,
|
|
264
|
-
}: {
|
|
265
|
-
video: HTMLVideoElement
|
|
266
|
-
rootElement: HTMLElement
|
|
267
|
-
paddingWrapper: HTMLDivElement
|
|
268
|
-
}) => {
|
|
269
|
-
const computePaddingWrapperWidth = (width: number, height: number) => {
|
|
270
|
-
const nativeVideoRatio = video.videoWidth / video.videoHeight
|
|
271
|
-
const rootElementRatio = width / height
|
|
272
|
-
if (nativeVideoRatio > rootElementRatio) {
|
|
273
|
-
return '100%'
|
|
274
|
-
} else {
|
|
275
|
-
return `${height * nativeVideoRatio}px`
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
// Debounce to avoid multiple calls
|
|
280
|
-
const update = debounce(
|
|
281
|
-
({ width, height }: { width: number; height: number }) => {
|
|
282
|
-
const maxPaddingBottom = (video.videoHeight / video.videoWidth) * 100
|
|
283
|
-
if (paddingWrapper) {
|
|
284
|
-
const pb = (height / width) * 100
|
|
285
|
-
paddingWrapper.style.paddingBottom = `${
|
|
286
|
-
pb > maxPaddingBottom ? maxPaddingBottom : pb
|
|
287
|
-
}%`
|
|
288
|
-
paddingWrapper.style.width = computePaddingWrapperWidth(width, height)
|
|
289
|
-
}
|
|
290
|
-
},
|
|
291
|
-
100
|
|
292
|
-
)
|
|
293
|
-
|
|
294
|
-
const observer = new ResizeObserver((entries) => {
|
|
295
|
-
entries.forEach((entry) => {
|
|
296
|
-
if (entry.contentBoxSize) {
|
|
297
|
-
// Firefox implements `contentBoxSize` as a single content rect, rather than an array
|
|
298
|
-
const { inlineSize, blockSize } = Array.isArray(entry.contentBoxSize)
|
|
299
|
-
? entry.contentBoxSize[0]
|
|
300
|
-
: entry.contentBoxSize
|
|
301
|
-
update({ width: inlineSize, height: blockSize })
|
|
302
|
-
} else if (entry.contentRect) {
|
|
303
|
-
update({
|
|
304
|
-
width: entry.contentRect.width,
|
|
305
|
-
height: entry.contentRect.height,
|
|
306
|
-
})
|
|
307
|
-
}
|
|
308
|
-
})
|
|
309
|
-
})
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* When the intrinsic dimensions of the video changes, the root element resize may or may not trigger.
|
|
313
|
-
* For example; remote stream from the server changes dimensions from 16/9 (Landscape) to 9/16 (Portrait) mode.
|
|
314
|
-
* For this reason we need to listen for the 'resize' event on the video element.
|
|
315
|
-
*/
|
|
316
|
-
const onVideoResize = () => {
|
|
317
|
-
const width = rootElement.clientWidth
|
|
318
|
-
const height = rootElement.clientHeight
|
|
319
|
-
update({ width, height })
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
return {
|
|
323
|
-
start: () => {
|
|
324
|
-
observer.observe(rootElement)
|
|
325
|
-
video.addEventListener('resize', onVideoResize)
|
|
326
|
-
},
|
|
327
|
-
stop: () => {
|
|
328
|
-
observer.disconnect()
|
|
329
|
-
video.removeEventListener('resize', onVideoResize)
|
|
330
|
-
},
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
export {
|
|
335
|
-
buildVideo,
|
|
336
|
-
cleanupElement,
|
|
337
|
-
makeLayoutChangedHandler,
|
|
338
|
-
setVideoMediaTrack,
|
|
339
|
-
waitForVideoReady,
|
|
340
|
-
createRootElementResizeObserver,
|
|
341
|
-
LocalVideoOverlay,
|
|
342
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jest-environment jsdom
|
|
3
|
-
*/
|
|
4
|
-
import { RoomSession, UNSAFE_PROP_ACCESS } from './RoomSession'
|
|
5
|
-
|
|
6
|
-
describe('RoomSession Object', () => {
|
|
7
|
-
it('should control which properties the user can access before connecting the room.', async () => {
|
|
8
|
-
const roomSession = new RoomSession({
|
|
9
|
-
token: '<some-token>',
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
expect(() => roomSession.active).not.toThrow()
|
|
13
|
-
expect(() => roomSession.memberId).not.toThrow()
|
|
14
|
-
expect(() => roomSession.join()).not.toThrow()
|
|
15
|
-
UNSAFE_PROP_ACCESS.map((prop) => {
|
|
16
|
-
// @ts-expect-error
|
|
17
|
-
expect(() => roomSession[prop]).toThrow()
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
// @ts-expect-error
|
|
21
|
-
roomSession.state = 'active'
|
|
22
|
-
|
|
23
|
-
expect(() => roomSession.active).not.toThrow()
|
|
24
|
-
expect(() => roomSession.memberId).not.toThrow()
|
|
25
|
-
expect(() => roomSession.join()).not.toThrow()
|
|
26
|
-
UNSAFE_PROP_ACCESS.map((prop) => {
|
|
27
|
-
// @ts-expect-error
|
|
28
|
-
expect(() => roomSession[prop]).not.toThrow()
|
|
29
|
-
})
|
|
30
|
-
})
|
|
31
|
-
})
|