@ray-js/ipc-player-integration 0.0.56-beta.0 → 0.0.57-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.
Files changed (110) hide show
  1. package/README.md +6 -0
  2. package/lib/ctx/ctx.composition.js +3 -13
  3. package/lib/ctx/ctx.js +35 -43
  4. package/lib/i18n/index.d.ts +0 -12
  5. package/lib/i18n/strings.d.ts +0 -6
  6. package/lib/i18n/strings.js +0 -6
  7. package/lib/index.d.ts +4 -0
  8. package/lib/index.js +3 -1
  9. package/lib/interface.d.ts +3 -16
  10. package/lib/renderer/capabilities.d.ts +8 -0
  11. package/lib/renderer/capabilities.js +19 -0
  12. package/lib/renderer/context.d.ts +5 -0
  13. package/lib/renderer/context.js +6 -0
  14. package/lib/renderer/directionControl.d.ts +6 -0
  15. package/lib/renderer/directionControl.js +3 -0
  16. package/lib/renderer/font.less +5 -0
  17. package/lib/renderer/glyphs.d.ts +1 -0
  18. package/lib/renderer/glyphs.js +256 -0
  19. package/lib/renderer/index.module.less +48 -0
  20. package/lib/renderer/ptzZoom.d.ts +6 -0
  21. package/lib/renderer/ptzZoom.js +3 -0
  22. package/lib/renderer/text.d.ts +4 -0
  23. package/lib/renderer/text.js +32 -0
  24. package/lib/renderer/text.module.less +4 -0
  25. package/lib/renderer/viewport.d.ts +7 -0
  26. package/lib/renderer/viewport.js +24 -0
  27. package/lib/res/lynx-signal/index.d.ts +1 -0
  28. package/lib/res/lynx-signal/index.js +22 -0
  29. package/lib/res/lynx-signal/signalFour0.png +0 -0
  30. package/lib/res/lynx-signal/signalFour1.png +0 -0
  31. package/lib/res/lynx-signal/signalFour2.png +0 -0
  32. package/lib/res/lynx-signal/signalFour3.png +0 -0
  33. package/lib/res/lynx-signal/signalFour4.png +0 -0
  34. package/lib/res/lynx-signal/signalThree0.png +0 -0
  35. package/lib/res/lynx-signal/signalThree1.png +0 -0
  36. package/lib/res/lynx-signal/signalThree2.png +0 -0
  37. package/lib/res/lynx-signal/signalThree3.png +0 -0
  38. package/lib/ui/bottomLeftContent.js +60 -17
  39. package/lib/ui/bottomRightContent.js +6 -3
  40. package/lib/ui/ui.d.ts +5 -0
  41. package/lib/ui/ui.js +59 -45
  42. package/lib/widgets/battery/battery.js +2 -1
  43. package/lib/widgets/battery/batteryFull.js +2 -1
  44. package/lib/widgets/floodlight/floodlight.js +2 -1
  45. package/lib/widgets/flowLowTip/flowLowTip.js +2 -1
  46. package/lib/widgets/fullScreen/fullScreen.js +2 -1
  47. package/lib/widgets/fullScreen/fullTravelRouteControl.d.ts +1 -1
  48. package/lib/widgets/fullScreen/fullTravelRouteControl.js +1 -1
  49. package/lib/widgets/fullScreen/verticalScreen.js +2 -1
  50. package/lib/widgets/index.d.ts +0 -1
  51. package/lib/widgets/index.js +1 -2
  52. package/lib/widgets/moveInteractiveControl/controlButton.js +2 -1
  53. package/lib/widgets/moveInteractiveControl/moveInteractiveControlUI.js +12 -3
  54. package/lib/widgets/moveInteractiveControl/moveInteractiveControlUI.less +24 -4
  55. package/lib/widgets/multiCamera/landscapeTip.js +2 -1
  56. package/lib/widgets/multiCamera/moveablePtzControl.js +1 -1
  57. package/lib/widgets/multiCamera/multiPtz.js +2 -1
  58. package/lib/widgets/multiCamera/ptzMoveableTip.js +2 -1
  59. package/lib/widgets/multiCamera/switchLayout.js +2 -1
  60. package/lib/widgets/multiCamera/tileMultiPtz.js +2 -1
  61. package/lib/widgets/multiCamera/tileSwitchLayout.js +2 -1
  62. package/lib/widgets/multiCamera/tileTip.js +2 -1
  63. package/lib/widgets/muted/muted.js +5 -13
  64. package/lib/widgets/muted/muted.less +1 -5
  65. package/lib/widgets/ptz/ptz.js +2 -1
  66. package/lib/widgets/ptz/ptzControl.js +1 -1
  67. package/lib/widgets/ptzControlTip/ptzControlTip.js +6 -3
  68. package/lib/widgets/ptzControlTip/ptzControlTip.less +6 -0
  69. package/lib/widgets/realTimeMagnification/realTimeMagnification.js +2 -1
  70. package/lib/widgets/recordVideo/recordVideo.js +36 -50
  71. package/lib/widgets/recordVideo/recordVideo.less +74 -17
  72. package/lib/widgets/recordVideo/recordVideo.test.js +0 -1
  73. package/lib/widgets/resolution/fullResolutionControl.js +29 -19
  74. package/lib/widgets/resolution/resolution.js +3 -2
  75. package/lib/widgets/screenshot/screenshot.js +45 -66
  76. package/lib/widgets/screenshot/screenshot.less +40 -1
  77. package/lib/widgets/signal4G/signal4G.js +4 -1
  78. package/lib/widgets/siren/siren.js +2 -1
  79. package/lib/widgets/tempHumidity/tempHumidity.js +2 -1
  80. package/lib/widgets/toggleVerticalFull/toggleVerticalFull.js +2 -1
  81. package/lib/widgets/trialBadge/index.js +8 -3
  82. package/lib/widgets/trialBadge/index.less +24 -0
  83. package/lib/widgets/tryExperience/tryExperience.js +2 -1
  84. package/lib/widgets/videoBitKBP/videoBitKBP.js +2 -1
  85. package/lib/widgets/voiceIntercom/voiceIntercom.js +50 -24
  86. package/lib/widgets/voiceIntercom/voiceIntercom.less +16 -0
  87. package/lib/widgets/zoomTurntable/turntable/index.d.ts +5 -7
  88. package/lib/widgets/zoomTurntable/turntable/index.js +2 -1
  89. package/lib/widgets/zoomTurntable/zoomTurntableEntry.js +2 -1
  90. package/lib/widgets/zoomTurntable/zoomTurntableTip.js +2 -1
  91. package/package.json +15 -7
  92. package/lib/ctx/ctx.album.test.d.ts +0 -1
  93. package/lib/ctx/ctx.album.test.js +0 -197
  94. package/lib/ui/absoluteContent.d.ts +0 -2
  95. package/lib/ui/absoluteContent.js +0 -3
  96. package/lib/utils/captureResult.d.ts +0 -14
  97. package/lib/utils/captureResult.js +0 -70
  98. package/lib/utils/captureResult.test.d.ts +0 -1
  99. package/lib/utils/captureResult.test.js +0 -117
  100. package/lib/widgets/captureResult/captureResult.d.ts +0 -16
  101. package/lib/widgets/captureResult/captureResult.js +0 -85
  102. package/lib/widgets/captureResult/captureResult.less +0 -144
  103. package/lib/widgets/captureResult/captureResult.test.d.ts +0 -1
  104. package/lib/widgets/captureResult/captureResult.test.js +0 -80
  105. package/lib/widgets/captureResult/index.d.ts +0 -2
  106. package/lib/widgets/captureResult/index.js +0 -2
  107. package/lib/widgets/muted/muted.test.d.ts +0 -1
  108. package/lib/widgets/muted/muted.test.js +0 -78
  109. package/lib/widgets/screenshot/screenshot.test.d.ts +0 -1
  110. package/lib/widgets/screenshot/screenshot.test.js +0 -120
