@signalwire/js 3.19.1 → 3.19.2
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/index.esm.js +8 -1
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +8 -1
- package/dist/index.js.map +2 -2
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/js/src/RoomSession.d.ts.map +1 -1
- package/dist/js/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/RoomSession.ts +16 -1
package/package.json
CHANGED
package/src/RoomSession.ts
CHANGED
|
@@ -8,7 +8,10 @@ import { createClient } from './createClient'
|
|
|
8
8
|
import { BaseRoomSession } from './BaseRoomSession'
|
|
9
9
|
import { checkMediaParams, getJoinMediaParams } from './utils/roomSession'
|
|
10
10
|
import type { MakeRoomOptions } from './Client'
|
|
11
|
-
import type {
|
|
11
|
+
import type {
|
|
12
|
+
BaseRoomSessionJoinParams,
|
|
13
|
+
RoomSessionObjectEvents,
|
|
14
|
+
} from './utils/interfaces'
|
|
12
15
|
import { getStorage, CALL_ID } from './utils/storage'
|
|
13
16
|
|
|
14
17
|
/**
|
|
@@ -54,6 +57,16 @@ export const UNSAFE_PROP_ACCESS = [
|
|
|
54
57
|
'demote',
|
|
55
58
|
]
|
|
56
59
|
|
|
60
|
+
/**
|
|
61
|
+
* List of events that the SDK must subscribe at the invite time.
|
|
62
|
+
* ie. ScreenShare/AdditionaDevice are based on the member.joined logic.
|
|
63
|
+
*/
|
|
64
|
+
const REQUIRED_EVENTS: (keyof RoomSessionObjectEvents)[] = [
|
|
65
|
+
'member.joined',
|
|
66
|
+
'layout.changed',
|
|
67
|
+
]
|
|
68
|
+
const noop = () => {}
|
|
69
|
+
|
|
57
70
|
export interface RoomSessionOptions extends UserOptions, MakeRoomOptions {}
|
|
58
71
|
|
|
59
72
|
export interface RoomSession extends BaseRoomSession<RoomSession> {
|
|
@@ -221,6 +234,8 @@ export const RoomSession = function (roomOptions: RoomSessionOptions) {
|
|
|
221
234
|
// Hijack previous callId if present
|
|
222
235
|
reattachManager.init()
|
|
223
236
|
|
|
237
|
+
REQUIRED_EVENTS.forEach((event) => room.once(event, noop))
|
|
238
|
+
|
|
224
239
|
await room.join()
|
|
225
240
|
} catch (error) {
|
|
226
241
|
getLogger().error('RoomSession Join', error)
|