@reactoo/watchtogether-sdk-js 2.5.39 → 2.5.42

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.39",
3
+ "version": "2.5.42",
4
4
  "description": "Javascript SDK for Reactoo",
5
5
  "main": "src/index.js",
6
6
  "unpkg": "dist/watchtogether-sdk.min.js",
@@ -54,30 +54,35 @@ let room = function () {
54
54
  }))
55
55
  },
56
56
 
57
- createRoom: ({title, description, isPublic, isListed, isStudioLayout, allowedParticipants, wtChannelId, isHd, disableSync, reduceRoomControls, muteParticipantOnJoin, hasStudioChat, maxParticipants, customAttributes} = {}) => {
57
+ createRoom: ({title, description, isPublic, isStudioLayout, wtChannelId, isHd, disableSync, reduceRoomControls, hasStudioChat, maxParticipants, customAttributes, chatRoomId, linkedRoomId, dotAttribute} = {}) => {
58
+ let _da = dotAttribute
59
+ ? (Array.isArray(dotAttribute)
60
+ ? dotAttribute.reduce((p, cv) => (p[cv.name] = cv.value) && p || p, {})
61
+ : {[dotAttribute.name]: dotAttribute.value})
62
+ : {};
58
63
  return this.__privates.auth.__client
59
64
  .then(client => client.apis.wt.createRoom({}, {
60
65
  requestBody: {
61
66
  title,
62
67
  description,
63
68
  isPublic,
64
- isListed,
65
69
  isStudioLayout,
66
- instanceType: this.__instanceType,
67
- allowedParticipants,
68
70
  wtChannelId,
69
71
  isHd,
70
72
  disableSync,
71
73
  reduceRoomControls,
72
- muteParticipantOnJoin,
74
+ chatRoomId,
75
+ linkedRoomId,
73
76
  hasStudioChat,
74
77
  maxParticipants,
75
- customAttributes
78
+ customAttributes,
79
+ ..._da,
80
+ instanceType: this.__instanceType,
76
81
  }
77
82
  }))
78
83
  },
79
84
 
80
- updateRoom: ({roomId, title, description, isPublic, isListed, allowedParticipants, recordings, slug, password, maxParticipants, setInstanceType = false, wtChannelId, isHd, isStudioLayout, hasStudioChat, reduceRoomControls, muteParticipantOnJoin, disableSync, defaultRegion, customAttributes, dotAttribute} = {}) => {
85
+ updateRoom: ({roomId, title, description, isPublic, recordings, slug, password, maxParticipants, setInstanceType = false, wtChannelId, isHd, isStudioLayout, hasStudioChat, reduceRoomControls, chatRoomId, linkedRoomId, disableSync, defaultRegion, customAttributes, dotAttribute} = {}) => {
81
86
  let _da = dotAttribute
82
87
  ? (Array.isArray(dotAttribute)
83
88
  ? dotAttribute.reduce((p, cv) => (p[cv.name] = cv.value) && p || p, {})
@@ -86,23 +91,25 @@ let room = function () {
86
91
  return this.__privates.auth.__client
87
92
  .then(client => client.apis.wt.updateRoom({id: roomId}, {
88
93
  requestBody: {
89
- ..._da,
90
94
  title,
91
95
  description,
92
96
  slug,
93
97
  password,
94
98
  isPublic,
95
- isListed,
96
99
  isHd,
97
100
  isStudioLayout,
98
101
  hasStudioChat,
99
102
  maxParticipants,
100
103
  reduceRoomControls,
101
- muteParticipantOnJoin,
104
+ chatRoomId,
105
+ linkedRoomId,
102
106
  disableSync,
103
107
  defaultRegion,
104
108
  customAttributes,
105
- wtChannelId, ...(setInstanceType && {instanceType: setInstanceType === true ? this.__instanceType : setInstanceType}), ...(allowedParticipants && {allowedParticipants}), ...(recordings && {recordings})
109
+ wtChannelId,
110
+ ..._da,
111
+ ...(setInstanceType && {instanceType: setInstanceType === true ? this.__instanceType : setInstanceType}),
112
+ ...(recordings && {recordings})
106
113
  }
107
114
  }))
108
115
  },
@@ -163,7 +163,7 @@ class Iot {
163
163
  if(payload.display) {
164
164
  const decodedDisplay = decodeJanusDisplay(payload.display);
165
165
  if(decodedDisplay.userId) {
166
- payload = {...payload, userId: decodedDisplay.userId}
166
+ payload = {...payload, userId: decodedDisplay.userId, role: decodedDisplay.role};
167
167
  }
168
168
  }
169
169