@reactoo/watchtogether-sdk-js 2.5.96 → 2.5.97
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @reactoo/watchtogether-sdk-js
|
|
3
|
-
* @version 2.5.
|
|
3
|
+
* @version 2.5.97
|
|
4
4
|
*/
|
|
5
5
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
6
6
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -10078,7 +10078,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _roo
|
|
|
10078
10078
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10079
10079
|
|
|
10080
10080
|
"use strict";
|
|
10081
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\nlet streamingSession = function () {\n let {\n roomId,\n pinHash,\n streamId,\n href,\n iceServers,\n accessToken\n } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let room = arguments.length > 1 ? arguments[1] : undefined;\n let wt = arguments.length > 2 ? arguments[2] : undefined;\n let ___;\n return ___ = {\n get userId() {\n return room.userId;\n },\n get roomId() {\n return roomId;\n },\n get sessionId() {\n return room.sessionId;\n },\n get constructId() {\n return room.constructId;\n },\n destroy: function () {\n return wt.room.destroySession(room.constructId).finally(() => {\n this.$clear();\n });\n },\n connect: function () {\n if (roomId) {\n return Promise.all([wt.room.getRoomById(roomId, pinHash), wt.user.getUserSelf()]).then(_ref => {\n let [roomData, r] = _ref;\n return room.startStream(roomData.data.wtChannel.streamId, roomData.data.wtChannel.href, roomData.data.wtChannel.iceServers, roomData.data.wtChannel.accessToken, r.data._id);\n });\n } else if (href) {\n return wt.user.getUserSelf().then(r => room.startStream(streamId, href, iceServers, accessToken, r.data._id));\n } else return Promise.reject('Bad Input');\n },\n disconnect: function () {\n return room.stopStream();\n },\n $on: (key, callback, that) => {\n return room.on(key, callback, that || this);\n },\n $off: (key, callback, that) => {\n return room.off(key, callback, that || this);\n },\n $clear: function () {\n room.clear();\n }\n };\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (streamingSession);\n\n//# sourceURL=webpack://WatchTogetherSDK/./src/models/streaming-session.js?");
|
|
10081
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\nlet streamingSession = function () {\n let {\n roomId,\n pinHash,\n streamId,\n href,\n iceServers,\n accessToken\n } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let room = arguments.length > 1 ? arguments[1] : undefined;\n let wt = arguments.length > 2 ? arguments[2] : undefined;\n let ___;\n return ___ = {\n get userId() {\n return room.userId;\n },\n get roomId() {\n return roomId;\n },\n get sessionId() {\n return room.sessionId;\n },\n get constructId() {\n return room.constructId;\n },\n destroy: function () {\n return wt.room.destroySession(room.constructId).finally(() => {\n this.$clear();\n return true;\n });\n },\n connect: function () {\n if (roomId) {\n return Promise.all([wt.room.getRoomById(roomId, pinHash), wt.user.getUserSelf()]).then(_ref => {\n let [roomData, r] = _ref;\n return room.startStream(roomData.data.wtChannel.streamId, roomData.data.wtChannel.href, roomData.data.wtChannel.iceServers, roomData.data.wtChannel.accessToken, r.data._id);\n });\n } else if (href) {\n return wt.user.getUserSelf().then(r => room.startStream(streamId, href, iceServers, accessToken, r.data._id));\n } else return Promise.reject('Bad Input');\n },\n disconnect: function () {\n return room.stopStream();\n },\n $on: (key, callback, that) => {\n return room.on(key, callback, that || this);\n },\n $off: (key, callback, that) => {\n return room.off(key, callback, that || this);\n },\n $clear: function () {\n room.clear();\n }\n };\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (streamingSession);\n\n//# sourceURL=webpack://WatchTogetherSDK/./src/models/streaming-session.js?");
|
|
10082
10082
|
|
|
10083
10083
|
/***/ }),
|
|
10084
10084
|
|