@reactoo/watchtogether-sdk-js 2.5.42 → 2.5.45

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactoo/watchtogether-sdk-js",
3
- "version": "2.5.42",
3
+ "version": "2.5.45",
4
4
  "description": "Javascript SDK for Reactoo",
5
5
  "main": "src/index.js",
6
6
  "unpkg": "dist/watchtogether-sdk.min.js",
@@ -2,6 +2,7 @@
2
2
 
3
3
  import roomSession from './room-session';
4
4
  import streamingSession from "./streaming-session";
5
+ import {decodeJanusDisplay} from "../modules/wt-utils";
5
6
 
6
7
  let room = function () {
7
8
 
@@ -54,7 +55,7 @@ let room = function () {
54
55
  }))
55
56
  },
56
57
 
57
- createRoom: ({title, description, isPublic, isStudioLayout, wtChannelId, isHd, disableSync, reduceRoomControls, hasStudioChat, maxParticipants, customAttributes, chatRoomId, linkedRoomId, dotAttribute} = {}) => {
58
+ createRoom: ({title, description, isPublic, isRouter, isStudioLayout, wtChannelId, isHd, disableSync, reduceRoomControls, hasStudioChat, maxParticipants, customAttributes, chatRoomId, linkedRoomId, type, dotAttribute} = {}) => {
58
59
  let _da = dotAttribute
59
60
  ? (Array.isArray(dotAttribute)
60
61
  ? dotAttribute.reduce((p, cv) => (p[cv.name] = cv.value) && p || p, {})
@@ -65,6 +66,7 @@ let room = function () {
65
66
  requestBody: {
66
67
  title,
67
68
  description,
69
+ isRouter,
68
70
  isPublic,
69
71
  isStudioLayout,
70
72
  wtChannelId,
@@ -75,6 +77,7 @@ let room = function () {
75
77
  linkedRoomId,
76
78
  hasStudioChat,
77
79
  maxParticipants,
80
+ type,
78
81
  customAttributes,
79
82
  ..._da,
80
83
  instanceType: this.__instanceType,
@@ -82,7 +85,7 @@ let room = function () {
82
85
  }))
83
86
  },
84
87
 
85
- updateRoom: ({roomId, title, description, isPublic, recordings, slug, password, maxParticipants, setInstanceType = false, wtChannelId, isHd, isStudioLayout, hasStudioChat, reduceRoomControls, chatRoomId, linkedRoomId, disableSync, defaultRegion, customAttributes, dotAttribute} = {}) => {
88
+ updateRoom: ({roomId, title, description, isPublic, isRouter, recordings, slug, password, maxParticipants, setInstanceType = false, wtChannelId, isHd, isStudioLayout, hasStudioChat, reduceRoomControls, chatRoomId, linkedRoomId, type, disableSync, defaultRegion, customAttributes, dotAttribute} = {}) => {
86
89
  let _da = dotAttribute
87
90
  ? (Array.isArray(dotAttribute)
88
91
  ? dotAttribute.reduce((p, cv) => (p[cv.name] = cv.value) && p || p, {})
@@ -96,6 +99,7 @@ let room = function () {
96
99
  slug,
97
100
  password,
98
101
  isPublic,
102
+ isRouter,
99
103
  isHd,
100
104
  isStudioLayout,
101
105
  hasStudioChat,
@@ -103,6 +107,7 @@ let room = function () {
103
107
  reduceRoomControls,
104
108
  chatRoomId,
105
109
  linkedRoomId,
110
+ type,
106
111
  disableSync,
107
112
  defaultRegion,
108
113
  customAttributes,
@@ -298,7 +303,7 @@ let room = function () {
298
303
  return roomSessions.find(session => session.roomId === roomId) || null
299
304
  },
300
305
  getSessionByUserId: (userId) => {
301
- return roomSessions.find(session => session.userId === userId) || null
306
+ return roomSessions.find(session => decodeJanusDisplay(session.userId)?.userId === userId) || null
302
307
  },
303
308
  getSessionByStreamId: (streamId) => {
304
309
  return roomSessions.find(session => session.streamId === streamId) || null