@ray-js/ipc-player-integration 0.0.1-beta-18 → 0.0.1-beta-20

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/lib/ctx/ctx.js CHANGED
@@ -30,7 +30,7 @@ export const createUseCtx = _ref => {
30
30
  const [recording] = useAtom(false);
31
31
 
32
32
  // 静音 true 代表静音 false 代表不静音
33
- const [mute] = useAtom(false);
33
+ const [mute] = useAtom(true);
34
34
 
35
35
  // 品牌色 默认
36
36
  const [brandColor, setBrandColor] = useAtom('#FF592A');
@@ -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] || 0,
13
- batteryCharging: dpState[POWER_MODE_DP_CODE] || false
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',
@@ -46,6 +46,7 @@ export function Screenshot(props) {
46
46
  };
47
47
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(View, {
48
48
  onClick: () => {
49
+ console.log('截屏!!!');
49
50
  IPCPlayerContext.snapshot({
50
51
  saveToAlbum,
51
52
  // 保存到 IPC 相册
package/lib/ui/ui.js CHANGED
@@ -78,14 +78,18 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
78
78
  absoluteContent,
79
79
  screenType,
80
80
  playState,
81
- fullResolutionActive
81
+ fullResolutionActive,
82
+ resolution,
83
+ mute
82
84
  } = useStore({
83
85
  topContent: instance.topContent,
84
86
  bottomContent: instance.bottomContent,
85
87
  absoluteContent: instance.absoluteContent,
86
88
  screenType: instance.screenType,
87
89
  playState: instance.playState,
88
- fullResolutionActive: instance.fullResolutionActive
90
+ fullResolutionActive: instance.fullResolutionActive,
91
+ resolution: instance.resolution,
92
+ mute: instance.mute
89
93
  });
90
94
  const renderTopContent = useMemo(() => {
91
95
  if (!topContent || !(topContent !== null && topContent !== void 0 && topContent.length)) return null;
@@ -183,7 +187,7 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
183
187
  })
184
188
  }, /*#__PURE__*/React.createElement(IPCPlayer, {
185
189
  objectFit: "",
186
- defaultMute: true,
190
+ defaultMute: mute,
187
191
  devId: devId,
188
192
  onlineStatus: deviceOnline,
189
193
  ipcPlayerContext: instance.IPCPlayerInstance,
@@ -234,7 +238,7 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
234
238
  ty.hideToast();
235
239
  }, 3000);
236
240
  },
237
- clarity: "hd",
241
+ clarity: resolution === 'HD' ? 'hd' : 'normal',
238
242
  privateState: privateState,
239
243
  onPlayerTap: handPlayerTap // 对应原来的onVideoTap
240
244
  }), playerReady && /*#__PURE__*/React.createElement(TopContent, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/ipc-player-integration",
3
- "version": "0.0.1-beta-18",
3
+ "version": "0.0.1-beta-20",
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-beta-1",
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.4.15"
59
+ "@ray-js/builder-mp": "1.5.37"
60
60
  },
61
61
  "husky": {
62
62
  "hooks": {