@ray-js/ipc-player-integration 0.0.68-beta.0 → 0.0.69-beta.0
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/README.md +0 -6
- package/lib/ctx/ctx.album.test.d.ts +1 -0
- package/lib/ctx/ctx.album.test.js +197 -0
- package/lib/ctx/ctx.composition.js +13 -3
- package/lib/ctx/ctx.js +48 -35
- package/lib/ctx/multiCameraCtx.d.ts +2 -0
- package/lib/ctx/multiCameraCtx.js +17 -1
- package/lib/ctx/multiCameraCtx.test.d.ts +1 -0
- package/lib/ctx/multiCameraCtx.test.js +65 -0
- package/lib/i18n/index.d.ts +12 -0
- package/lib/i18n/strings.d.ts +6 -0
- package/lib/i18n/strings.js +6 -0
- package/lib/index.d.ts +0 -4
- package/lib/index.js +1 -3
- package/lib/interface.d.ts +18 -3
- package/lib/ui/absoluteContent.d.ts +2 -0
- package/lib/ui/absoluteContent.js +3 -0
- package/lib/ui/bottomCoverHeight.d.ts +2 -0
- package/lib/ui/bottomCoverHeight.js +6 -0
- package/lib/ui/bottomCoverHeight.test.d.ts +1 -0
- package/lib/ui/bottomCoverHeight.test.js +15 -0
- package/lib/ui/bottomLeftContent.js +65 -123
- package/lib/ui/bottomRightContent.js +13 -11
- package/lib/ui/topLeftContent.js +2 -4
- package/lib/ui/topRightContent.js +2 -4
- package/lib/ui/ui.d.ts +0 -5
- package/lib/ui/ui.js +100 -93
- package/lib/utils/captureResult.d.ts +12 -0
- package/lib/utils/captureResult.js +70 -0
- package/lib/utils/captureResult.test.d.ts +1 -0
- package/lib/utils/captureResult.test.js +223 -0
- package/lib/utils/fullLinkTracking.d.ts +5 -0
- package/lib/utils/fullLinkTracking.js +71 -0
- package/lib/utils/navigation.d.ts +2 -1
- package/lib/utils/navigation.js +13 -3
- package/lib/widgets/battery/battery.js +5 -7
- package/lib/widgets/battery/batteryFull.js +5 -7
- package/lib/widgets/captureResult/captureResult.d.ts +16 -0
- package/lib/widgets/captureResult/captureResult.js +85 -0
- package/lib/widgets/captureResult/captureResult.less +144 -0
- package/lib/widgets/captureResult/captureResult.test.d.ts +1 -0
- package/lib/widgets/captureResult/captureResult.test.js +84 -0
- package/lib/widgets/captureResult/index.d.ts +2 -0
- package/lib/widgets/captureResult/index.js +2 -0
- package/lib/widgets/floodlight/floodlight.js +1 -2
- package/lib/widgets/flowLowTip/flowLowTip.js +1 -2
- package/lib/widgets/fullScreen/fullScreen.js +31 -44
- package/lib/widgets/fullScreen/fullTravelRouteControl.d.ts +2 -2
- package/lib/widgets/fullScreen/fullTravelRouteControl.js +6 -3
- package/lib/widgets/fullScreen/verticalScreen.js +1 -2
- package/lib/widgets/index.d.ts +1 -0
- package/lib/widgets/index.js +2 -1
- package/lib/widgets/moveInteractiveControl/controlButton.js +1 -2
- package/lib/widgets/moveInteractiveControl/moveInteractiveControlUI.js +5 -16
- package/lib/widgets/moveInteractiveControl/moveInteractiveControlUI.less +4 -24
- package/lib/widgets/multiCamera/index.less +1 -0
- package/lib/widgets/multiCamera/landscapeTip.js +2 -5
- package/lib/widgets/multiCamera/moveablePtzControl.js +7 -9
- package/lib/widgets/multiCamera/multiPtz.js +2 -3
- package/lib/widgets/multiCamera/ptzMoveableTip.js +2 -5
- package/lib/widgets/multiCamera/switchLayout.js +1 -2
- package/lib/widgets/multiCamera/tileMultiPtz.js +2 -3
- package/lib/widgets/multiCamera/tileSwitchLayout.js +1 -2
- package/lib/widgets/multiCamera/tileTip.js +2 -5
- package/lib/widgets/muted/muted.js +1 -2
- package/lib/widgets/muted/muted.test.js +52 -66
- package/lib/widgets/ptz/ptz.js +1 -2
- package/lib/widgets/ptz/ptzControl.js +3 -4
- package/lib/widgets/ptzControlTip/ptzControlTip.js +4 -9
- package/lib/widgets/ptzControlTip/ptzControlTip.less +0 -6
- package/lib/widgets/realTimeMagnification/realTimeMagnification.js +1 -2
- package/lib/widgets/recordVideo/recordVideo.js +178 -32
- package/lib/widgets/recordVideo/recordVideo.less +17 -74
- package/lib/widgets/recordVideo/recordVideo.lifecycle.test.d.ts +1 -0
- package/lib/widgets/recordVideo/recordVideo.lifecycle.test.js +106 -0
- package/lib/widgets/recordVideo/recordVideo.test.js +3 -169
- package/lib/widgets/resolution/fullResolutionControl.js +19 -29
- package/lib/widgets/resolution/resolution.js +2 -3
- package/lib/widgets/screenshot/screenshot.js +125 -35
- package/lib/widgets/screenshot/screenshot.less +1 -40
- package/lib/widgets/screenshot/screenshot.test.js +113 -108
- package/lib/widgets/signal4G/signal4G.js +1 -4
- package/lib/widgets/siren/siren.js +1 -2
- package/lib/widgets/tempHumidity/tempHumidity.js +1 -2
- package/lib/widgets/toggleVerticalFull/toggleVerticalFull.js +1 -2
- package/lib/widgets/trialBadge/index.d.ts +2 -1
- package/lib/widgets/trialBadge/index.js +20 -17
- package/lib/widgets/trialBadge/index.less +0 -24
- package/lib/widgets/trialBadge/useTrialBadge.d.ts +3 -2
- package/lib/widgets/trialBadge/useTrialBadge.js +21 -3
- package/lib/widgets/tryExperience/tryExperience.js +1 -2
- package/lib/widgets/videoBitKBP/videoBitKBP.js +1 -2
- package/lib/widgets/voiceIntercom/voiceIntercom.js +24 -50
- package/lib/widgets/voiceIntercom/voiceIntercom.less +0 -16
- package/lib/widgets/zoomTurntable/turntable/index.d.ts +7 -5
- package/lib/widgets/zoomTurntable/turntable/index.js +1 -3
- package/lib/widgets/zoomTurntable/zoomTurntableDock.d.ts +3 -5
- package/lib/widgets/zoomTurntable/zoomTurntableDock.js +4 -4
- package/lib/widgets/zoomTurntable/zoomTurntableEntry.js +19 -32
- package/lib/widgets/zoomTurntable/zoomTurntableTip.js +3 -24
- package/package.json +7 -15
- package/lib/renderer/capabilities.d.ts +0 -8
- package/lib/renderer/capabilities.js +0 -19
- package/lib/renderer/context.d.ts +0 -5
- package/lib/renderer/context.js +0 -6
- package/lib/renderer/directionControl.d.ts +0 -6
- package/lib/renderer/directionControl.js +0 -3
- package/lib/renderer/font-manifest.json +0 -9
- package/lib/renderer/font.less +0 -5
- package/lib/renderer/glyphs.d.ts +0 -1
- package/lib/renderer/glyphs.js +0 -256
- package/lib/renderer/index.module.less +0 -48
- package/lib/renderer/overlay.d.ts +0 -4
- package/lib/renderer/overlay.js +0 -6
- package/lib/renderer/ptzZoom.d.ts +0 -6
- package/lib/renderer/ptzZoom.js +0 -3
- package/lib/renderer/text.d.ts +0 -4
- package/lib/renderer/text.js +0 -32
- package/lib/renderer/text.module.less +0 -4
- package/lib/renderer/viewport.d.ts +0 -7
- package/lib/renderer/viewport.js +0 -24
- package/lib/res/lynx-signal/index.d.ts +0 -1
- package/lib/res/lynx-signal/index.js +0 -22
- package/lib/res/lynx-signal/signalFour0.png +0 -0
- package/lib/res/lynx-signal/signalFour1.png +0 -0
- package/lib/res/lynx-signal/signalFour2.png +0 -0
- package/lib/res/lynx-signal/signalFour3.png +0 -0
- package/lib/res/lynx-signal/signalFour4.png +0 -0
- package/lib/res/lynx-signal/signalThree0.png +0 -0
- package/lib/res/lynx-signal/signalThree1.png +0 -0
- package/lib/res/lynx-signal/signalThree2.png +0 -0
- package/lib/res/lynx-signal/signalThree3.png +0 -0
- package/lib/res/player-charging.png +0 -0
- package/lib/res/player-more-arrow.png +0 -0
- package/lib/res/player-solar.png +0 -0
- package/lib/ui/scrollHintArrow.d.ts +0 -23
- package/lib/ui/scrollHintArrow.js +0 -83
- package/lib/widgets/battery/statusIcon.d.ts +0 -6
- package/lib/widgets/battery/statusIcon.js +0 -36
- package/lib/widgets/battery/statusIcon.less +0 -24
- package/lib/widgets/captureToast/captureToast.d.ts +0 -9
- package/lib/widgets/captureToast/captureToast.js +0 -73
- package/lib/widgets/recordVideo/recordVideoTimer.d.ts +0 -3
- package/lib/widgets/recordVideo/recordVideoTimer.js +0 -26
- package/lib/widgets/zoomTurntable/lynxDockLayout.d.ts +0 -6
- package/lib/widgets/zoomTurntable/lynxDockLayout.js +0 -30
- package/lib/widgets/zoomTurntable/turntable/lynx.d.ts +0 -5
- package/lib/widgets/zoomTurntable/turntable/lynx.js +0 -273
- package/lib/widgets/zoomTurntable/turntable/lynx.less +0 -9
- package/lib/widgets/zoomTurntable/turntable/lynxModel.d.ts +0 -37
- package/lib/widgets/zoomTurntable/turntable/lynxModel.js +0 -122
- package/lib/widgets/zoomTurntable/turntable/lynxPaint.d.ts +0 -3
- package/lib/widgets/zoomTurntable/turntable/lynxPaint.js +0 -36
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export const getBottomCoverHeight = (screenType, isVerticalFullLayout, shouldHide) => {
|
|
2
|
+
if (screenType === 'full') return shouldHide ? 59 : 58;
|
|
3
|
+
|
|
4
|
+
// Distinct sizes refresh native hit regions when only the parent moves.
|
|
5
|
+
return 48 + (isVerticalFullLayout ? 1 : 0) + (shouldHide ? 2 : 0);
|
|
6
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { getBottomCoverHeight } from './bottomCoverHeight';
|
|
2
|
+
describe('bottom cover height', () => {
|
|
3
|
+
it('changes size for every vertical layout and visibility transition', () => {
|
|
4
|
+
const heights = [getBottomCoverHeight('vertical', false, false), getBottomCoverHeight('vertical', true, false), getBottomCoverHeight('vertical', false, true), getBottomCoverHeight('vertical', true, true)];
|
|
5
|
+
expect(new Set(heights).size).toBe(4);
|
|
6
|
+
expect(Math.min(...heights)).toBe(48);
|
|
7
|
+
expect(Math.max(...heights)).toBeLessThanOrEqual(51);
|
|
8
|
+
});
|
|
9
|
+
it('preserves landscape sizes regardless of the vertical layout state', () => {
|
|
10
|
+
for (const isVerticalFullLayout of [false, true]) {
|
|
11
|
+
expect(getBottomCoverHeight('full', isVerticalFullLayout, false)).toBe(58);
|
|
12
|
+
expect(getBottomCoverHeight('full', isVerticalFullLayout, true)).toBe(59);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
2
|
import "core-js/modules/esnext.iterator.constructor.js";
|
|
4
3
|
import "core-js/modules/esnext.iterator.every.js";
|
|
@@ -7,13 +6,11 @@ import "core-js/modules/esnext.iterator.find.js";
|
|
|
7
6
|
import "core-js/modules/esnext.iterator.map.js";
|
|
8
7
|
import "core-js/modules/esnext.iterator.reduce.js";
|
|
9
8
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
10
|
-
import { ScrollView, View
|
|
9
|
+
import { CoverView, ScrollView, View } from '@ray-js/ray';
|
|
11
10
|
import clsx from 'clsx';
|
|
12
|
-
import { usePlayerOverlayHost } from '../renderer/overlay';
|
|
13
|
-
import { ScrollHintArrow, ScrollHintButton, usesNativeHintImage, getHintViewport } from './scrollHintArrow';
|
|
14
|
-
import { usePlayerRenderMode } from '../renderer/context';
|
|
15
11
|
import { useStore } from '../ctx/store';
|
|
16
12
|
import { useComponentHideState } from './hooks';
|
|
13
|
+
import { getBottomCoverHeight } from './bottomCoverHeight';
|
|
17
14
|
import { TrialBadge, useTrialBadge } from '../widgets/trialBadge';
|
|
18
15
|
import { bottomLeftContentResize, pauseTimeToHideAllComponent, startTimeToHideAllComponent } from './constant';
|
|
19
16
|
|
|
@@ -27,7 +24,6 @@ const VERTICAL_FLAT_MAX = 4;
|
|
|
27
24
|
// 这段同时也是箭头的落位区 —— 箭头贴着内容压在第 5 项露出的一角上(和改动前的观感一致),
|
|
28
25
|
// 因此至少要放得下箭头本体 26 + 左右各 4 的间隙。
|
|
29
26
|
const VERTICAL_PEEK_WIDTH = 34;
|
|
30
|
-
const VERTICAL_HINT_EDGE_GAP = 4;
|
|
31
27
|
|
|
32
28
|
// 平铺档内容与右下角按钮之间的最小安全间距
|
|
33
29
|
const VERTICAL_FLAT_SAFE_GAP = 8;
|
|
@@ -48,14 +44,15 @@ const BottomLeftContent = _ref => {
|
|
|
48
44
|
canOpenSettings = true,
|
|
49
45
|
scrollHintMode = 'button'
|
|
50
46
|
} = _ref;
|
|
51
|
-
const OverlayView = usePlayerOverlayHost();
|
|
52
47
|
const {
|
|
53
48
|
screenType,
|
|
49
|
+
isVerticalFullLayout,
|
|
54
50
|
playState,
|
|
55
51
|
brandColor,
|
|
56
52
|
bottomLeftContent
|
|
57
53
|
} = useStore({
|
|
58
54
|
screenType: ctx.screenType,
|
|
55
|
+
isVerticalFullLayout: ctx.isVerticalFullLayout,
|
|
59
56
|
playState: ctx.playState,
|
|
60
57
|
brandColor: ctx.brandColor,
|
|
61
58
|
bottomLeftContent: ctx.bottomLeftContent
|
|
@@ -85,19 +82,15 @@ const BottomLeftContent = _ref => {
|
|
|
85
82
|
const tryExp = bottomLeftContent === null || bottomLeftContent === void 0 ? void 0 : bottomLeftContent.find(item => item.id === 'TryExperience');
|
|
86
83
|
return (_gRawData = tryExp === null || tryExp === void 0 || (_tryExp$initProps5 = tryExp.initProps) === null || _tryExp$initProps5 === void 0 ? void 0 : _tryExp$initProps5.gRawData) !== null && _gRawData !== void 0 ? _gRawData : false;
|
|
87
84
|
}, [bottomLeftContent]);
|
|
88
|
-
const renderMode = usePlayerRenderMode();
|
|
89
|
-
const hintPlatform = useMemo(() => {
|
|
90
|
-
var _getSystemInfoSync;
|
|
91
|
-
return renderMode === 'lynx' ? ((_getSystemInfoSync = getSystemInfoSync()) === null || _getSystemInfoSync === void 0 ? void 0 : _getSystemInfoSync.platform) || '' : '';
|
|
92
|
-
}, [renderMode]);
|
|
93
85
|
const [shouldHide] = useComponentHideState();
|
|
94
86
|
const {
|
|
95
87
|
showTrialBadge,
|
|
88
|
+
handleTrialView,
|
|
96
89
|
handleTrialSubscribe,
|
|
97
90
|
handleCountdownEnd
|
|
98
|
-
} = useTrialBadge(ctx.event, ctx.devId, trialRemainingSec);
|
|
91
|
+
} = useTrialBadge(ctx.event, ctx.devId, trialRemainingSec, ctx.trialBadgeViewedRef, ctx.trialBadgeRtidRef);
|
|
99
92
|
|
|
100
|
-
//
|
|
93
|
+
// 横向滚动状态:内容溢出且未滑到对应边缘时,显示左 / 右箭头提示
|
|
101
94
|
const idRef = useRef(++scrollClsSeq);
|
|
102
95
|
// wrap 是左下角的可用区(left:0 ~ right:reservedRight),宽度不随 ScrollView 收窄而变,
|
|
103
96
|
// 因此用它、而不是 ScrollView 自身,作为“能摆多宽”的基准,避免收窄与分档互相依赖
|
|
@@ -118,8 +111,6 @@ const BottomLeftContent = _ref => {
|
|
|
118
111
|
// 点击箭头时的受控滚动目标;仅在程序化滚动期间为数值,结束后置回 undefined,
|
|
119
112
|
// 避免持续受控导致用户手动拖动被回弹
|
|
120
113
|
const [scrollTo, setScrollTo] = useState(undefined);
|
|
121
|
-
const [lynxAtEnd, setLynxAtEnd] = useState(false);
|
|
122
|
-
const endPageTouchRef = useRef(null);
|
|
123
114
|
// 横竖屏切换后,强制 ScrollView 重新挂载并把滚动状态重置为初始值
|
|
124
115
|
const [scrollResetKey, setScrollResetKey] = useState(0);
|
|
125
116
|
// 用户在某种屏幕模式下拖动过一次之后,该模式不再展示箭头(竖屏 / 横屏各自独立记录)
|
|
@@ -142,12 +133,10 @@ const BottomLeftContent = _ref => {
|
|
|
142
133
|
const scrollEndTimerRef = useRef();
|
|
143
134
|
// 测量时需要叠加当前滚动量,用 ref 避免闭包拿到过期值
|
|
144
135
|
const scrollLeftRef = useRef(0);
|
|
145
|
-
const pageOffsetRef = useRef(0);
|
|
146
136
|
useEffect(() => {
|
|
147
137
|
setScrollResetKey(k => k + 1);
|
|
148
138
|
setScrollLeft(0);
|
|
149
139
|
setScrollTo(undefined);
|
|
150
|
-
setLynxAtEnd(false);
|
|
151
140
|
scrollLeftRef.current = 0;
|
|
152
141
|
// 清零上一屏的测量值,避免用旧 clientWidth/contentWidth 在重新测量前误判溢出导致箭头闪现
|
|
153
142
|
setClientWidth(0);
|
|
@@ -308,7 +297,7 @@ const BottomLeftContent = _ref => {
|
|
|
308
297
|
// 这样即使内容容器被撑满到可视内盒宽,也能拿到真实内容宽;哨兵不可用时回退到容器宽。
|
|
309
298
|
let tw = 0;
|
|
310
299
|
if (scrollRect && endRect && typeof endRect.left === 'number') {
|
|
311
|
-
tw = endRect.left - scrollRect.left - paddingLeftPx + scrollLeftRef.current
|
|
300
|
+
tw = endRect.left - scrollRect.left - paddingLeftPx + scrollLeftRef.current;
|
|
312
301
|
}
|
|
313
302
|
if (!(tw > 0)) {
|
|
314
303
|
tw = (contentRect === null || contentRect === void 0 ? void 0 : contentRect.width) || 0;
|
|
@@ -317,11 +306,11 @@ const BottomLeftContent = _ref => {
|
|
|
317
306
|
setContentWidth(tw);
|
|
318
307
|
}
|
|
319
308
|
attempts += 1;
|
|
320
|
-
//
|
|
321
|
-
if (attempts >=
|
|
309
|
+
// 最多轮询 15 次(约 6s)兜底,避免无限轮询
|
|
310
|
+
if (attempts >= 15) {
|
|
322
311
|
return;
|
|
323
312
|
}
|
|
324
|
-
timer = setTimeout(measure,
|
|
313
|
+
timer = setTimeout(measure, 400);
|
|
325
314
|
});
|
|
326
315
|
};
|
|
327
316
|
|
|
@@ -337,7 +326,7 @@ const BottomLeftContent = _ref => {
|
|
|
337
326
|
// playState:视频就绪后 overlay 可能重新布局,需重新测量
|
|
338
327
|
playState, bottomLeftContent === null || bottomLeftContent === void 0 ? void 0 : bottomLeftContent.length, shouldHide, showBadge, wrapCls, scrollCls, contentCls, scrollResetKey, resizeSignal,
|
|
339
328
|
// 收紧后各项 padding 变小,必须重测一遍逐项宽,否则分档还在用收紧前的旧值
|
|
340
|
-
tightened
|
|
329
|
+
tightened]);
|
|
341
330
|
|
|
342
331
|
// 子元素主动上报宽度变化 → 重跑测量,及时更新横滑箭头与右边缘淡出
|
|
343
332
|
useEffect(() => {
|
|
@@ -367,38 +356,20 @@ const BottomLeftContent = _ref => {
|
|
|
367
356
|
const totalContentWidth = naturalWidth > 0 ? paddingLeftPx + naturalWidth + paddingRightPx : 0;
|
|
368
357
|
// 竖屏由“个数”决定是否溢出(平铺档恒不溢出);横屏保持原来的像素比对
|
|
369
358
|
const isOverflow = isVertical ? !isFlat : totalContentWidth > clientWidth + 1;
|
|
370
|
-
const
|
|
371
|
-
const
|
|
372
|
-
// Once the end is reached there is no hint to mask: restore the WebView layout budget.
|
|
373
|
-
|
|
374
|
-
const hintViewport = getHintViewport(renderMode, hintPlatform, isScrollMode, verticalScrollWidth, usesNativeHintImage(renderMode, hintPlatform) ? availableWidth : clientWidth, hintSize, VERTICAL_HINT_EDGE_GAP, lynxAtEnd);
|
|
375
|
-
const scrollViewWidth = hintViewport.visibleWidth;
|
|
376
|
-
const atEnd = lynxAtEnd || !isOverflow || scrollLeft + scrollViewWidth >= totalContentWidth - 2;
|
|
377
|
-
// Lynx 不响应 ScrollView 的受控 scrollLeft / scrollIntoView,点击时平移现有内容。
|
|
378
|
-
// 保留原节点;末页通过右滑返回,不增加 WebView 没有的反向箭头。
|
|
379
|
-
const pageOffset = renderMode === 'lynx' && lynxAtEnd ? Math.max(0, totalContentWidth - scrollViewWidth - scrollLeft) : 0;
|
|
380
|
-
pageOffsetRef.current = pageOffset;
|
|
359
|
+
const scrollViewWidth = verticalScrollWidth > 0 ? verticalScrollWidth : clientWidth;
|
|
360
|
+
const atEnd = !isOverflow || scrollLeft + scrollViewWidth >= totalContentWidth - 2;
|
|
381
361
|
const isDismissed = dismissed[screenType];
|
|
362
|
+
const isButtonHint = scrollHintMode === 'button';
|
|
382
363
|
// button 模式:溢出且未到末端即常显(不受 dismissed 影响);pulse 模式:保留拖动后消失的旧逻辑。
|
|
383
364
|
// compact 档(<= 4 个但摆不下)不出箭头:那点空间要留给元素本身,箭头只会遮更多
|
|
384
365
|
|
|
385
366
|
// 右侧还有未滚到头的内容时,启用右边缘淡出,把没完全露出的元素渐隐隐藏(横竖屏都生效)
|
|
386
367
|
const fadeRightEdge = isOverflow && !atEnd;
|
|
387
368
|
|
|
388
|
-
//
|
|
389
|
-
//
|
|
369
|
+
// 点击右箭头:直接滚动到最右端。
|
|
370
|
+
// 给一个足够大的目标值,交由 ScrollView 自身夹取到真实最右端,避免测量误差导致滚不到底。
|
|
390
371
|
|
|
391
|
-
const
|
|
392
|
-
var _event$touches, _event$changedTouches, _event$origin, _event$origin2, _touch$clientX, _touch$clientY;
|
|
393
|
-
const touch = (event === null || event === void 0 || (_event$touches = event.touches) === null || _event$touches === void 0 ? void 0 : _event$touches[0]) || (event === null || event === void 0 || (_event$changedTouches = event.changedTouches) === null || _event$changedTouches === void 0 ? void 0 : _event$changedTouches[0]) || (event === null || event === void 0 || (_event$origin = event.origin) === null || _event$origin === void 0 || (_event$origin = _event$origin.touches) === null || _event$origin === void 0 ? void 0 : _event$origin[0]) || (event === null || event === void 0 || (_event$origin2 = event.origin) === null || _event$origin2 === void 0 || (_event$origin2 = _event$origin2.changedTouches) === null || _event$origin2 === void 0 ? void 0 : _event$origin2[0]);
|
|
394
|
-
const x = (_touch$clientX = touch === null || touch === void 0 ? void 0 : touch.clientX) !== null && _touch$clientX !== void 0 ? _touch$clientX : touch === null || touch === void 0 ? void 0 : touch.pageX;
|
|
395
|
-
const y = (_touch$clientY = touch === null || touch === void 0 ? void 0 : touch.clientY) !== null && _touch$clientY !== void 0 ? _touch$clientY : touch === null || touch === void 0 ? void 0 : touch.pageY;
|
|
396
|
-
return typeof x === 'number' && typeof y === 'number' ? {
|
|
397
|
-
x,
|
|
398
|
-
y
|
|
399
|
-
} : null;
|
|
400
|
-
};
|
|
401
|
-
const coverHeight = screenType === 'vertical' ? shouldHide ? 49 : 48 : shouldHide ? 59 : 58;
|
|
372
|
+
const coverHeight = getBottomCoverHeight(screenType, isVerticalFullLayout, shouldHide);
|
|
402
373
|
const containerHeight = screenType === 'vertical' ? 48 : 58;
|
|
403
374
|
|
|
404
375
|
// reservedRight 兼容 number(px)与 string(任意 CSS 长度,例如 "35%")
|
|
@@ -410,50 +381,47 @@ const BottomLeftContent = _ref => {
|
|
|
410
381
|
// 竖屏: 0 + 24 = 24 → bottom = 16
|
|
411
382
|
// 横屏: 25 + 16.5 = 41.5 → bottom = 33.5
|
|
412
383
|
const visibleRowHeight = containerHeight - paddingBottomPx;
|
|
413
|
-
|
|
414
384
|
// button 模式用半透明圆做点击热区,比 pulse 提示大;下移半个差值以保持图标中心不变
|
|
415
|
-
|
|
385
|
+
const hintSize = isButtonHint ? 26 : 16;
|
|
416
386
|
// 竖屏:箭头贴着可视区右缘、压在第 5 项露出的那一角上(改动前就是这个观感)。
|
|
417
387
|
// 箭头右缘距可视区右缘 4px => right = 可用宽 - 可视宽 + 4
|
|
418
388
|
// 可视宽是“前 4 项 + 34 露出区”,箭头宽 26,因此箭头左缘落在第 4 项之后 4px,碰不到它。
|
|
419
389
|
// 横屏维持原来的 6px
|
|
420
390
|
const hintRight = (() => {
|
|
421
391
|
if (!isVertical) return 6;
|
|
422
|
-
if (!(availableWidth > 0) || !(
|
|
423
|
-
return Math.max(availableWidth -
|
|
392
|
+
if (!(availableWidth > 0) || !(scrollViewWidth > 0)) return 4;
|
|
393
|
+
return Math.max(availableWidth - scrollViewWidth + 4, 4);
|
|
424
394
|
})();
|
|
425
|
-
return /*#__PURE__*/React.createElement(
|
|
395
|
+
return /*#__PURE__*/React.createElement(CoverView, {
|
|
426
396
|
className: clsx('ipc-player-bottom-left-content-wrap', wrapCls),
|
|
427
|
-
style:
|
|
397
|
+
style: {
|
|
428
398
|
right: rightCss,
|
|
429
399
|
height: showBadge ? `${coverHeight + 30}px` : `${coverHeight}px`,
|
|
400
|
+
boxSizing: 'border-box',
|
|
430
401
|
display: 'flex',
|
|
431
402
|
flexDirection: 'column',
|
|
432
403
|
justifyContent: 'flex-start',
|
|
433
|
-
opacity: shouldHide ? 0 : 1
|
|
434
|
-
}, renderMode === 'lynx' ? {
|
|
435
|
-
transition: 'opacity 0.3s ease'
|
|
436
|
-
} : {}), {}, {
|
|
404
|
+
opacity: shouldHide ? 0 : 1,
|
|
437
405
|
pointerEvents: shouldHide ? 'none' : 'auto'
|
|
438
|
-
}
|
|
406
|
+
}
|
|
439
407
|
}, showBadge && /*#__PURE__*/React.createElement(View, {
|
|
440
408
|
style: {
|
|
441
409
|
height: '32px',
|
|
410
|
+
position: 'relative',
|
|
411
|
+
top: `${coverHeight - containerHeight}px`,
|
|
442
412
|
marginLeft: screenType === 'vertical' ? '12px' : '25px'
|
|
443
413
|
}
|
|
444
414
|
}, /*#__PURE__*/React.createElement(TrialBadge, {
|
|
415
|
+
onView: handleTrialView,
|
|
445
416
|
brandColor: brandColor,
|
|
446
417
|
trialRemainingSec: trialRemainingSec,
|
|
447
418
|
onSubscribe: handleTrialSubscribe,
|
|
448
419
|
onCountdownEnd: handleCountdownEnd
|
|
449
|
-
})), /*#__PURE__*/React.createElement(ScrollView,
|
|
420
|
+
})), /*#__PURE__*/React.createElement(ScrollView, {
|
|
450
421
|
key: scrollResetKey,
|
|
451
|
-
scrollX:
|
|
422
|
+
scrollX: true,
|
|
452
423
|
scrollLeft: scrollTo,
|
|
453
|
-
scrollWithAnimation: true
|
|
454
|
-
}, usesNativeHintImage(renderMode, hintPlatform) ? {
|
|
455
|
-
bounces: false
|
|
456
|
-
} : {}, {
|
|
424
|
+
scrollWithAnimation: true,
|
|
457
425
|
onScroll: e => {
|
|
458
426
|
var _e$detail;
|
|
459
427
|
// 滑动开始时暂停自动隐藏(仅在一次滑动会话内触发一次),滑动停止后恢复
|
|
@@ -474,13 +442,8 @@ const BottomLeftContent = _ref => {
|
|
|
474
442
|
// Ray ScrollView 在不同实现下,scrollLeft 可能直接挂在事件上,也可能在 detail 内
|
|
475
443
|
const sl = typeof (e === null || e === void 0 ? void 0 : e.scrollLeft) === 'number' ? e.scrollLeft : e === null || e === void 0 || (_e$detail = e.detail) === null || _e$detail === void 0 ? void 0 : _e$detail.scrollLeft;
|
|
476
444
|
if (typeof sl === 'number') {
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
scrollLeftRef.current = nextScrollLeft;
|
|
480
|
-
setScrollLeft(nextScrollLeft);
|
|
481
|
-
if (usesNativeHintImage(renderMode, hintPlatform) && isScrollMode && !lynxAtEnd && nextScrollLeft > 0 && clientWidth > 0 && nextScrollLeft + clientWidth >= totalContentWidth - 2) {
|
|
482
|
-
setLynxAtEnd(true);
|
|
483
|
-
}
|
|
445
|
+
scrollLeftRef.current = sl;
|
|
446
|
+
setScrollLeft(sl);
|
|
484
447
|
// 一旦真的拖动过(>2px 阈值过滤抖动 / 重置触发的 0 值),当前屏幕模式下不再展示箭头
|
|
485
448
|
if (sl > 2 && !dismissed[screenType]) {
|
|
486
449
|
setDismissed(d => _objectSpread(_objectSpread({}, d), {}, {
|
|
@@ -497,45 +460,28 @@ const BottomLeftContent = _ref => {
|
|
|
497
460
|
// 横屏 isScrollMode 恒为 false,仍走 72px 宽渐变,行为不变。
|
|
498
461
|
'ipc-player-bottom-left-scroll-fademask--narrow': fadeRightEdge && isScrollMode
|
|
499
462
|
}),
|
|
500
|
-
style:
|
|
463
|
+
style: {
|
|
501
464
|
paddingBottom: `${paddingBottomPx}px`,
|
|
502
465
|
paddingLeft: `${paddingLeftPx}px`,
|
|
503
466
|
paddingRight: `${paddingRightPx}px`,
|
|
504
|
-
width:
|
|
505
|
-
}, usesNativeHintImage(renderMode, hintPlatform) && isScrollMode ? {
|
|
506
|
-
clipPath: 'none'
|
|
507
|
-
} : {}), {}, {
|
|
467
|
+
width: verticalScrollWidth > 0 ? `${verticalScrollWidth}px` : '100%',
|
|
508
468
|
height: `${containerHeight}px`,
|
|
469
|
+
position: 'relative',
|
|
470
|
+
top: `${coverHeight - containerHeight}px`,
|
|
509
471
|
marginTop: showBadge ? '-2px' : 0,
|
|
510
472
|
whiteSpace: 'nowrap'
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
onTouchStart: renderMode === 'lynx' ? event => {
|
|
514
|
-
endPageTouchRef.current = renderMode === 'lynx' && lynxAtEnd ? readTouch(event) : null;
|
|
515
|
-
} : undefined,
|
|
516
|
-
onTouchEnd: renderMode === 'lynx' ? event => {
|
|
517
|
-
const start = endPageTouchRef.current;
|
|
518
|
-
const end = readTouch(event);
|
|
519
|
-
endPageTouchRef.current = null;
|
|
520
|
-
if (!start || !end || renderMode !== 'lynx' || !lynxAtEnd) return;
|
|
521
|
-
const dx = end.x - start.x;
|
|
522
|
-
if (dx > 24 && dx > Math.abs(end.y - start.y)) setLynxAtEnd(false);
|
|
523
|
-
} : undefined,
|
|
524
|
-
onTouchCancel: () => {
|
|
525
|
-
endPageTouchRef.current = null;
|
|
526
|
-
},
|
|
473
|
+
}
|
|
474
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
527
475
|
className: clsx('ipc-player-bottom-left-content-container', contentCls, {
|
|
528
476
|
'ipc-player-bottom-left-content-container-tight': tightened
|
|
529
477
|
}),
|
|
530
|
-
style:
|
|
531
|
-
display:
|
|
478
|
+
style: {
|
|
479
|
+
display: 'inline-flex',
|
|
532
480
|
flexDirection: 'row',
|
|
533
481
|
height: `${visibleRowHeight}px`,
|
|
534
482
|
alignItems: 'center',
|
|
535
483
|
paddingLeft: `${contentPaddingLeftPx}px`
|
|
536
|
-
}
|
|
537
|
-
transform: `translateX(-${pageOffset}px)`
|
|
538
|
-
} : {})
|
|
484
|
+
}
|
|
539
485
|
}, children, /*#__PURE__*/React.createElement(View, {
|
|
540
486
|
className: endCls,
|
|
541
487
|
style: {
|
|
@@ -543,26 +489,11 @@ const BottomLeftContent = _ref => {
|
|
|
543
489
|
height: '1px',
|
|
544
490
|
flexShrink: 0
|
|
545
491
|
}
|
|
546
|
-
}))), isOverflow && !atEnd && !isCompact && (!isVertical || isScrollMode) && (isButtonHint || !isDismissed) && /*#__PURE__*/React.createElement(
|
|
547
|
-
renderMode: renderMode,
|
|
548
|
-
platform: hintPlatform,
|
|
549
|
-
onPress: isButtonHint ? () => {
|
|
550
|
-
if (!isOverflow) {
|
|
551
|
-
return;
|
|
552
|
-
}
|
|
553
|
-
if (renderMode === 'lynx') {
|
|
554
|
-
var _ctx$event6, _ctx$event7;
|
|
555
|
-
(_ctx$event6 = ctx.event) === null || _ctx$event6 === void 0 || _ctx$event6.emit(pauseTimeToHideAllComponent);
|
|
556
|
-
setLynxAtEnd(true);
|
|
557
|
-
(_ctx$event7 = ctx.event) === null || _ctx$event7 === void 0 || _ctx$event7.emit(startTimeToHideAllComponent);
|
|
558
|
-
return;
|
|
559
|
-
}
|
|
560
|
-
setScrollTo(Math.max(0, Math.ceil(totalContentWidth - scrollViewWidth)));
|
|
561
|
-
} : undefined,
|
|
492
|
+
}))), isOverflow && !atEnd && !isCompact && (!isVertical || isScrollMode) && (isButtonHint || !isDismissed) && /*#__PURE__*/React.createElement(CoverView, {
|
|
562
493
|
className: clsx('ipc-player-bottom-left-scroll-hint', {
|
|
563
494
|
'ipc-player-bottom-left-scroll-hint--button': isButtonHint
|
|
564
495
|
}),
|
|
565
|
-
style:
|
|
496
|
+
style: {
|
|
566
497
|
position: 'absolute',
|
|
567
498
|
right: `${hintRight}px`,
|
|
568
499
|
bottom: `${paddingBottomPx + visibleRowHeight / 2 - 8 - (hintSize - 16) / 2}px`,
|
|
@@ -572,15 +503,26 @@ const BottomLeftContent = _ref => {
|
|
|
572
503
|
alignItems: 'center',
|
|
573
504
|
justifyContent: 'center',
|
|
574
505
|
pointerEvents: isButtonHint ? 'auto' : 'none'
|
|
575
|
-
},
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
506
|
+
},
|
|
507
|
+
onClick: isButtonHint ? () => {
|
|
508
|
+
if (!isOverflow) {
|
|
509
|
+
return;
|
|
510
|
+
}
|
|
511
|
+
setScrollTo(totalContentWidth + clientWidth + 9999);
|
|
512
|
+
} : undefined
|
|
513
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
514
|
+
className: clsx('ipc-player-bottom-left-scroll-hint-arrow', {
|
|
515
|
+
'ipc-player-bottom-left-scroll-hint-arrow--right': true,
|
|
516
|
+
'ipc-player-bottom-left-scroll-hint-arrow--light': isButtonHint,
|
|
517
|
+
'ipc-player-bottom-left-scroll-hint-arrow--static': isButtonHint
|
|
518
|
+
})
|
|
519
|
+
// 右向 chevron 由 top+right 描边旋转而成,视觉重心偏右;放大并整体左移使其在圆内居中
|
|
520
|
+
,
|
|
521
|
+
style: isButtonHint ? {
|
|
522
|
+
width: '9px',
|
|
523
|
+
height: '9px',
|
|
524
|
+
transform: 'translate(-1px, 0) rotate(45deg)'
|
|
525
|
+
} : undefined
|
|
584
526
|
})));
|
|
585
527
|
};
|
|
586
528
|
export default BottomLeftContent;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import React, { useEffect, useRef } from 'react';
|
|
3
|
-
import { View } from '@ray-js/ray';
|
|
3
|
+
import { CoverView, View } from '@ray-js/ray';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import { usePlayerOverlayHost } from '../renderer/overlay';
|
|
6
|
-
import { usePlayerRenderMode } from '../renderer/context';
|
|
7
5
|
import { useStore } from '../ctx/store';
|
|
8
6
|
import { useComponentHideState } from './hooks';
|
|
7
|
+
import { getBottomCoverHeight } from './bottomCoverHeight';
|
|
9
8
|
|
|
10
9
|
// 用唯一 className 在 createSelectorQuery 中区分多个实例,避免互相干扰
|
|
11
10
|
let rightClsSeq = 0;
|
|
@@ -16,18 +15,18 @@ const BottomRightContent = _ref => {
|
|
|
16
15
|
width,
|
|
17
16
|
onWidthChange
|
|
18
17
|
} = _ref;
|
|
19
|
-
const OverlayView = usePlayerOverlayHost();
|
|
20
18
|
const {
|
|
21
19
|
screenType,
|
|
20
|
+
isVerticalFullLayout,
|
|
22
21
|
playState,
|
|
23
22
|
bottomRightContent
|
|
24
23
|
} = useStore({
|
|
25
24
|
screenType: ctx.screenType,
|
|
25
|
+
isVerticalFullLayout: ctx.isVerticalFullLayout,
|
|
26
26
|
playState: ctx.playState,
|
|
27
27
|
bottomRightContent: ctx.bottomRightContent
|
|
28
28
|
});
|
|
29
29
|
const [shouldHide] = useComponentHideState();
|
|
30
|
-
const renderMode = usePlayerRenderMode();
|
|
31
30
|
const idRef = useRef(++rightClsSeq);
|
|
32
31
|
const wrapCls = `ipc-br-wrap-${idRef.current}`;
|
|
33
32
|
const lastWidthRef = useRef(0);
|
|
@@ -48,19 +47,19 @@ const BottomRightContent = _ref => {
|
|
|
48
47
|
onWidthChange === null || onWidthChange === void 0 || onWidthChange(w);
|
|
49
48
|
}
|
|
50
49
|
attempts += 1;
|
|
51
|
-
|
|
52
|
-
if (attempts >= (renderMode === 'lynx' ? 20 : 15)) {
|
|
50
|
+
if (attempts >= 15) {
|
|
53
51
|
return;
|
|
54
52
|
}
|
|
55
|
-
timer = setTimeout(measure,
|
|
53
|
+
timer = setTimeout(measure, 400);
|
|
56
54
|
});
|
|
57
55
|
};
|
|
58
56
|
timer = setTimeout(measure, 60);
|
|
59
57
|
return () => {
|
|
60
58
|
if (timer) clearTimeout(timer);
|
|
61
59
|
};
|
|
62
|
-
}, [screenType, playState, bottomRightContent === null || bottomRightContent === void 0 ? void 0 : bottomRightContent.length, shouldHide, wrapCls, onWidthChange
|
|
60
|
+
}, [screenType, playState, bottomRightContent === null || bottomRightContent === void 0 ? void 0 : bottomRightContent.length, shouldHide, wrapCls, onWidthChange]);
|
|
63
61
|
const containerHeight = screenType === 'vertical' ? 48 : 58;
|
|
62
|
+
const coverHeight = getBottomCoverHeight(screenType, isVerticalFullLayout, shouldHide);
|
|
64
63
|
|
|
65
64
|
// 将 width 统一规范成 CSS 合法值。number → "${n}px",string → 原样透传。
|
|
66
65
|
// 0 / 空串视为「没有传宽度」,沿用默认布局(不设 width)。
|
|
@@ -71,13 +70,14 @@ const BottomRightContent = _ref => {
|
|
|
71
70
|
width,
|
|
72
71
|
boxSizing: 'border-box'
|
|
73
72
|
} : null;
|
|
74
|
-
return /*#__PURE__*/React.createElement(
|
|
73
|
+
return /*#__PURE__*/React.createElement(CoverView, {
|
|
75
74
|
className: clsx('ipc-player-bottom-right-content-wrap', wrapCls),
|
|
76
75
|
style: _objectSpread({
|
|
77
76
|
// 竖屏归 0:这 10px 是纯空白,且计入实测宽后又被 reservedRight 带给左下角,
|
|
78
77
|
// 等于左下角白让 10px。与右下角按钮的间距统一由 BOTTOM_RIGHT_SAFE_GAP 负责。
|
|
79
78
|
paddingLeft: '0',
|
|
80
|
-
height:
|
|
79
|
+
height: `${coverHeight}px`,
|
|
80
|
+
boxSizing: 'border-box'
|
|
81
81
|
}, widthStyle)
|
|
82
82
|
}, /*#__PURE__*/React.createElement(View, {
|
|
83
83
|
style: {
|
|
@@ -85,6 +85,8 @@ const BottomRightContent = _ref => {
|
|
|
85
85
|
paddingRight: screenType === 'vertical' ? 0 : '25px',
|
|
86
86
|
width: '100%',
|
|
87
87
|
height: `${containerHeight}px`,
|
|
88
|
+
position: 'relative',
|
|
89
|
+
top: `${coverHeight - containerHeight}px`,
|
|
88
90
|
justifyContent: 'flex-end'
|
|
89
91
|
},
|
|
90
92
|
className: clsx('ipc-player-bottom-right-content-container', {
|
package/lib/ui/topLeftContent.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View } from '@ray-js/ray';
|
|
2
|
+
import { CoverView, View } from '@ray-js/ray';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
import { usePlayerOverlayHost } from '../renderer/overlay';
|
|
5
4
|
import { useStore } from '../ctx/store';
|
|
6
5
|
import { useComponentHideState } from './hooks';
|
|
7
6
|
const TopLeftContent = _ref => {
|
|
@@ -9,7 +8,6 @@ const TopLeftContent = _ref => {
|
|
|
9
8
|
ctx,
|
|
10
9
|
children
|
|
11
10
|
} = _ref;
|
|
12
|
-
const OverlayView = usePlayerOverlayHost();
|
|
13
11
|
const {
|
|
14
12
|
screenType
|
|
15
13
|
} = useStore({
|
|
@@ -17,7 +15,7 @@ const TopLeftContent = _ref => {
|
|
|
17
15
|
playState: ctx.playState
|
|
18
16
|
});
|
|
19
17
|
const [shouldHide] = useComponentHideState();
|
|
20
|
-
return /*#__PURE__*/React.createElement(
|
|
18
|
+
return /*#__PURE__*/React.createElement(CoverView, {
|
|
21
19
|
className: clsx('ipc-player-top-left-content-wrap'),
|
|
22
20
|
style: {
|
|
23
21
|
paddingRight: screenType === 'vertical' ? '0' : '20px',
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View } from '@ray-js/ray';
|
|
2
|
+
import { CoverView, View } from '@ray-js/ray';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
import { usePlayerOverlayHost } from '../renderer/overlay';
|
|
5
4
|
import { useStore } from '../ctx/store';
|
|
6
5
|
import { useComponentHideState } from './hooks';
|
|
7
6
|
const TopRightContent = _ref => {
|
|
@@ -9,7 +8,6 @@ const TopRightContent = _ref => {
|
|
|
9
8
|
ctx,
|
|
10
9
|
children
|
|
11
10
|
} = _ref;
|
|
12
|
-
const OverlayView = usePlayerOverlayHost();
|
|
13
11
|
const {
|
|
14
12
|
screenType
|
|
15
13
|
} = useStore({
|
|
@@ -17,7 +15,7 @@ const TopRightContent = _ref => {
|
|
|
17
15
|
playState: ctx.playState
|
|
18
16
|
});
|
|
19
17
|
const [shouldHide] = useComponentHideState();
|
|
20
|
-
return /*#__PURE__*/React.createElement(
|
|
18
|
+
return /*#__PURE__*/React.createElement(CoverView, {
|
|
21
19
|
className: clsx('ipc-player-top-right-content-wrap'),
|
|
22
20
|
style: {
|
|
23
21
|
height: screenType === 'vertical' ? shouldHide ? '37px' : '36px' : shouldHide ? '41px' : '40px'
|
package/lib/ui/ui.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PlayerRenderMode } from '../renderer/context';
|
|
3
|
-
import { LynxPlayerAdapters } from '../renderer/capabilities';
|
|
4
2
|
import { PlayStatusData, UseCtx, EventInstance } from '../interface';
|
|
5
3
|
import './ui.less';
|
|
6
4
|
type CtxInstance = ReturnType<UseCtx>;
|
|
@@ -16,9 +14,6 @@ type CSSVariable = {
|
|
|
16
14
|
'--fontSize': string;
|
|
17
15
|
};
|
|
18
16
|
type Props = {
|
|
19
|
-
renderMode?: PlayerRenderMode;
|
|
20
|
-
/** Required when Lynx enables widgets backed by WebView-only renderers. */
|
|
21
|
-
lynxAdapters?: LynxPlayerAdapters;
|
|
22
17
|
devId: string;
|
|
23
18
|
/** 未提供 instance 时,传给播放器内部的 useCtx。null 表示配置查询中。 */
|
|
24
19
|
autoClarityDisabled?: boolean | null;
|