@ray-js/ipc-player-integration 0.0.59-beta.0 → 0.0.61-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 (126) hide show
  1. package/README.md +0 -6
  2. package/lib/ctx/ctx.album.test.d.ts +1 -0
  3. package/lib/ctx/ctx.album.test.js +197 -0
  4. package/lib/ctx/ctx.composition.js +19 -4
  5. package/lib/ctx/ctx.js +103 -55
  6. package/lib/ctx/ports.output.d.ts +1 -0
  7. package/lib/ctx/resolution.d.ts +1 -1
  8. package/lib/ctx/resolution.js +3 -1
  9. package/lib/i18n/index.d.ts +12 -0
  10. package/lib/i18n/strings.d.ts +6 -0
  11. package/lib/i18n/strings.js +6 -0
  12. package/lib/index.d.ts +0 -4
  13. package/lib/index.js +1 -3
  14. package/lib/interface.d.ts +19 -3
  15. package/lib/ui/absoluteContent.d.ts +2 -0
  16. package/lib/ui/absoluteContent.js +3 -0
  17. package/lib/ui/bottomLeftContent.js +55 -119
  18. package/lib/ui/bottomRightContent.js +3 -6
  19. package/lib/ui/ui.d.ts +2 -5
  20. package/lib/ui/ui.js +49 -63
  21. package/lib/utils/captureResult.d.ts +14 -0
  22. package/lib/utils/captureResult.js +70 -0
  23. package/lib/utils/captureResult.test.d.ts +1 -0
  24. package/lib/utils/captureResult.test.js +117 -0
  25. package/lib/utils/fullLinkTracking.d.ts +5 -0
  26. package/lib/utils/fullLinkTracking.js +71 -0
  27. package/lib/utils/navigation.d.ts +2 -1
  28. package/lib/utils/navigation.js +13 -3
  29. package/lib/utils/ttt.js +2 -8
  30. package/lib/widgets/battery/battery.js +1 -2
  31. package/lib/widgets/battery/batteryFull.js +1 -2
  32. package/lib/widgets/captureResult/captureResult.d.ts +16 -0
  33. package/lib/widgets/captureResult/captureResult.js +85 -0
  34. package/lib/widgets/captureResult/captureResult.less +144 -0
  35. package/lib/widgets/captureResult/captureResult.test.d.ts +1 -0
  36. package/lib/widgets/captureResult/captureResult.test.js +80 -0
  37. package/lib/widgets/captureResult/index.d.ts +2 -0
  38. package/lib/widgets/captureResult/index.js +2 -0
  39. package/lib/widgets/floodlight/floodlight.js +1 -2
  40. package/lib/widgets/flowLowTip/flowLowTip.js +1 -2
  41. package/lib/widgets/fullScreen/fullScreen.js +1 -2
  42. package/lib/widgets/fullScreen/fullTravelRouteControl.d.ts +1 -1
  43. package/lib/widgets/fullScreen/fullTravelRouteControl.js +1 -1
  44. package/lib/widgets/fullScreen/verticalScreen.js +1 -2
  45. package/lib/widgets/index.d.ts +1 -0
  46. package/lib/widgets/index.js +2 -1
  47. package/lib/widgets/moveInteractiveControl/controlButton.js +1 -2
  48. package/lib/widgets/moveInteractiveControl/moveInteractiveControlUI.js +3 -12
  49. package/lib/widgets/moveInteractiveControl/moveInteractiveControlUI.less +4 -24
  50. package/lib/widgets/multiCamera/landscapeTip.js +1 -2
  51. package/lib/widgets/multiCamera/moveablePtzControl.js +1 -1
  52. package/lib/widgets/multiCamera/multiPtz.js +1 -2
  53. package/lib/widgets/multiCamera/ptzMoveableTip.js +1 -2
  54. package/lib/widgets/multiCamera/switchLayout.js +1 -2
  55. package/lib/widgets/multiCamera/tileMultiPtz.js +1 -2
  56. package/lib/widgets/multiCamera/tileSwitchLayout.js +1 -2
  57. package/lib/widgets/multiCamera/tileTip.js +1 -2
  58. package/lib/widgets/muted/muted.js +10 -5
  59. package/lib/widgets/muted/muted.less +5 -1
  60. package/lib/widgets/muted/muted.test.d.ts +1 -0
  61. package/lib/widgets/muted/muted.test.js +81 -0
  62. package/lib/widgets/ptz/ptz.js +1 -2
  63. package/lib/widgets/ptz/ptzControl.js +1 -1
  64. package/lib/widgets/ptzControlTip/ptzControlTip.js +3 -6
  65. package/lib/widgets/ptzControlTip/ptzControlTip.less +0 -6
  66. package/lib/widgets/realTimeMagnification/realTimeMagnification.js +1 -2
  67. package/lib/widgets/recordVideo/recordVideo.js +53 -53
  68. package/lib/widgets/recordVideo/recordVideo.less +17 -74
  69. package/lib/widgets/recordVideo/recordVideo.lifecycle.test.d.ts +1 -0
  70. package/lib/widgets/recordVideo/recordVideo.lifecycle.test.js +106 -0
  71. package/lib/widgets/recordVideo/recordVideo.test.js +1 -0
  72. package/lib/widgets/resolution/fullResolutionControl.js +19 -29
  73. package/lib/widgets/resolution/resolution.js +2 -3
  74. package/lib/widgets/screenshot/screenshot.js +66 -45
  75. package/lib/widgets/screenshot/screenshot.less +1 -40
  76. package/lib/widgets/screenshot/screenshot.test.d.ts +1 -0
  77. package/lib/widgets/screenshot/screenshot.test.js +120 -0
  78. package/lib/widgets/signal4G/signal4G.js +1 -4
  79. package/lib/widgets/siren/siren.js +1 -2
  80. package/lib/widgets/tempHumidity/tempHumidity.js +1 -2
  81. package/lib/widgets/toggleVerticalFull/toggleVerticalFull.js +1 -2
  82. package/lib/widgets/trialBadge/index.d.ts +2 -1
  83. package/lib/widgets/trialBadge/index.js +20 -17
  84. package/lib/widgets/trialBadge/index.less +0 -24
  85. package/lib/widgets/trialBadge/useTrialBadge.d.ts +3 -2
  86. package/lib/widgets/trialBadge/useTrialBadge.js +13 -2
  87. package/lib/widgets/tryExperience/tryExperience.js +1 -3
  88. package/lib/widgets/videoBitKBP/videoBitKBP.js +1 -2
  89. package/lib/widgets/voiceIntercom/voiceIntercom.js +24 -50
  90. package/lib/widgets/voiceIntercom/voiceIntercom.less +0 -16
  91. package/lib/widgets/zoomTurntable/turntable/index.d.ts +7 -5
  92. package/lib/widgets/zoomTurntable/turntable/index.js +1 -2
  93. package/lib/widgets/zoomTurntable/zoomTurntableEntry.js +1 -2
  94. package/lib/widgets/zoomTurntable/zoomTurntableTip.js +1 -2
  95. package/package.json +8 -15
  96. package/lib/renderer/capabilities.d.ts +0 -8
  97. package/lib/renderer/capabilities.js +0 -19
  98. package/lib/renderer/context.d.ts +0 -5
  99. package/lib/renderer/context.js +0 -6
  100. package/lib/renderer/directionControl.d.ts +0 -6
  101. package/lib/renderer/directionControl.js +0 -3
  102. package/lib/renderer/font.less +0 -5
  103. package/lib/renderer/glyphs.d.ts +0 -1
  104. package/lib/renderer/glyphs.js +0 -256
  105. package/lib/renderer/index.module.less +0 -48
  106. package/lib/renderer/ptzZoom.d.ts +0 -6
  107. package/lib/renderer/ptzZoom.js +0 -3
  108. package/lib/renderer/text.d.ts +0 -4
  109. package/lib/renderer/text.js +0 -32
  110. package/lib/renderer/text.module.less +0 -4
  111. package/lib/renderer/viewport.d.ts +0 -7
  112. package/lib/renderer/viewport.js +0 -24
  113. package/lib/res/lynx-signal/index.d.ts +0 -1
  114. package/lib/res/lynx-signal/index.js +0 -22
  115. package/lib/res/lynx-signal/signalFour0.png +0 -0
  116. package/lib/res/lynx-signal/signalFour1.png +0 -0
  117. package/lib/res/lynx-signal/signalFour2.png +0 -0
  118. package/lib/res/lynx-signal/signalFour3.png +0 -0
  119. package/lib/res/lynx-signal/signalFour4.png +0 -0
  120. package/lib/res/lynx-signal/signalThree0.png +0 -0
  121. package/lib/res/lynx-signal/signalThree1.png +0 -0
  122. package/lib/res/lynx-signal/signalThree2.png +0 -0
  123. package/lib/res/lynx-signal/signalThree3.png +0 -0
  124. package/lib/res/player-more-arrow.png +0 -0
  125. package/lib/ui/scrollHintArrow.d.ts +0 -23
  126. package/lib/ui/scrollHintArrow.js +0 -82