@@ -0,0 +1,256 @@
1
+ import "core-js/modules/esnext.iterator.constructor.js";
2
+ import "core-js/modules/esnext.iterator.find.js";
3
+ import "core-js/modules/esnext.iterator.map.js";
4
+ // Generated from the component-owned iconfont.json; keep font and codepoints paired.
5
+ const glyphs = {
6
+ 'icon-panel-solar': '',
7
+ 'icon-panel-a-rongqi722': '',
8
+ 'icon-panel-favorite': '',
9
+ 'icon-panel-album1': '',
10
+ 'icon-panel-grain': '',
11
+ 'icon-panel-pump': '',
12
+ 'icon-panel-favorites2': '',
13
+ 'icon-panel-bird-identification': '',
14
+ 'icon-panel-pir-close': '',
15
+ 'icon-panel-pir-open': '',
16
+ 'icon-panel-Access-Stop': '',
17
+ 'icon-panel-uvb1': '',
18
+ 'icon-panel-uva': '',
19
+ 'icon-panel-circle': '',
20
+ 'icon-panel-heat-light': '',
21
+ 'icon-panel-exhaust': '',
22
+ 'icon-panel-atomization': '',
23
+ 'icon-panel-spray': '',
24
+ 'icon-panel-intake': '',
25
+ 'icon-panel-heat-pad': '',
26
+ 'icon-panel-location': '',
27
+ 'icon-panel-weight': '',
28
+ 'icon-panel-energy': '',
29
+ 'icon-panel-air-setting': '',
30
+ 'icon-panel-a-zu1': '',
31
+ 'icon-panel-zhuapai2': '',
32
+ 'icon-panel-zhuapai1': '',
33
+ 'icon-panel-zhuapai': '',
34
+ 'icon-panel-xingxing_mian': '',
35
+ 'icon-panel-anti-flicker-off': '',
36
+ 'icon-panel-left-arrow-center': '',
37
+ 'icon-panel-v-alarm-light-siren': '',
38
+ 'icon-panel-v-alarm-light': '',
39
+ 'icon-panel-stream-standard': '',
40
+ 'icon-panel-feature-track': '',
41
+ 'icon-panel-v-alarm-siren': '',
42
+ 'icon-panel-v-alarm-off': '',
43
+ 'icon-panel-stream-flowing': '',
44
+ 'icon-panel-anti-flicker': '',
45
+ 'icon-panel-Access-Key-Password': '',
46
+ 'icon-panel-Access-Play': '',
47
+ 'icon-panel-plant_water_temp': '',
48
+ 'icon-panel-plant_footer': '',
49
+ 'icon-panel-plant_record': '',
50
+ 'icon-panel-plant_water_level': '',
51
+ 'icon-panel-ECzhi': '',
52
+ 'icon-panel-plant_light': '',
53
+ 'icon-panel-plant_main_switch': '',
54
+ 'icon-panel-zhinenghuazhi-guanbi': '',
55
+ 'icon-panel-next': '',
56
+ 'icon-panel-back': '',
57
+ 'icon-panel-pixel-emoji': '',
58
+ 'icon-panel-erase': '',
59
+ 'icon-panel-pencil': '',
60
+ 'icon-panel-time': '',
61
+ 'icon-panel-fence-empty': '',
62
+ 'icon-panel-walk-pet-empty': '',
63
+ 'icon-panel-vibration': '',
64
+ 'icon-panel-shebeiluxiang': '',
65
+ 'icon-panel-add': '',
66
+ 'icon-panel-a-rongqi1972': '',
67
+ 'icon-panel-nightvision-mode-black-color': '',
68
+ 'icon-panel-nightvision-mode-true-color': '',
69
+ 'icon-panel-nightvision-mode-color': '',
70
+ 'icon-panel-wi-Fi': '',
71
+ 'icon-panel-motion-tracking': '',
72
+ 'icon-panel-optical-zoom': '',
73
+ 'icon-panel-pip-mode': '',
74
+ 'icon-panel-basic-shimmer': '',
75
+ 'icon-panel-basic-nightvision-close': '',
76
+ 'icon-panel-basic-nightvision-open': '',
77
+ 'icon-panel-nightvision-mode-ir': '',
78
+ 'icon-panel-nightvision-mode-auto': '',
79
+ 'icon-panel-suo': '',
80
+ 'icon-panel-jingdi': '',
81
+ 'icon-panel-deng': '',
82
+ 'icon-panel-xiazai': '',
83
+ 'icon-panel-fenxiang': '',
84
+ 'icon-panel-a-zu1032': '',
85
+ 'icon-panel-jilu': '',
86
+ 'icon-panel-zujifenxiang': '',
87
+ 'icon-panel-zuji': '',
88
+ 'icon-panel-chongwudangan': '',
89
+ 'icon-panel-liuchong': '',
90
+ 'icon-panel-weilan': '',
91
+ 'icon-panel-WER': '',
92
+ 'icon-panel-infrared-night-vision': '',
93
+ 'icon-panel-night-vision': '',
94
+ 'icon-panel-Access-Mobile1': '',
95
+ 'icon-panel-Access-QuickReply': '',
96
+ 'icon-panel-Access-Key-FaceID2': '',
97
+ 'icon-panel-Access-NoBlock': '',
98
+ 'icon-panel-Access-Password-View': '',
99
+ 'icon-panel-Access-Door': '',
100
+ 'icon-panel-Access-Camera': '',
101
+ 'icon-panel-Access-Member': '',
102
+ 'icon-panel-Access-Password-Hide': '',
103
+ 'icon-panel-a-Access-AIGuardian': '',
104
+ 'icon-panel-Access-Key-Fingerprint': '',
105
+ 'icon-panel-Access-Send': '',
106
+ 'icon-panel-Access-Password-Clear': '',
107
+ 'icon-panel-Access-Notification-large': '',
108
+ 'icon-panel-Access-Intercom-large': '',
109
+ 'icon-panel-Access-Brightness': '',
110
+ 'icon-panel-Access-TempAccess-large': '',
111
+ 'icon-panel-Access-Undo': '',
112
+ 'icon-panel-Access-Key-Card': '',
113
+ 'icon-panel-Access-Replay': '',
114
+ 'icon-panel-Access-Copy': '',
115
+ 'icon-panel-tip-right-arrow': '',
116
+ 'icon-panel-tip-circle': '',
117
+ 'icon-panel-night-light': '',
118
+ 'icon-panel-feed-reminder': '',
119
+ 'icon-panel-baby-core': '',
120
+ 'icon-panel-Access-door-close-small': '󦙱',
121
+ 'icon-panel-door-close-large': '󦙲',
122
+ 'icon-panel-door-open-small': '󦙳',
123
+ 'icon-panel-door-open-large': '󦙴',
124
+ 'icon-panel-common-error': '',
125
+ 'icon-panel-traffic-top-up': '',
126
+ 'icon-panel-elevator-up': '󦙦',
127
+ 'icon-panel-elevator-down': '󦙧',
128
+ 'icon-panel-access-elevator': '󦙨',
129
+ 'icon-panel-elevator-updown': '󦙩',
130
+ 'icon-panel-traffic-unauthorized': '',
131
+ 'icon-panel-traffic-low-data': '',
132
+ 'icon-panel-traffic-not-obtain': '',
133
+ 'icon-panel-swimming-anomaly': '',
134
+ 'icon-panel-feed-fish': '',
135
+ 'icon-panel-water-temp': '',
136
+ 'icon-panel-fun-fish-TV': '',
137
+ 'icon-panel-fish-care-expert': '',
138
+ 'icon-panel-water-quality': '',
139
+ 'icon-panel-swimming-issue': '',
140
+ 'icon-panel-fish-anomaly': '',
141
+ 'icon-panel-a-AI-fish-healthcheck': '',
142
+ 'icon-panel-favorites1': '',
143
+ 'icon-panel-belly-up1': '',
144
+ 'icon-panel-favorite1': '',
145
+ 'icon-panel-replay1': '',
146
+ 'icon-panel-gun-ball': '',
147
+ 'icon-panel-thumbnail': '',
148
+ 'icon-panel-landscape-thumbnail': '',
149
+ 'icon-panel-expand': '',
150
+ 'icon-panel-tile': '',
151
+ 'icon-panel-landscape-grid': '',
152
+ 'icon-panel-pin': '',
153
+ 'icon-panel-arrow-expand': '',
154
+ 'icon-panel-window-close': '',
155
+ 'icon-panel-landscape-tile': '',
156
+ 'icon-panel-pip': '',
157
+ 'icon-panel-landscape-new': '',
158
+ 'icon-panel-collapse': '',
159
+ 'icon-panel-duoxuan': '',
160
+ 'icon-panel-shanchu': '',
161
+ 'icon-panel-shaixuan': '',
162
+ 'icon-panel-close-voice': '',
163
+ 'icon-panel-cruise-plan': '',
164
+ 'icon-panel-stop-record': '',
165
+ 'icon-panel-find-pet': '',
166
+ 'icon-panel-pet-voice-custom': '',
167
+ 'icon-panel-voice-list': '',
168
+ 'icon-panel-again': '',
169
+ 'icon-panel-select': '',
170
+ 'icon-panel-enable-voice': '',
171
+ 'icon-panel-not-disturb': '',
172
+ 'icon-panel-pet-voice': '',
173
+ 'icon-panel-verify-access': '',
174
+ 'icon-panel-access-list': '',
175
+ 'icon-panel-access-control': '',
176
+ 'icon-panel-access-schedule': '',
177
+ 'icon-panel-always-open': '',
178
+ 'icon-panel-bidirectional-access': '',
179
+ 'icon-panel-open-door': '',
180
+ 'icon-panel-locked': '',
181
+ 'icon-panel-exit-only': '',
182
+ 'icon-panel-close-door': '',
183
+ 'icon-panel-entry-only': '',
184
+ 'icon-panel-feature-siren': '',
185
+ 'icon-panel-shared-permission': '',
186
+ 'icon-panel-ptz_collect_add': '',
187
+ 'icon-panel-ptz-collect': '',
188
+ 'icon-panel-success': '',
189
+ 'icon-panel-failure': '',
190
+ 'icon-panel-pause': '',
191
+ 'icon-panel-recharge-1': '',
192
+ 'icon-panel-playing': '',
193
+ 'icon-panel-charging': '',
194
+ 'icon-panel-record': '',
195
+ 'icon-panel-switch': '',
196
+ 'icon-panel-tab-remote-control': '',
197
+ 'icon-panel-tab-path': '',
198
+ 'icon-panel-feature-playback': '',
199
+ 'icon-panel-feature-message': '',
200
+ 'icon-panel-laser-pointer': '',
201
+ 'icon-panel-close': '',
202
+ 'icon-panel-move-control-interactive': '',
203
+ 'icon-panel-move-control-waltz': '',
204
+ 'icon-panel-move-control-8': '',
205
+ 'icon-panel-move-control-p-steering': '',
206
+ 'icon-panel-move-control-straight-line': '',
207
+ 'icon-panel-move-control-rotate-place': '',
208
+ 'icon-panel-move-control-chacha': '',
209
+ 'icon-panel-tange1': '',
210
+ 'icon-panel-move-control-big-rotation': '',
211
+ 'icon-panel-move-control-wave': '',
212
+ 'icon-panel-move-control-z': '',
213
+ 'icon-panel-move-control-rotation': '',
214
+ 'icon-panel-yuyin': '',
215
+ 'icon-panel-cloud-storage': '',
216
+ 'icon-panel-talking': '',
217
+ 'icon-panel-record-play': '',
218
+ 'icon-panel-auto-follow': '',
219
+ 'icon-panel-auto-recharge': '',
220
+ 'icon-panel-add-collect': '',
221
+ 'icon-panel-edit': '',
222
+ 'icon-panel-record-stop': '',
223
+ 'icon-panel-ptz-arrow': '',
224
+ 'icon-panel-zoom-out': '',
225
+ 'icon-panel-zoom-in': '',
226
+ 'icon-panel-cross-add': '',
227
+ 'icon-panel-siren': '',
228
+ 'icon-panel-lullaby': '',
229
+ 'icon-panel-cruise': '',
230
+ 'icon-panel-wdr': '',
231
+ 'icon-panel-lock': '',
232
+ 'icon-panel-floodlight': '',
233
+ 'icon-panel-private': '',
234
+ 'icon-panel-list-checked': '',
235
+ 'icon-panel-right-arrow': '',
236
+ 'icon-panel-voice-change': '',
237
+ 'icon-panel-more': '',
238
+ 'icon-panel-collect-point': '',
239
+ 'icon-panel-album': '',
240
+ 'icon-panel-mute-off': '',
241
+ 'icon-panel-left-arrow': '',
242
+ 'icon-panel-delete': '',
243
+ 'icon-panel-ptz': '',
244
+ 'icon-panel-playback': '',
245
+ 'icon-panel-message': '',
246
+ 'icon-panel-feature-settings': '',
247
+ 'icon-panel-humidity': '',
248
+ 'icon-panel-temperature': '',
249
+ 'icon-panel-screenshot': '',
250
+ 'icon-panel-mute-on': '',
251
+ 'icon-panel-landscape': ''
252
+ };
253
+ export const glyphForClassName = function () {
254
+ let className = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
255
+ return className.split(/\s+/).map(name => glyphs[name]).find(Boolean) || '';
256
+ };
@@ -0,0 +1,48 @@
1
+ .root {
2
+ width: 100%;
3
+ min-width: 0;
4
+ display: flex;
5
+ flex-direction: column;
6
+ // More specific than legacy .ipc-player-content .*-hide/show, even if loaded first.
7
+ // Never collapse or translate the native bar: fade in-place within the video bounds.
8
+ &:global(.ipc-player-content) {
9
+ :global(.ipc-player-top-content),
10
+ :global(.ipc-player-bottom-content) {
11
+ transform: none;
12
+ transition: opacity 0.3s ease;
13
+ }
14
+ :global(.ipc-player-top-content-hide),
15
+ :global(.ipc-player-bottom-content-hide) {
16
+ opacity: 0;
17
+ pointer-events: none;
18
+ }
19
+ :global(.ipc-player-top-content-show),
20
+ :global(.ipc-player-bottom-content-show) {
21
+ opacity: 1;
22
+ }
23
+ }
24
+ :global(.ipc-player-top-content) {
25
+ background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 100%);
26
+ }
27
+ :global(.ipc-player-bottom-content) {
28
+ background-image: linear-gradient(360deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 100%);
29
+ }
30
+ :global(.ipc-player-bottom-left-content-container),
31
+ :global(.ipc-player-bottom-right-content-container),
32
+ :global(.ipc-player-top-left-content-container),
33
+ :global(.ipc-player-top-right-content-container) {
34
+ display: flex;
35
+ flex-direction: row;
36
+ align-items: center;
37
+ flex-shrink: 0;
38
+ }
39
+ }
40
+
41
+ // Preserve the preview's 16:9 native frame; center it using a resolved flex viewport.
42
+ // Changing this class does not remount the player or restart its media lifecycle.
43
+ .verticalViewport :global(.ray-ipc-player-lynx) {
44
+ width: 100%;
45
+ height: 56.25vw;
46
+ max-height: 100%;
47
+ flex-shrink: 0;
48
+ }
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ (props: import("@ray-js/ipc-ptz-zoom").IProps): import("react").JSX.Element;
4
+ displayName: string;
5
+ };
6
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import WebViewPtzZoom from '@ray-js/ipc-ptz-zoom';
2
+ import { withPlayerRenderer } from './capabilities';
3
+ export default withPlayerRenderer('ptzZoom', WebViewPtzZoom);
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { Text } from '@ray-js/ray';
3
+ import './font.less';
4
+ export declare const PlayerText: (props: React.ComponentProps<typeof Text>) => React.JSX.Element;
@@ -0,0 +1,32 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import React, { useContext } from 'react';
4
+ import { Text } from '@ray-js/ray';
5
+ import { PlayerControlVisibilityContext, usePlayerRenderMode } from './context';
6
+ import { glyphForClassName } from './glyphs';
7
+ import './font.less';
8
+ import styles from './text.module.less';
9
+
10
+ // Preserve ordinary Text and the legacy empty icon node in WebView mode.
11
+ export const PlayerText = props => {
12
+ var _props$style$opacity, _props$style, _props$style2;
13
+ const mode = usePlayerRenderMode();
14
+ const controlsVisible = useContext(PlayerControlVisibilityContext);
15
+ // Fade the actual native text too; ancestor opacity alone is not a text-paint contract.
16
+ // Keep glyphs and geometry stable across hide/show. Outside the bars preserve caller styles.
17
+ const barStyle = mode === 'lynx' && controlsVisible !== undefined ? _objectSpread(_objectSpread({}, props.style), {}, {
18
+ opacity: controlsVisible ? (_props$style$opacity = (_props$style = props.style) === null || _props$style === void 0 ? void 0 : _props$style.opacity) !== null && _props$style$opacity !== void 0 ? _props$style$opacity : 1 : 0,
19
+ transition: 'opacity 0.3s ease',
20
+ pointerEvents: controlsVisible ? (_props$style2 = props.style) === null || _props$style2 === void 0 ? void 0 : _props$style2.pointerEvents : 'none'
21
+ }) : props.style;
22
+ const glyph = mode === 'lynx' && props.children == null ? glyphForClassName(props.className) : '';
23
+ if (!glyph) return /*#__PURE__*/React.createElement(Text, _extends({}, props, {
24
+ style: barStyle
25
+ }));
26
+ return /*#__PURE__*/React.createElement(Text, _extends({}, props, {
27
+ className: `${props.className || ''} ${styles.glyph}`,
28
+ style: _objectSpread(_objectSpread({}, barStyle), {}, {
29
+ fontFamily: 'ipc-player-lynx'
30
+ })
31
+ }), glyph);
32
+ };
@@ -0,0 +1,4 @@
1
+ .glyph:global(.icon-panel) {
2
+ // Legacy icon-panel is !important; inline fontFamily alone cannot guarantee isolation.
3
+ font-family: 'ipc-player-lynx' !important;
4
+ }
@@ -0,0 +1,7 @@
1
+ import type { CSSProperties } from 'react';
2
+ import type { PlayerRenderMode } from './context';
3
+ export declare const getPlayerViewport: (mode: PlayerRenderMode, verticalFull: boolean, height: CSSProperties['height']) => {
4
+ style: CSSProperties;
5
+ objectFit: 'contain' | 'fillCrop';
6
+ backgroundColor: string;
7
+ };
@@ -0,0 +1,24 @@
1
+ export const getPlayerViewport = (mode, verticalFull, height) => {
2
+ if (mode === 'lynx' && verticalFull) {
3
+ // The outer player already has a resolved height. Do not nest its calc expression.
4
+ return {
5
+ style: {
6
+ height: 'calc(100% - 48px)',
7
+ flexShrink: 0,
8
+ backgroundColor: '#000',
9
+ display: 'flex',
10
+ flexDirection: 'column',
11
+ justifyContent: 'center'
12
+ },
13
+ objectFit: 'fillCrop',
14
+ backgroundColor: '#000'
15
+ };
16
+ }
17
+ return {
18
+ style: {
19
+ height: verticalFull ? `calc(${height} - 48px)` : height
20
+ },
21
+ objectFit: 'fillCrop',
22
+ backgroundColor: '#262626'
23
+ };
24
+ };
@@ -0,0 +1 @@
1
+ export declare const signalPngMap: Record<string, string>;
@@ -0,0 +1,22 @@
1
+ import signalFour0 from './signalFour0.png';
2
+ import signalFour1 from './signalFour1.png';
3
+ import signalFour2 from './signalFour2.png';
4
+ import signalFour3 from './signalFour3.png';
5
+ import signalFour4 from './signalFour4.png';
6
+ import signalThree0 from './signalThree0.png';
7
+ import signalThree1 from './signalThree1.png';
8
+ import signalThree2 from './signalThree2.png';
9
+ import signalThree3 from './signalThree3.png';
10
+
11
+ // Rasterized from the corresponding WebView SVG; keep every signal level unchanged.
12
+ export const signalPngMap = {
13
+ signalFour0,
14
+ signalFour1,
15
+ signalFour2,
16
+ signalFour3,
17
+ signalFour4,
18
+ signalThree0,
19
+ signalThree1,
20
+ signalThree2,
21
+ signalThree3
22
+ };
@@ -8,6 +8,7 @@ import "core-js/modules/esnext.iterator.reduce.js";
8
8
  import React, { useEffect, useMemo, useRef, useState } from 'react';
