@reactoo/watchtogether-sdk-js 2.5.13 → 2.5.14
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/index.js
CHANGED
|
@@ -41,9 +41,9 @@ function WatchTogether(modules = {}, instanceType, debug, playerFactory, provide
|
|
|
41
41
|
this.utils = utils;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
let watchTogether = function ({debug = true,
|
|
44
|
+
let watchTogether = function ({debug = true, language = 'en-GB', storagePrefix = "reactoo_", apiUrl = null} = {}) {
|
|
45
45
|
let room = new Room(debug);
|
|
46
|
-
let auth = new Auth(debug,
|
|
46
|
+
let auth = new Auth(debug, language, storagePrefix, apiUrl);
|
|
47
47
|
let iot = new Iot(debug);
|
|
48
48
|
|
|
49
49
|
return ({instanceType = 'reactooDemo', playerFactory = null, providerAuth = null} = {}) => {
|
package/src/modules/wt-auth.js
CHANGED
|
@@ -4,7 +4,7 @@ import emitter from './wt-emitter';
|
|
|
4
4
|
|
|
5
5
|
class Auth {
|
|
6
6
|
|
|
7
|
-
constructor(enableDebugFlag,
|
|
7
|
+
constructor(enableDebugFlag, language = 'en-GB', storagePrefix = "", apiUrl = null) {
|
|
8
8
|
|
|
9
9
|
this.ID_TOKEN = `${storagePrefix !== "" ? storagePrefix+'_':''}rwt_idToken`;
|
|
10
10
|
this.ACCESS_TOKEN = `${storagePrefix !== "" ? storagePrefix+'_':''}rwt_accessToken`;
|
|
@@ -22,7 +22,7 @@ class Auth {
|
|
|
22
22
|
this.__isRefreshing = false;
|
|
23
23
|
this.__isLogged = null;
|
|
24
24
|
this.__parsedJwt = null;
|
|
25
|
-
this.__specUrl = apiUrl ? apiUrl :
|
|
25
|
+
this.__specUrl = apiUrl ? apiUrl : config.apiUrl;
|
|
26
26
|
this.__client = this.initialize(true);
|
|
27
27
|
}
|
|
28
28
|
|