@@ -1,256 +0,0 @@
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
- };
@@ -1,48 +0,0 @@
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
- }
@@ -1,6 +0,0 @@
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;
@@ -1,3 +0,0 @@
1
- import WebViewPtzZoom from '@ray-js/ipc-ptz-zoom';
2
- import { withPlayerRenderer } from './capabilities';
3
- export default withPlayerRenderer('ptzZoom', WebViewPtzZoom);
@@ -1,4 +0,0 @@
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;
@@ -1,32 +0,0 @@
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
- };
@@ -1,4 +0,0 @@
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
- }
@@ -1,7 +0,0 @@
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
- };
@@ -1,24 +0,0 @@
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
- };
@@ -1 +0,0 @@
1
- export declare const signalPngMap: Record<string, string>;
@@ -1,22 +0,0 @@
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
- };
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,23 +0,0 @@
1
- import React from 'react';
2
- export declare function usesNativeHintImage(renderMode: string, platform: string): boolean;
3
- /** Android cannot paint the WebView fade mask: end its viewport at the hint's left edge.
4
- * Layout width and hint position still use the original measured WebView budget.
5
- */
6
- export declare function getHintViewport(renderMode: string, platform: string, scrollMode: boolean, lockedWidth: number, availableWidth: number, hintSize: number, hintEdgeGap: number, atEnd?: boolean): {
7
- layoutWidth: number;
8
- visibleWidth: number;
9
- width: string;
10
- };
11
- /** Consume a Lynx control tap before paging can remove its native hit target. */
12
- export declare function ScrollHintButton({ renderMode, platform, onPress, ...props }: {
13
- renderMode: string;
14
- platform?: string;
15
- onPress?: () => void;
16
- [key: string]: any;
17
- }): React.JSX.Element;
18
- /** Keep legacy/iOS geometry; Android Lynx paints a real image rather than CSS URL/borders. */
19
- export declare function ScrollHintArrow({ renderMode, platform, button, }: {
20
- renderMode: string;
21
- platform: string;
22
- button: boolean;
23
- }): React.JSX.Element;
@@ -1,82 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- const _excluded = ["renderMode", "platform", "onPress"];
4
- import React from 'react';
5
- import { CoverView, Image, View } from '@ray-js/ray';
6
- import clsx from 'clsx';
7
- import moreArrow from '../res/player-more-arrow.png';
8
- export function usesNativeHintImage(renderMode, platform) {
9
- return renderMode === 'lynx' && platform === 'android';
10
- }
11
-
12
- /** Android cannot paint the WebView fade mask: end its viewport at the hint's left edge.
13
- * Layout width and hint position still use the original measured WebView budget.
14
- */
15
- export function getHintViewport(renderMode, platform, scrollMode, lockedWidth, availableWidth, hintSize, hintEdgeGap) {
16
- let atEnd = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false;
17
- const layoutWidth = lockedWidth > 0 ? lockedWidth : availableWidth;
18
- const reservedHintWidth = usesNativeHintImage(renderMode, platform) && scrollMode && !atEnd ? hintSize + hintEdgeGap : 0;
19
- const visibleWidth = Math.max(0, layoutWidth - reservedHintWidth);
20
- return {
21
- layoutWidth,
22
- visibleWidth,
23
- width: lockedWidth > 0 ? `${visibleWidth}px` : reservedHintWidth ? `calc(100% - ${reservedHintWidth}px)` : '100%'
24
- };
25
- }
26
-
27
- /** Consume a Lynx control tap before paging can remove its native hit target. */
28
- export function ScrollHintButton(_ref) {
29
- let {
30
- renderMode,
31
- platform,
32
- onPress
33
- } = _ref,
34
- props = _objectWithoutProperties(_ref, _excluded);
35
- const nativeHitTarget = usesNativeHintImage(renderMode, platform || '');
36
- const HintHost = nativeHitTarget ? View : CoverView;
37
- return /*#__PURE__*/React.createElement(HintHost, _extends({}, props, nativeHitTarget ? {
38
- flatten: false,
39
- 'native-interaction-enabled': true
40
- } : {}, {
41
- onClick: onPress ? event => {
42
- var _event$origin, _event$origin$stopPro;
43
- if (renderMode === 'lynx') event === null || event === void 0 || (_event$origin = event.origin) === null || _event$origin === void 0 || (_event$origin$stopPro = _event$origin.stopPropagation) === null || _event$origin$stopPro === void 0 || _event$origin$stopPro.call(_event$origin);
44
- onPress();
45
- } : undefined
46
- }));
47
- }
48
-
49
- /** Keep legacy/iOS geometry; Android Lynx paints a real image rather than CSS URL/borders. */
50
- export function ScrollHintArrow(_ref2) {
51
- let {
52
- renderMode,
53
- platform,
54
- button
55
- } = _ref2;
56
- if (usesNativeHintImage(renderMode, platform)) {
57
- const size = button ? '14px' : '10px';
58
- return /*#__PURE__*/React.createElement(Image, {
59
- className: "ipc-player-bottom-left-scroll-hint-image",
60
- src: moreArrow,
61
- mode: "aspectFit",
62
- style: {
63
- width: size,
64
- height: size,
65
- flexShrink: 0,
66
- pointerEvents: 'none'
67
- }
68
- });
69
- }
70
- return /*#__PURE__*/React.createElement(View, {
71
- className: clsx('ipc-player-bottom-left-scroll-hint-arrow', {
72
- 'ipc-player-bottom-left-scroll-hint-arrow--right': true,
73
- 'ipc-player-bottom-left-scroll-hint-arrow--light': button,
74
- 'ipc-player-bottom-left-scroll-hint-arrow--static': button
75
- }),
76
- style: button ? {
77
- width: '9px',
78
- height: '9px',
79
- transform: 'translate(-1px, 0) rotate(45deg)'
80
- } : undefined
81
- });
82
- }