@reactoo/watchtogether-sdk-js 2.8.9 → 2.8.10
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
package/src/models/asset.js
CHANGED
|
@@ -114,14 +114,14 @@ let asset = function() {
|
|
|
114
114
|
|
|
115
115
|
createHighlightAsset: (id, title, roomIds, highlight = {}) => {
|
|
116
116
|
return this.__privates.auth.__client
|
|
117
|
-
.then(client => client.apis.asset.publishAsset({id}, {requestBody: {assetType: 'highlight',...(roomIds ? {roomIds} : {}), title, highlight}}));
|
|
117
|
+
.then(client => client.apis.asset.publishAsset({id}, {requestBody: {assetType: 'highlight',...(roomIds ? {roomIds} : {}), title, customAttributes: {highlight}}}));
|
|
118
118
|
},
|
|
119
119
|
|
|
120
120
|
createHighlightAssetWithThumbnail: (file, id, title, roomIds, highlight = {}, initiationData = null) => {
|
|
121
121
|
return this.__privates.auth.__client
|
|
122
122
|
.then(client => Promise.all([client, initiationData ? Promise.resolve(initiationData) : client.apis.asset.initiateAssetUpload({id: id || generateUUID()})]))
|
|
123
123
|
.then(([client, response]) => Promise.all([client, client.http({url: response.data.signedUrl, method: response.data.httpMethod, headers: {"Content-Type":file.type}, body:file}), response.data.id]))
|
|
124
|
-
.then(([client, response, idn]) => Promise.all([client.apis.asset.publishAsset({id:idn}, {requestBody: {assetType: 'highlight', title: title, ...(roomIds ? {roomIds} : {}), highlight}}), idn]))
|
|
124
|
+
.then(([client, response, idn]) => Promise.all([client.apis.asset.publishAsset({id:idn}, {requestBody: {assetType: 'highlight', title: title, ...(roomIds ? {roomIds} : {}), customAttributes: {highlight}}}), idn]))
|
|
125
125
|
;
|
|
126
126
|
},
|
|
127
127
|
}
|
|
@@ -274,6 +274,7 @@ class RoomSession {
|
|
|
274
274
|
this.sessionId = null;
|
|
275
275
|
this.apisecret = null;
|
|
276
276
|
this.ws = null;
|
|
277
|
+
// this._pendingMessages = [];
|
|
277
278
|
|
|
278
279
|
// helper flags
|
|
279
280
|
|
|
@@ -999,6 +1000,9 @@ class RoomSession {
|
|
|
999
1000
|
this._abortController.signal.addEventListener('abort', abortResponse);
|
|
1000
1001
|
this.ws.send(JSON.stringify(requestData));
|
|
1001
1002
|
} else {
|
|
1003
|
+
// this._pendingMessages.push({
|
|
1004
|
+
// request, ignoreResponse, dontResolveOnAck, retry
|
|
1005
|
+
// });
|
|
1002
1006
|
reject({type: 'warning', id: 7, message: 'No connection to WebSockets', data: requestData});
|
|
1003
1007
|
}
|
|
1004
1008
|
}
|
|
@@ -1895,8 +1899,6 @@ class RoomSession {
|
|
|
1895
1899
|
enableDtx = false
|
|
1896
1900
|
) {
|
|
1897
1901
|
|
|
1898
|
-
this.isSupposeToBeConnected = true;
|
|
1899
|
-
|
|
1900
1902
|
if (this.isConnecting) {
|
|
1901
1903
|
this.emit('error', {type: 'warning', id: 23, message: 'connection already in progress'});
|
|
1902
1904
|
return
|
|
@@ -1906,6 +1908,8 @@ class RoomSession {
|
|
|
1906
1908
|
await this.disconnect();
|
|
1907
1909
|
}
|
|
1908
1910
|
|
|
1911
|
+
this.isSupposeToBeConnected = true;
|
|
1912
|
+
|
|
1909
1913
|
this._abortController = new AbortController();
|
|
1910
1914
|
|
|
1911
1915
|
this.sessionId = null;
|
|
@@ -2025,6 +2029,7 @@ class RoomSession {
|
|
|
2025
2029
|
this.userId = null;
|
|
2026
2030
|
|
|
2027
2031
|
this.isPublished = false;
|
|
2032
|
+
this.isConnecting = false;
|
|
2028
2033
|
this.isConnected = false;
|
|
2029
2034
|
this.isDisconnecting = false;
|
|
2030
2035
|
this.emit('publishing', false);
|
|
@@ -2724,6 +2729,11 @@ class RoomSession {
|
|
|
2724
2729
|
if (!config.stream) {
|
|
2725
2730
|
return;
|
|
2726
2731
|
}
|
|
2732
|
+
|
|
2733
|
+
if(!this.id) {
|
|
2734
|
+
return;
|
|
2735
|
+
}
|
|
2736
|
+
|
|
2727
2737
|
let sourceTrackIds = (config.streamMap[this.id][source] || []);
|
|
2728
2738
|
let remainingTracks = [];
|
|
2729
2739
|
for(let i = 0; i < sourceTrackIds.length; i++) {
|