senza-sdk 4.3.4 → 4.3.5
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
|
@@ -132,7 +132,6 @@ export async function init(interfaceApiVersion, showSequenceFunc, initSequenceFu
|
|
|
132
132
|
await lifecycle._init(sessionInfoObj?.settings?.["ui-streamer"], triggerEvent);
|
|
133
133
|
await remotePlayer._init(sessionInfoObj?.settings?.["ui-streamer"], triggerEvent);
|
|
134
134
|
alarmManager._init();
|
|
135
|
-
deviceManager._init();
|
|
136
135
|
messageManager._init();
|
|
137
136
|
sdkLogger.log("All submodules initialized");
|
|
138
137
|
|
|
@@ -2,7 +2,6 @@ import { DeviceManager as DeviceManagerInterface } from "../interface/deviceMana
|
|
|
2
2
|
import { getFCID, sdkLogger, getRestResponse } from "./utils";
|
|
3
3
|
import { sessionInfo } from "./SessionInfo";
|
|
4
4
|
|
|
5
|
-
const wifiInfo = {};
|
|
6
5
|
let wifi_ap_data;
|
|
7
6
|
let wifi_status;
|
|
8
7
|
let wifi_status_last_update = 0;
|
|
@@ -39,40 +38,6 @@ class DeviceManager extends DeviceManagerInterface {
|
|
|
39
38
|
|
|
40
39
|
constructor() {
|
|
41
40
|
super();
|
|
42
|
-
wifiInfo.level = 0;
|
|
43
|
-
wifiInfo.quality = 0;
|
|
44
|
-
wifiInfo.ssid = "unknown";
|
|
45
|
-
wifiInfo.bssid = "unknown";
|
|
46
|
-
/**
|
|
47
|
-
* @type {boolean}
|
|
48
|
-
* @private
|
|
49
|
-
*/
|
|
50
|
-
this._isInitialized = false;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* @private
|
|
55
|
-
*/
|
|
56
|
-
_init() {
|
|
57
|
-
sdkLogger.log("Initializing DeviceManager");
|
|
58
|
-
if (!this._isInitialized) {
|
|
59
|
-
this._isInitialized = true;
|
|
60
|
-
this._addSenzaEventListeners();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* @private Add event listeners for system events
|
|
66
|
-
*/
|
|
67
|
-
_addSenzaEventListeners() {
|
|
68
|
-
typeof document !== "undefined" && document.addEventListener("wifiSignalReport", (e) => {
|
|
69
|
-
wifiInfo.level = e.detail.level;
|
|
70
|
-
wifiInfo.quality = e.detail.quality;
|
|
71
|
-
wifiInfo.ssid = e.detail.ssid;
|
|
72
|
-
wifiInfo.bssid = e.detail.bssid;
|
|
73
|
-
this.dispatchEvent(new Event("wifiInfoUpdated"));
|
|
74
|
-
});
|
|
75
|
-
sdkLogger.log("[DeviceManager] Added event listeners for system events");
|
|
76
41
|
}
|
|
77
42
|
|
|
78
43
|
get deviceInfo() {
|
|
@@ -92,10 +57,6 @@ class DeviceManager extends DeviceManagerInterface {
|
|
|
92
57
|
return super.deviceInfo;
|
|
93
58
|
}
|
|
94
59
|
|
|
95
|
-
get wifiInfo() {
|
|
96
|
-
return wifiInfo;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
60
|
reboot() {
|
|
100
61
|
return new Promise((resolve, reject) => {
|
|
101
62
|
if (window.cefQuery) {
|
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
import { sdkLogger, noop } from "./utils.js";
|
|
2
|
-
/**
|
|
3
|
-
* @event DeviceManager#wifiInfoUpdated
|
|
4
|
-
* @deprecated Instead, call deviceManager.getWifiInfo() periodically
|
|
5
|
-
* @example
|
|
6
|
-
* deviceManager.addEventListener("wifiInfoUpdated", () => {
|
|
7
|
-
* console.info("Wifi info has been updated to", deviceManager.wifiInfo);
|
|
8
|
-
* });
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
const wifiInfo = {
|
|
13
|
-
level: 0,
|
|
14
|
-
quality: 0,
|
|
15
|
-
ssid: "unknown",
|
|
16
|
-
bssid: "unknown"
|
|
17
|
-
};
|
|
18
2
|
|
|
19
3
|
/**
|
|
20
4
|
* DeviceManager is a singleton class that manages the device
|
|
@@ -46,18 +30,6 @@ export class DeviceManager extends EventTarget {
|
|
|
46
30
|
|
|
47
31
|
}
|
|
48
32
|
|
|
49
|
-
/**
|
|
50
|
-
* @deprecated use deviceManager.getWifiInfo() instead
|
|
51
|
-
* @property {object} WifiInfo
|
|
52
|
-
* @property {number} WifiInfo.level
|
|
53
|
-
* @property {number} WifiInfo.quality
|
|
54
|
-
* @property {string} WifiInfo.ssid
|
|
55
|
-
* @property {string} WifiInfo.bssid
|
|
56
|
-
*/
|
|
57
|
-
get wifiInfo() {
|
|
58
|
-
return wifiInfo;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
33
|
/**
|
|
62
34
|
* Reboot the device
|
|
63
35
|
* @return {Promise} Promise which is resolved when the reboot command has been successfully processed.
|
package/src/interface/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "4.3.
|
|
1
|
+
export const version = "4.3.5";
|