@ray-js/ipc-player-integration 0.0.40 → 0.0.42-beta.1

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.
@@ -1,6 +1,6 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
- import React, { useContext, useEffect } from 'react';
3
- import { View, setPageOrientation, Text, hideMenuButton, showMenuButton, showStatusBar, hideStatusBar, setNavigationBarBack } from '@ray-js/ray';
2
+ import React, { useContext, useEffect, useMemo } from 'react';
3
+ import { View, setPageOrientation, Text, hideMenuButton, showMenuButton, showStatusBar, hideStatusBar, setNavigationBarBack, getSystemInfoSync } from '@ray-js/ray';
4
4
  import clsx from 'clsx';
5
5
  import { unstable_batchedUpdates as batchedUpdates } from '@ray-core/ray';
6
6
  import { UIEventContext } from '../../ui/context';
@@ -34,6 +34,15 @@ export function FullScreen(props) {
34
34
  event
35
35
  } = useContext(UIEventContext);
36
36
 
37
+ // pad 设备不接管系统状态栏显隐:showStatusBar 会导致 iPad 面板布局异常;
38
+ // 且 pad 不支持横屏(见 ui.tsx,初始化即强制 vertical),本就不应进入全屏切换流程。
39
+ // 同时守住 hideStatusBar 以保持这对操作对称,避免异常路径下状态栏被隐藏后无法恢复。
40
+ // deviceType 在一次会话内恒定,useMemo 缓存避免每次 render 重复触发同步桥接调用
41
+ const isPad = useMemo(() => {
42
+ var _getSystemInfoSync;
43
+ return ((_getSystemInfoSync = getSystemInfoSync()) === null || _getSystemInfoSync === void 0 ? void 0 : _getSystemInfoSync.deviceType) === 'pad';
44
+ }, []);
45
+
37
46
  /**
38
47
  * 竖屏统一操作
39
48
  */
@@ -44,7 +53,9 @@ export function FullScreen(props) {
44
53
  const handleFull = () => {
45
54
  hasDpCode(devId, DIRECTION_CONTROL_DP_CODE).then(hasDirectionControlDpCode => {
46
55
  hideMenuButton();
47
- hideStatusBar();
56
+ if (!isPad) {
57
+ hideStatusBar();
58
+ }
48
59
  setNavigationBarBack({
49
60
  type: 'custom'
50
61
  });
@@ -108,7 +119,9 @@ export function FullScreen(props) {
108
119
  type: 'system'
109
120
  });
110
121
  showMenuButton();
111
- showStatusBar();
122
+ if (!isPad) {
123
+ showStatusBar();
124
+ }
112
125
  deleteContent('topLeft', verticalScreenId);
113
126
  hideContent('bottomLeft', fullSmallIntercomId);
114
127
  deleteContent('absolute', voiceIntercomId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/ipc-player-integration",
3
- "version": "0.0.40",
3
+ "version": "0.0.42-beta.1",
4
4
  "description": "IPC 融合播放器",
5
5
  "main": "lib/index",
6
6
  "files": [