senza-sdk 4.3.3-13bd44c.0 → 4.3.4
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.
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*
|
|
2
|
+
@license
|
|
3
|
+
Copyright 2006 The Closure Library Authors
|
|
4
|
+
SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
@license
|
|
9
|
+
Copyright 2008 The Closure Library Authors
|
|
10
|
+
SPDX-License-Identifier: Apache-2.0
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
@license
|
|
15
|
+
EME Encryption Scheme Polyfill
|
|
16
|
+
Copyright 2019 Google LLC
|
|
17
|
+
SPDX-License-Identifier: Apache-2.0
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/*
|
|
21
|
+
@license
|
|
22
|
+
MSS Transmuxer
|
|
23
|
+
Copyright 2015 Dash Industry Forum
|
|
24
|
+
SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/*
|
|
28
|
+
@license
|
|
29
|
+
Shaka Player
|
|
30
|
+
Copyright 2016 Google LLC
|
|
31
|
+
SPDX-License-Identifier: Apache-2.0
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/*
|
|
35
|
+
@license
|
|
36
|
+
Shaka Player
|
|
37
|
+
Copyright 2022 Google LLC
|
|
38
|
+
SPDX-License-Identifier: Apache-2.0
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/*
|
|
42
|
+
@license
|
|
43
|
+
Shaka Player
|
|
44
|
+
Copyright 2023 Google LLC
|
|
45
|
+
SPDX-License-Identifier: Apache-2.0
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/*
|
|
49
|
+
@license
|
|
50
|
+
tXml
|
|
51
|
+
Copyright 2015 Tobias Nickel
|
|
52
|
+
SPDX-License-Identifier: MIT
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
//! moment.js
|
|
56
|
+
|
|
57
|
+
//! moment.js locale configuration
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "senza-sdk",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.4",
|
|
4
4
|
"main": "./src/api.js",
|
|
5
5
|
"description": "API for Senza application",
|
|
6
6
|
"license": "MIT",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
},
|
|
55
55
|
"src/interface": {
|
|
56
56
|
"branches": 68.42,
|
|
57
|
-
"functions":
|
|
58
|
-
"lines":
|
|
59
|
-
"statements":
|
|
57
|
+
"functions": 39.63,
|
|
58
|
+
"lines": 64.94,
|
|
59
|
+
"statements": 65.32
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
},
|
|
@@ -723,6 +723,38 @@ class Lifecycle extends LifecycleInterface {
|
|
|
723
723
|
return Promise.reject("exitApplication is not supported if NOT running e2e");
|
|
724
724
|
}
|
|
725
725
|
|
|
726
|
+
disconnect() {
|
|
727
|
+
if (window.cefQuery) {
|
|
728
|
+
return new Promise((resolve, reject) => {
|
|
729
|
+
const FCID = getFCID();
|
|
730
|
+
const logger = sdkLogger.withFields({ FCID });
|
|
731
|
+
const message = {
|
|
732
|
+
type: "disconnect",
|
|
733
|
+
reason: "appInitiated",
|
|
734
|
+
target: "client",
|
|
735
|
+
fcid: FCID
|
|
736
|
+
};
|
|
737
|
+
const request = { target: "TC", waitForResponse: false, message: JSON.stringify(message) };
|
|
738
|
+
|
|
739
|
+
logger.log("disconnect: sending disconnect message with reason 'appInitiated'");
|
|
740
|
+
window.cefQuery({
|
|
741
|
+
request: JSON.stringify(request),
|
|
742
|
+
persistent: false,
|
|
743
|
+
onSuccess: () => {
|
|
744
|
+
logger.log("disconnect request successfully sent");
|
|
745
|
+
resolve(true);
|
|
746
|
+
},
|
|
747
|
+
onFailure: (code, msg) => {
|
|
748
|
+
logger.error(`disconnect failed: ${code} ${msg}`);
|
|
749
|
+
reject(`disconnect failed: ${code} ${msg}`);
|
|
750
|
+
}
|
|
751
|
+
});
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
sdkLogger.warn("disconnect is not supported if NOT running e2e");
|
|
755
|
+
return Promise.reject("disconnect is not supported if NOT running e2e");
|
|
756
|
+
}
|
|
757
|
+
|
|
726
758
|
addEventListener(type, listener, options) {
|
|
727
759
|
if (type === "userdisconnected") {
|
|
728
760
|
// Use the event manager for userdisconnected events
|
|
@@ -250,6 +250,18 @@ class Lifecycle extends EventTarget {
|
|
|
250
250
|
return noop("lifecycle.exitApplication");
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
+
/**
|
|
254
|
+
* Use this api to disconnect from the current session.
|
|
255
|
+
* This will send a disconnect message to the platform indicating the disconnection was initiated by the application.
|
|
256
|
+
* @return {Promise} Promise which is resolved when the disconnect command has been successfully sent.
|
|
257
|
+
* Failure to process the disconnect command will result in the promise being rejected.
|
|
258
|
+
* @alpha API has not yet been released
|
|
259
|
+
*/
|
|
260
|
+
// API is part of HSDEV-16695
|
|
261
|
+
disconnect() {
|
|
262
|
+
return noop("lifecycle.disconnect");
|
|
263
|
+
}
|
|
264
|
+
|
|
253
265
|
/**
|
|
254
266
|
* Add event listener for lifecycle events
|
|
255
267
|
* @param {string} type - The event type to listen for
|
package/src/interface/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "4.3.
|
|
1
|
+
export const version = "4.3.4";
|