9
9
  import { CoverView, ScrollView, View } from '@ray-js/ray';
10
10
  import clsx from 'clsx';
11
+ import { usePlayerRenderMode } from '../renderer/context';
11
12
  import { useStore } from '../ctx/store';
12
13
  import { useComponentHideState } from './hooks';
13
14
  import { TrialBadge, useTrialBadge } from '../widgets/trialBadge';
@@ -79,6 +80,7 @@ const BottomLeftContent = _ref => {
79
80
  const tryExp = bottomLeftContent === null || bottomLeftContent === void 0 ? void 0 : bottomLeftContent.find(item => item.id === 'TryExperience');
80
81
  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;
81
82
  }, [bottomLeftContent]);
83
+ const renderMode = usePlayerRenderMode();
82
84
  const [shouldHide] = useComponentHideState();
83
85
  const {
84
86
  showTrialBadge,
@@ -86,7 +88,7 @@ const BottomLeftContent = _ref => {
86
88
  handleCountdownEnd
87
89
  } = useTrialBadge(ctx.event, ctx.devId, trialRemainingSec);
88
90
 
89
- // 横向滚动状态:内容溢出且未滑到对应边缘时,显示左 / 右箭头提示
91
+ // 横向滚动状态:右侧仍有内容时显示右箭头提示
90
92
  const idRef = useRef(++scrollClsSeq);
91
93
  // wrap 是左下角的可用区(left:0 ~ right:reservedRight),宽度不随 ScrollView 收窄而变,
92
94
  // 因此用它、而不是 ScrollView 自身,作为“能摆多宽”的基准,避免收窄与分档互相依赖
@@ -107,6 +109,8 @@ const BottomLeftContent = _ref => {
107
109
  // 点击箭头时的受控滚动目标;仅在程序化滚动期间为数值,结束后置回 undefined,
108
110
  // 避免持续受控导致用户手动拖动被回弹
109
111
  const [scrollTo, setScrollTo] = useState(undefined);
112
+ const [lynxAtEnd, setLynxAtEnd] = useState(false);
113
+ const endPageTouchRef = useRef(null);
110
114
  // 横竖屏切换后,强制 ScrollView 重新挂载并把滚动状态重置为初始值
111
115
  const [scrollResetKey, setScrollResetKey] = useState(0);
112
116
  // 用户在某种屏幕模式下拖动过一次之后,该模式不再展示箭头(竖屏 / 横屏各自独立记录)
@@ -129,10 +133,12 @@ const BottomLeftContent = _ref => {
129
133
  const scrollEndTimerRef = useRef();
130
134
  // 测量时需要叠加当前滚动量,用 ref 避免闭包拿到过期值
131
135
  const scrollLeftRef = useRef(0);
136
+ const pageOffsetRef = useRef(0);
132
137
  useEffect(() => {
133
138
  setScrollResetKey(k => k + 1);
134
139
  setScrollLeft(0);
135
140
  setScrollTo(undefined);
141
+ setLynxAtEnd(false);
136
142
  scrollLeftRef.current = 0;
137
143
  // 清零上一屏的测量值,避免用旧 clientWidth/contentWidth 在重新测量前误判溢出导致箭头闪现
138
144
  setClientWidth(0);
@@ -293,7 +299,7 @@ const BottomLeftContent = _ref => {
293
299
  // 这样即使内容容器被撑满到可视内盒宽,也能拿到真实内容宽;哨兵不可用时回退到容器宽。
294
300
  let tw = 0;
295
301
  if (scrollRect && endRect && typeof endRect.left === 'number') {
296
- tw = endRect.left - scrollRect.left - paddingLeftPx + scrollLeftRef.current;
302
+ tw = endRect.left - scrollRect.left - paddingLeftPx + scrollLeftRef.current + pageOffsetRef.current;
297
303
  }
298
304
  if (!(tw > 0)) {
299
305
  tw = (contentRect === null || contentRect === void 0 ? void 0 : contentRect.width) || 0;
@@ -302,11 +308,11 @@ const BottomLeftContent = _ref => {
302
308
  setContentWidth(tw);
303
309
  }
304
310
  attempts += 1;
305
- // 最多轮询 15 次(约 6s)兜底,避免无限轮询
306
- if (attempts >= 15) {
311
+ // Lynx 首轮加密测量以尽快收敛,WebView 保持原有 400ms/15 次节奏。
312
+ if (attempts >= (renderMode === 'lynx' ? 20 : 15)) {
307
313
  return;
308
314
  }
309
- timer = setTimeout(measure, 400);
315
+ timer = setTimeout(measure, renderMode === 'lynx' && attempts < 8 ? 150 : 400);
310
316
  });
311
317
  };
312
318
 
@@ -322,7 +328,7 @@ const BottomLeftContent = _ref => {
322
328
  // playState:视频就绪后 overlay 可能重新布局,需重新测量
323
329
  playState, bottomLeftContent === null || bottomLeftContent === void 0 ? void 0 : bottomLeftContent.length, shouldHide, showBadge, wrapCls, scrollCls, contentCls, scrollResetKey, resizeSignal,
324
330
  // 收紧后各项 padding 变小,必须重测一遍逐项宽,否则分档还在用收紧前的旧值
325
- tightened]);
331
+ tightened, renderMode]);
326
332
 
327
333
  // 子元素主动上报宽度变化 → 重跑测量,及时更新横滑箭头与右边缘淡出
328
334
  useEffect(() => {
@@ -353,7 +359,11 @@ const BottomLeftContent = _ref => {
353
359
  // 竖屏由“个数”决定是否溢出(平铺档恒不溢出);横屏保持原来的像素比对
354
360
  const isOverflow = isVertical ? !isFlat : totalContentWidth > clientWidth + 1;
355
361
  const scrollViewWidth = verticalScrollWidth > 0 ? verticalScrollWidth : clientWidth;
356
- const atEnd = !isOverflow || scrollLeft + scrollViewWidth >= totalContentWidth - 2;
362
+ const atEnd = lynxAtEnd || !isOverflow || scrollLeft + scrollViewWidth >= totalContentWidth - 2;
363
+ // Lynx 不响应 ScrollView 的受控 scrollLeft / scrollIntoView,点击时平移现有内容。
364
+ // 保留原节点;末页通过右滑返回,不增加 WebView 没有的反向箭头。
365
+ const pageOffset = renderMode === 'lynx' && lynxAtEnd ? Math.max(0, totalContentWidth - scrollViewWidth - scrollLeft) : 0;
366
+ pageOffsetRef.current = pageOffset;
357
367
  const isDismissed = dismissed[screenType];
358
368
  const isButtonHint = scrollHintMode === 'button';
359
369
  // button 模式:溢出且未到末端即常显(不受 dismissed 影响);pulse 模式:保留拖动后消失的旧逻辑。
@@ -362,9 +372,19 @@ const BottomLeftContent = _ref => {
362
372
  // 右侧还有未滚到头的内容时,启用右边缘淡出,把没完全露出的元素渐隐隐藏(横竖屏都生效)
363
373
  const fadeRightEdge = isOverflow && !atEnd;
364
374
 
365
- // 点击右箭头:直接滚动到最右端。
366
- // 给一个足够大的目标值,交由 ScrollView 自身夹取到真实最右端,避免测量误差导致滚不到底。
375
+ // Lynx 用子节点 id 定位末端:其受控 scrollLeft 属性不会可靠地驱动原生横滑。
376
+ // WebView 仍以有限的实际最大偏移滚动。
367
377
 
378
+ const readTouch = event => {
379
+ var _event$touches, _event$changedTouches, _event$origin, _event$origin2, _touch$clientX, _touch$clientY;
380
+ 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]);
381
+ 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;
382
+ 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;
383
+ return typeof x === 'number' && typeof y === 'number' ? {
384
+ x,
385
+ y
386
+ } : null;
387
+ };
368
388
  const coverHeight = screenType === 'vertical' ? shouldHide ? 49 : 48 : shouldHide ? 59 : 58;
369
389
  const containerHeight = screenType === 'vertical' ? 48 : 58;
370
390
 
@@ -390,15 +410,18 @@ const BottomLeftContent = _ref => {
390
410
  })();
391
411
  return /*#__PURE__*/React.createElement(CoverView, {
392
412
  className: clsx('ipc-player-bottom-left-content-wrap', wrapCls),
393
- style: {
413
+ style: _objectSpread(_objectSpread({
394
414
  right: rightCss,
395
415
  height: showBadge ? `${coverHeight + 30}px` : `${coverHeight}px`,
396
416
  display: 'flex',
397
417
  flexDirection: 'column',
398
418
  justifyContent: 'flex-start',
399
- opacity: shouldHide ? 0 : 1,
419
+ opacity: shouldHide ? 0 : 1
420
+ }, renderMode === 'lynx' ? {
421
+ transition: 'opacity 0.3s ease'
422
+ } : {}), {}, {
400
423
  pointerEvents: shouldHide ? 'none' : 'auto'
401
- }
424
+ })
402
425
  }, showBadge && /*#__PURE__*/React.createElement(View, {
403
426
  style: {
404
427
  height: '32px',
@@ -411,7 +434,7 @@ const BottomLeftContent = _ref => {
411
434
  onCountdownEnd: handleCountdownEnd
412
435
  })), /*#__PURE__*/React.createElement(ScrollView, {
413
436
  key: scrollResetKey,
414
- scrollX: true,
437
+ scrollX: renderMode !== 'lynx' || !lynxAtEnd,
415
438
  scrollLeft: scrollTo,
416
439
  scrollWithAnimation: true,
417
440
  onScroll: e => {
@@ -462,16 +485,32 @@ const BottomLeftContent = _ref => {
462
485
  whiteSpace: 'nowrap'
463
486
  }
464
487
  }, /*#__PURE__*/React.createElement(View, {
488
+ onTouchStart: renderMode === 'lynx' ? event => {
489
+ endPageTouchRef.current = renderMode === 'lynx' && lynxAtEnd ? readTouch(event) : null;
490
+ } : undefined,
491
+ onTouchEnd: renderMode === 'lynx' ? event => {
492
+ const start = endPageTouchRef.current;
493
+ const end = readTouch(event);
494
+ endPageTouchRef.current = null;
495
+ if (!start || !end || renderMode !== 'lynx' || !lynxAtEnd) return;
496
+ const dx = end.x - start.x;
497
+ if (dx > 24 && dx > Math.abs(end.y - start.y)) setLynxAtEnd(false);
498
+ } : undefined,
499
+ onTouchCancel: () => {
500
+ endPageTouchRef.current = null;
501
+ },
465
502
  className: clsx('ipc-player-bottom-left-content-container', contentCls, {
466
503
  'ipc-player-bottom-left-content-container-tight': tightened
467
504
  }),
468
- style: {
469
- display: 'inline-flex',
505
+ style: _objectSpread({
506
+ display: renderMode === 'lynx' ? 'flex' : 'inline-flex',
470
507
  flexDirection: 'row',
471
508
  height: `${visibleRowHeight}px`,
472
509
  alignItems: 'center',
473
510
  paddingLeft: `${contentPaddingLeftPx}px`
474
- }
511
+ }, pageOffset > 0 ? {
512
+ transform: `translateX(-${pageOffset}px)`
513
+ } : {})
475
514
  }, children, /*#__PURE__*/React.createElement(View, {
476
515
  className: endCls,
477
516
  style: {
@@ -498,7 +537,11 @@ const BottomLeftContent = _ref => {
498
537
  if (!isOverflow) {
499
538
  return;
500
539
  }
501
- setScrollTo(totalContentWidth + clientWidth + 9999);
540
+ if (renderMode === 'lynx') {
541
+ setLynxAtEnd(true);
542
+ return;
543
+ }
544
+ setScrollTo(Math.max(0, Math.ceil(totalContentWidth - scrollViewWidth)));
502
545
  } : undefined
503
546
  }, /*#__PURE__*/React.createElement(View, {
504
547
  className: clsx('ipc-player-bottom-left-scroll-hint-arrow', {