@reactoo/watchtogether-sdk-js 2.4.40 → 2.4.41

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.4.40",
3
+ "version": "2.4.41",
4
4
  "description": "Javascript SDK for Reactoo",
5
5
  "main": "src/index.js",
6
6
  "unpkg": "dist/watchtogether-sdk.min.js",
@@ -111,16 +111,18 @@ let user = function () {
111
111
 
112
112
  track: ({eventType = 'ERROR', message} = {}) => {
113
113
  return this.__privates.auth.__client
114
- .then(client => client.apis.wt.track({},{requestBody:{
114
+ .then(client => client.apis.wt.track({},{
115
+ requestBody:{
115
116
  "eventType": eventType,
116
117
  "appType": "web",
117
- "deviceType": `desktop${navigator.maxTouchPoints ? '/touchy' : ''}`,
118
+ "deviceType": `desktop${navigator.maxTouchPoints ? '/touch' : ''}`,
118
119
  "os": navigator.platform,
119
120
  "browser": navigator.userAgent,
120
121
  "domain": location.host,
121
122
  "url": location.href,
122
123
  "message": serializeError(message)
123
- }}));
124
+ }
125
+ }));
124
126
  },
125
127
 
126
128
  getTranslation: ({namespace = 'wt'} = {}) => {
@@ -164,12 +164,7 @@ class RoomSession {
164
164
  }
165
165
  };
166
166
 
167
- constructor(enableDebugFlag, type = 'reactooroom', options = {
168
- classroomObserverSubscribeToInstructor: false,
169
- classroomInstructorSubscribeToParticipants: false,
170
- safariBugHotfixEnabled: true
171
- }) {
172
-
167
+ constructor(enableDebugFlag, type = 'reactooroom', options = {}) {
173
168
  this.server = null;
174
169
  this.iceServers = null;
175
170
  this.token = null;
@@ -182,7 +177,14 @@ class RoomSession {
182
177
  this.isMonitor = false; // currently used just for classroom context so monitor user only subscribes to participants and not trainer (for other monitor this flag is not necessary)
183
178
  this.recordingFilename = null;
184
179
  this.pluginName = RoomSession.sessionTypes()[type];
185
- this.options = options;
180
+ this.options = {
181
+ ...{
182
+ classroomObserverSubscribeToInstructor: false,
183
+ classroomInstructorSubscribeToParticipants: false,
184
+ safariBugHotfixEnabled: adapter.browserDetails.browser === 'safari' && adapter.browserDetails.version < 605
185
+ },
186
+ options
187
+ };
186
188
  //this.pluginName = this.#sessionTypes[type];
187
189
 
188
190
  Object.assign(this, emitter());
@@ -2001,7 +2003,7 @@ class RoomSession {
2001
2003
  }
2002
2004
  let config = handle.webrtcStuff;
2003
2005
 
2004
- if(this.options.safariBugHotfixEnabled && adapter.browserDetails.browser === 'safari') {
2006
+ if(this.options.safariBugHotfixEnabled) {
2005
2007
  this.isVideoMuted = !this.isVideoMuted;
2006
2008
  }
2007
2009
  else if (this.isUnifiedPlan) {