@ray-js/ipc-player-integration 0.0.1-beta-18 → 0.0.1-beta-19
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.
|
@@ -8,9 +8,10 @@ export const useBattery = devId => {
|
|
|
8
8
|
dpCodes: [POWER_MODE_DP_CODE, POWER_VALUE_DP_CODE]
|
|
9
9
|
});
|
|
10
10
|
const batteryInfo = useMemo(() => {
|
|
11
|
+
// 如果电量dp不存在
|
|
11
12
|
return {
|
|
12
|
-
batteryValue: dpState[POWER_VALUE_DP_CODE]
|
|
13
|
-
batteryCharging: dpState[POWER_MODE_DP_CODE]
|
|
13
|
+
batteryValue: dpState[POWER_VALUE_DP_CODE],
|
|
14
|
+
batteryCharging: dpState[POWER_MODE_DP_CODE]
|
|
14
15
|
};
|
|
15
16
|
}, [dpState]);
|
|
16
17
|
return batteryInfo;
|
|
@@ -20,6 +20,9 @@ export const createBattery = _ref => {
|
|
|
20
20
|
batteryValue,
|
|
21
21
|
batteryCharging
|
|
22
22
|
} = useBattery(devId);
|
|
23
|
+
if (batteryValue === undefined) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
23
26
|
return /*#__PURE__*/React.createElement(View, {
|
|
24
27
|
className: clsx('ipc-player-plugin-battery', {
|
|
25
28
|
'ipc-player-plugin-battery-relative': store.screenType === 'full',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/ipc-player-integration",
|
|
3
|
-
"version": "0.0.1-beta-
|
|
3
|
+
"version": "0.0.1-beta-19",
|
|
4
4
|
"description": "IPC 播放器功能集成",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"files": [
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@ray-js/ray": "^1.4.9"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@ray-js/ray-ipc-player": "2.0.18-beta-
|
|
38
|
+
"@ray-js/ray-ipc-player": "2.0.18-beta-3",
|
|
39
39
|
"@ray-js/ray-ipc-utils": "1.1.0-beta-12",
|
|
40
40
|
"@ray-js/ipc-ptz-zoom": "0.0.2-beta-1",
|
|
41
41
|
"clsx": "^1.2.1",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"standard-version": "9.3.2"
|
|
57
57
|
},
|
|
58
58
|
"resolutions": {
|
|
59
|
-
"@ray-js/builder-mp": "1.
|
|
59
|
+
"@ray-js/builder-mp": "1.5.37"
|
|
60
60
|
},
|
|
61
61
|
"husky": {
|
|
62
62
|
"hooks": {
|