senza-sdk 4.2.35 → 4.2.36
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/dist/bundle.js +1 -1
- package/package.json +1 -1
- package/src/lifecycle.js +4 -1
package/package.json
CHANGED
package/src/lifecycle.js
CHANGED
|
@@ -182,6 +182,7 @@ class Lifecycle extends EventTarget {
|
|
|
182
182
|
// This api is part of epic HSDEV-713
|
|
183
183
|
_moveToUiStandby() {
|
|
184
184
|
if (window.cefQuery) {
|
|
185
|
+
this._inTransition = true;
|
|
185
186
|
return new Promise((resolve, reject) => {
|
|
186
187
|
const FCID = getFCID();
|
|
187
188
|
const request = { target: "TC", waitForResponse: false, internalAction: "uiExit", message: JSON.stringify({ type: "uiStandbyRequest", fcid: FCID }) };
|
|
@@ -192,10 +193,12 @@ class Lifecycle extends EventTarget {
|
|
|
192
193
|
persistent: false,
|
|
193
194
|
onSuccess: () => {
|
|
194
195
|
logger.log("[ moveToUiStandby ] moveToUiStandby successfully sent");
|
|
196
|
+
this._inTransition = false;
|
|
195
197
|
resolve(true);
|
|
196
198
|
},
|
|
197
199
|
onFailure: (code, msg) => {
|
|
198
200
|
logger.error(`[ moveToUiStandby ] moveToUiStandby failed: ${code} ${msg}`);
|
|
201
|
+
this._inTransition = false;
|
|
199
202
|
reject(`moveToUiStandby failed: ${code} ${msg}`);
|
|
200
203
|
}
|
|
201
204
|
});
|
|
@@ -424,7 +427,6 @@ class Lifecycle extends EventTarget {
|
|
|
424
427
|
sdkLogger.warn(`lifecycle moveToBackground: No need to transition to background, state: ${this._state} transition: ${this._inTransition}`);
|
|
425
428
|
return Promise.resolve(false);
|
|
426
429
|
}
|
|
427
|
-
this._inTransition = true;
|
|
428
430
|
// If audio sync is disabled, we only need to sync before remote player starts playing
|
|
429
431
|
if (!isAudioSyncEnabled()) {
|
|
430
432
|
remotePlayer._syncRemotePlayerWithLocalPlayer();
|
|
@@ -434,6 +436,7 @@ class Lifecycle extends EventTarget {
|
|
|
434
436
|
return this._moveToUiStandby();
|
|
435
437
|
}
|
|
436
438
|
|
|
439
|
+
this._inTransition = true;
|
|
437
440
|
return new Promise((resolve, reject) => {
|
|
438
441
|
const FCID = getFCID();
|
|
439
442
|
const logger = sdkLogger.withFields({ FCID });
|