@ray-js/ipc-player-integration 0.0.49-beta.1 → 0.0.49-beta.3

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.
@@ -11,6 +11,9 @@ import { pauseTimeToHideAllComponent, startTimeToHideAllComponent } from './cons
11
11
 
12
12
  // 用唯一 className 在 createSelectorQuery 中区分多个实例,避免互相干扰
13
13
  let scrollClsSeq = 0;
14
+
15
+ // 竖屏下单个 widget 的占位宽度:icon 22px(--iconPlayerSize) + .bottom-left-item-container 左右各 12px
16
+ const VERTICAL_WIDGET_WIDTH = 46;
14
17
  const BottomLeftContent = _ref => {
15
18
  let {
16
19
  ctx,
@@ -215,8 +218,11 @@ const BottomLeftContent = _ref => {
215
218
  // 竖屏 button 模式给 ScrollView 右侧留一条较窄的“箭头槽”:只裁掉内容最右一小段,
216
219
  // 箭头压住最后一个元素的少量边缘(不完全遮挡),整体更贴近内容
217
220
  const arrowGutter = isButtonHint && screenType === 'vertical' ? 12 : 0;
218
- // 箭头贴右边缘放置(竖屏 4px / 横屏 6px),不再随 gutter 居中
219
- const hintRight = arrowGutter > 0 ? 4 : 6;
221
+ // 竖屏再额外收窄一个 widget 的宽度,让可滑动区域整体左缩一格
222
+ const verticalShrink = screenType === 'vertical' ? VERTICAL_WIDGET_WIDTH : 0;
223
+ const scrollShrink = arrowGutter + verticalShrink;
224
+ // 箭头贴滚动可视区右边缘放置(竖屏 4px / 横屏 6px),随收窄量一起左移
225
+ const hintRight = (arrowGutter > 0 ? 4 : 6) + verticalShrink;
220
226
  return /*#__PURE__*/React.createElement(CoverView, {
221
227
  className: clsx('ipc-player-bottom-left-content-wrap'),
222
228
  style: {
@@ -280,7 +286,7 @@ const BottomLeftContent = _ref => {
280
286
  paddingBottom: `${paddingBottomPx}px`,
281
287
  paddingLeft: `${paddingLeftPx}px`,
282
288
  paddingRight: `${paddingRightPx}px`,
283
- width: arrowGutter > 0 ? `calc(100% - ${arrowGutter}px)` : '100%',
289
+ width: scrollShrink > 0 ? `calc(100% - ${scrollShrink}px)` : '100%',
284
290
  height: `${containerHeight}px`,
285
291
  marginTop: showBadge ? '-2px' : 0,
286
292
  whiteSpace: 'nowrap'
package/lib/ui/ui.js CHANGED
@@ -577,25 +577,18 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
577
577
  } = sizeData;
578
578
 
579
579
  // 折叠屏展开/收起、pad 多窗口拖拽等场景,需要重新计算并同步
580
- const small = computeIsSmallScreen();
581
- setIsSmallScreen(small);
582
-
583
- // 针对pad 和折叠屏展开的情况暂不支持横屏,且在ios pad模式下 会触发onResize事件, 待解决
584
- if (small) {
585
- setScreenType('vertical');
586
- } else {
587
- setScreenType(type === 'landscape' ? 'full' : 'vertical');
588
- if (type === 'landscape') {
589
- // 记录切换横屏前的竖屏全屏状态
590
- prevVerticalFullLayoutRef.current = isVerticalFullLayout;
591
- // 横屏时重置竖屏全屏状态
592
- updateAtom(instance.isVerticalFullLayout, false);
593
- } else if (!instance.multiCameraCtx.isSupport) {
594
- // 单目设备从横屏切回竖屏时,恢复之前的竖屏全屏状态
595
- updateAtom(instance.isVerticalFullLayout, prevVerticalFullLayoutRef.current);
596
- }
597
- triggerEvent(showAllComponent);
580
+ setIsSmallScreen(computeIsSmallScreen());
581
+ setScreenType(type === 'landscape' ? 'full' : 'vertical');
582
+ if (type === 'landscape') {
583
+ // 记录切换横屏前的竖屏全屏状态
584
+ prevVerticalFullLayoutRef.current = isVerticalFullLayout;
585
+ // 横屏时重置竖屏全屏状态
586
+ updateAtom(instance.isVerticalFullLayout, false);
587
+ } else if (!instance.multiCameraCtx.isSupport) {
588
+ // 单目设备从横屏切回竖屏时,恢复之前的竖屏全屏状态
589
+ updateAtom(instance.isVerticalFullLayout, prevVerticalFullLayoutRef.current);
598
590
  }
591
+ triggerEvent(showAllComponent);
599
592
  // 横屏(fill/standard)与竖屏均统一调整为 1 倍缩放,保证画面完整展示
600
593
  setScaleMultiple(1);
601
594
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/ipc-player-integration",
3
- "version": "0.0.49-beta.1",
3
+ "version": "0.0.49-beta.3",
4
4
  "description": "IPC 融合播放器",
5
5
  "main": "lib/index",
6
6
  "files": [