@reactoo/watchtogether-sdk-js 2.5.97 → 2.5.99

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.97",
3
+ "version": "2.5.99",
4
4
  "description": "Javascript SDK for Reactoo",
5
5
  "main": "src/index.js",
6
6
  "unpkg": "dist/watchtogether-sdk.min.js",
@@ -71,7 +71,7 @@ let roomSession = function ({roomId, pinHash, role}, room, wt) {
71
71
  return room.constructId;
72
72
  },
73
73
 
74
- destroy: function () {
74
+ kill: function () {
75
75
  clearTimeout(alpTimeoutId);
76
76
  this.detachPlayer();
77
77
  return room.destroy()
@@ -81,6 +81,11 @@ let roomSession = function ({roomId, pinHash, role}, room, wt) {
81
81
  });
82
82
  },
83
83
 
84
+ destroy: function() {
85
+ return wt.room.destroySession(room.constructId)
86
+ },
87
+
88
+
84
89
  iceRestart: function () {
85
90
  return room._iceRestart(room.handleId);
86
91
  },
@@ -313,7 +313,7 @@ let room = function () {
313
313
  destroySession: (constructId) => {
314
314
  let sessionIndex = roomSessions.findIndex(session => session.constructId === constructId);
315
315
  if (sessionIndex > -1) {
316
- return roomSessions[sessionIndex].destroy()
316
+ return roomSessions[sessionIndex].kill()
317
317
  .finally(() => {
318
318
  roomSessions.splice(sessionIndex, 1);
319
319
  return true
@@ -325,7 +325,7 @@ let room = function () {
325
325
  destroySessionBySessionId: (sessionId) => {
326
326
  let sessionIndex = roomSessions.findIndex(session => session.sessionId === sessionId);
327
327
  if (sessionIndex > -1) {
328
- return roomSessions[sessionIndex].destroy()
328
+ return roomSessions[sessionIndex].kill()
329
329
  .finally(() => {
330
330
  roomSessions.splice(sessionIndex, 1);
331
331
  return true
@@ -19,14 +19,18 @@ let streamingSession = function({roomId, pinHash, streamId, href, iceServers, a
19
19
  return room.constructId;
20
20
  },
21
21
 
22
- destroy: function () {
23
- return wt.room.destroySession(room.constructId)
22
+ kill: function () {
23
+ return room.destroy()
24
24
  .finally(() => {
25
25
  this.$clear();
26
26
  return true;
27
27
  });
28
28
  },
29
29
 
30
+ destroy: function() {
31
+ return wt.room.destroySession(room.constructId)
32
+ },
33
+
30
34
  connect: function() {
31
35
  if(roomId) {
32
36
  return Promise.all([wt.room.getRoomById(roomId, pinHash), wt.user.getUserSelf()])