@ray-js/ipc-player-integration 0.0.66-beta.0 → 0.0.67-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 (141) 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 +13 -3
  5. package/lib/ctx/ctx.js +46 -35
  6. package/lib/ctx/multiCameraCtx.d.ts +2 -0
  7. package/lib/ctx/multiCameraCtx.js +17 -1
  8. package/lib/ctx/multiCameraCtx.test.d.ts +1 -0
  9. package/lib/ctx/multiCameraCtx.test.js +65 -0
  10. package/lib/i18n/index.d.ts +12 -0
  11. package/lib/i18n/strings.d.ts +6 -0
  12. package/lib/i18n/strings.js +6 -0
  13. package/lib/index.d.ts +0 -4
  14. package/lib/index.js +1 -3
  15. package/lib/interface.d.ts +17 -3
  16. package/lib/ui/absoluteContent.d.ts +2 -0
  17. package/lib/ui/absoluteContent.js +3 -0
  18. package/lib/ui/bottomLeftContent.js +55 -119
  19. package/lib/ui/bottomRightContent.js +3 -6
  20. package/lib/ui/ui.d.ts +0 -5
  21. package/lib/ui/ui.js +98 -89
  22. package/lib/utils/captureResult.d.ts +12 -0
  23. package/lib/utils/captureResult.js +70 -0
  24. package/lib/utils/captureResult.test.d.ts +1 -0
  25. package/lib/utils/captureResult.test.js +223 -0
  26. package/lib/utils/fullLinkTracking.d.ts +5 -0
  27. package/lib/utils/fullLinkTracking.js +71 -0
  28. package/lib/utils/navigation.d.ts +2 -1
  29. package/lib/utils/navigation.js +13 -3
  30. package/lib/widgets/battery/battery.js +5 -7
  31. package/lib/widgets/battery/batteryFull.js +5 -7
  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 +84 -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 +4 -18
  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/index.less +1 -0
  51. package/lib/widgets/multiCamera/landscapeTip.js +1 -2
  52. package/lib/widgets/multiCamera/moveablePtzControl.js +5 -5
  53. package/lib/widgets/multiCamera/multiPtz.js +2 -3
  54. package/lib/widgets/multiCamera/ptzMoveableTip.js +1 -2
  55. package/lib/widgets/multiCamera/switchLayout.js +1 -2
  56. package/lib/widgets/multiCamera/tileMultiPtz.js +2 -3
  57. package/lib/widgets/multiCamera/tileSwitchLayout.js +1 -2
  58. package/lib/widgets/multiCamera/tileTip.js +1 -2
  59. package/lib/widgets/muted/muted.js +1 -2
  60. package/lib/widgets/muted/muted.test.js +52 -66
  61. package/lib/widgets/ptz/ptz.js +1 -2
  62. package/lib/widgets/ptz/ptzControl.js +1 -1
  63. package/lib/widgets/ptzControlTip/ptzControlTip.js +3 -6
  64. package/lib/widgets/ptzControlTip/ptzControlTip.less +0 -6
  65. package/lib/widgets/realTimeMagnification/realTimeMagnification.js +1 -2
  66. package/lib/widgets/recordVideo/recordVideo.js +58 -54
  67. package/lib/widgets/recordVideo/recordVideo.less +17 -74
  68. package/lib/widgets/recordVideo/recordVideo.lifecycle.test.d.ts +1 -0
  69. package/lib/widgets/recordVideo/recordVideo.lifecycle.test.js +106 -0
  70. package/lib/widgets/recordVideo/recordVideo.test.js +1 -0
  71. package/lib/widgets/resolution/fullResolutionControl.js +19 -29
  72. package/lib/widgets/resolution/resolution.js +2 -3
  73. package/lib/widgets/screenshot/screenshot.js +67 -45
  74. package/lib/widgets/screenshot/screenshot.less +1 -40
  75. package/lib/widgets/screenshot/screenshot.test.d.ts +1 -0
  76. package/lib/widgets/screenshot/screenshot.test.js +135 -0
  77. package/lib/widgets/signal4G/signal4G.js +1 -4
  78. package/lib/widgets/siren/siren.js +1 -2
  79. package/lib/widgets/tempHumidity/tempHumidity.js +1 -2
  80. package/lib/widgets/toggleVerticalFull/toggleVerticalFull.js +1 -2
  81. package/lib/widgets/trialBadge/index.d.ts +2 -1
  82. package/lib/widgets/trialBadge/index.js +20 -17
  83. package/lib/widgets/trialBadge/index.less +0 -24
  84. package/lib/widgets/trialBadge/useTrialBadge.d.ts +3 -2
  85. package/lib/widgets/trialBadge/useTrialBadge.js +13 -2
  86. package/lib/widgets/tryExperience/tryExperience.js +1 -2
  87. package/lib/widgets/videoBitKBP/videoBitKBP.js +1 -2
  88. package/lib/widgets/voiceIntercom/voiceIntercom.js +24 -50
  89. package/lib/widgets/voiceIntercom/voiceIntercom.less +0 -16
  90. package/lib/widgets/zoomTurntable/turntable/index.d.ts +7 -5
  91. package/lib/widgets/zoomTurntable/turntable/index.js +1 -3
  92. package/lib/widgets/zoomTurntable/zoomTurntableDock.d.ts +0 -2
  93. package/lib/widgets/zoomTurntable/zoomTurntableDock.js +1 -1
  94. package/lib/widgets/zoomTurntable/zoomTurntableEntry.js +18 -31
  95. package/lib/widgets/zoomTurntable/zoomTurntableTip.js +3 -23
  96. package/package.json +7 -15
  97. package/lib/renderer/capabilities.d.ts +0 -8
  98. package/lib/renderer/capabilities.js +0 -19
  99. package/lib/renderer/context.d.ts +0 -5
  100. package/lib/renderer/context.js +0 -6
  101. package/lib/renderer/directionControl.d.ts +0 -6
  102. package/lib/renderer/directionControl.js +0 -3
  103. package/lib/renderer/font.less +0 -5
  104. package/lib/renderer/glyphs.d.ts +0 -1
  105. package/lib/renderer/glyphs.js +0 -256
  106. package/lib/renderer/index.module.less +0 -48
  107. package/lib/renderer/ptzZoom.d.ts +0 -6
  108. package/lib/renderer/ptzZoom.js +0 -3
  109. package/lib/renderer/text.d.ts +0 -4
  110. package/lib/renderer/text.js +0 -32
  111. package/lib/renderer/text.module.less +0 -4
  112. package/lib/renderer/viewport.d.ts +0 -7
  113. package/lib/renderer/viewport.js +0 -24
  114. package/lib/res/lynx-signal/index.d.ts +0 -1
  115. package/lib/res/lynx-signal/index.js +0 -22
  116. package/lib/res/lynx-signal/signalFour0.png +0 -0
  117. package/lib/res/lynx-signal/signalFour1.png +0 -0
  118. package/lib/res/lynx-signal/signalFour2.png +0 -0
  119. package/lib/res/lynx-signal/signalFour3.png +0 -0
  120. package/lib/res/lynx-signal/signalFour4.png +0 -0
  121. package/lib/res/lynx-signal/signalThree0.png +0 -0
  122. package/lib/res/lynx-signal/signalThree1.png +0 -0
  123. package/lib/res/lynx-signal/signalThree2.png +0 -0
  124. package/lib/res/lynx-signal/signalThree3.png +0 -0
  125. package/lib/res/player-charging.png +0 -0
  126. package/lib/res/player-more-arrow.png +0 -0
  127. package/lib/res/player-solar.png +0 -0
  128. package/lib/ui/scrollHintArrow.d.ts +0 -23
  129. package/lib/ui/scrollHintArrow.js +0 -82
  130. package/lib/widgets/battery/statusIcon.d.ts +0 -6
  131. package/lib/widgets/battery/statusIcon.js +0 -36
  132. package/lib/widgets/battery/statusIcon.less +0 -24
  133. package/lib/widgets/zoomTurntable/lynxDockLayout.d.ts +0 -6
  134. package/lib/widgets/zoomTurntable/lynxDockLayout.js +0 -30
  135. package/lib/widgets/zoomTurntable/turntable/lynx.d.ts +0 -5
  136. package/lib/widgets/zoomTurntable/turntable/lynx.js +0 -273
  137. package/lib/widgets/zoomTurntable/turntable/lynx.less +0 -9
  138. package/lib/widgets/zoomTurntable/turntable/lynxModel.d.ts +0 -37
  139. package/lib/widgets/zoomTurntable/turntable/lynxModel.js +0 -122
  140. package/lib/widgets/zoomTurntable/turntable/lynxPaint.d.ts +0 -3
  141. package/lib/widgets/zoomTurntable/turntable/lynxPaint.js +0 -36
@@ -1,122 +0,0 @@
1
- const clamp = (v, lo, hi) => Math.max(lo, Math.min(hi, v));
2
- export function dialRange(p) {
3
- const min = Number.isFinite(p.min) && p.min > 0 ? p.min : 1;
4
- const max = Number.isFinite(p.max) && p.max > min ? p.max : min;
5
- const step = Number.isFinite(p.step) && p.step > 0 ? p.step : 0.1;
6
- return {
7
- min,
8
- max,
9
- step
10
- };
11
- }
12
- export function snapDialValue(value, p) {
13
- const {
14
- min,
15
- max,
16
- step
17
- } = dialRange(p);
18
- const v = Number.isFinite(value) ? value : min;
19
- return clamp(Number((min + Math.round((v - min) / step) * step).toFixed(6)), min, max);
20
- }
21
- export function dialProgress(value, p) {
22
- const {
23
- min,
24
- max
25
- } = dialRange(p);
26
- if (max === min) return 0;
27
- const v = clamp(value, min, max);
28
- if (p.curve === 'log') return Math.log(v / min) / Math.log(max / min);
29
- const f = typeof p.curve === 'number' && p.curve > 0 ? p.curve : 1;
30
- return Math.pow((v - min) / (max - min), 1 / f);
31
- }
32
- export function dialValue(progress, p) {
33
- const {
34
- min,
35
- max
36
- } = dialRange(p);
37
- const t = clamp(progress, 0, 1);
38
- return snapDialValue(p.curve === 'log' ? min * Math.pow(max / min, t) : min + (max - min) * Math.pow(t, typeof p.curve === 'number' && p.curve > 0 ? p.curve : 1), p);
39
- }
40
- /** Same viewport and ellipse geometry as the WebView RJS, in logical px. */
41
-
42
- export function dialGeometry(p) {
43
- var _p$cropRatio, _p$styleOptions$hitPa, _p$styleOptions2;
44
- const scale = Number.isFinite(p.scale) && p.scale > 0 ? p.scale : 1;
45
- const option = (key, fallback) => {
46
- var _p$styleOptions;
47
- const n = (_p$styleOptions = p.styleOptions) === null || _p$styleOptions === void 0 ? void 0 : _p$styleOptions[key];
48
- return (Number.isFinite(n) ? n : fallback) * scale;
49
- };
50
- const crop = clamp((_p$cropRatio = p.cropRatio) !== null && _p$cropRatio !== void 0 ? _p$cropRatio : 0.2, 0, 1);
51
- const mx = option('ellipseRx', 258);
52
- const my = option('ellipseRy', 175.5);
53
- const half = mx * (crop < 0.5 ? Math.sqrt(1 - (2 * crop - 1) ** 2) : 1);
54
- const padX = option('hitPaddingX', 0);
55
- const padY = (_p$styleOptions$hitPa = (_p$styleOptions2 = p.styleOptions) === null || _p$styleOptions2 === void 0 ? void 0 : _p$styleOptions2.hitPaddingY) !== null && _p$styleOptions$hitPa !== void 0 ? _p$styleOptions$hitPa : 0;
56
- const padTop = option('hitPaddingTop', padY);
57
- const padBottom = option('hitPaddingBottom', padY);
58
- const width = Math.ceil(half * 2 + padX * 2);
59
- const height = Math.ceil(my * 2 * crop + padTop + padBottom);
60
- const cx = half + padX;
61
- const cy = my + padTop + option('contentOffsetY', 0);
62
- const inset = option('trackEdgeInset', 30);
63
- const rx = Math.max(1, option('trackRx', mx / scale - inset / scale));
64
- const ry = Math.max(1, my - inset);
65
- const right = p.orientation === 'right';
66
- const point = (x, y) => right ? {
67
- x: y,
68
- y: width - x
69
- } : {
70
- x,
71
- y
72
- };
73
- return {
74
- width: right ? height : width,
75
- height: right ? width : height,
76
- baseWidth: width,
77
- baseHeight: height,
78
- scale,
79
- mx,
80
- my,
81
- cx,
82
- cy,
83
- rx,
84
- ry,
85
- point,
86
- inverse: (x, y) => right ? {
87
- x: width - y,
88
- y: x
89
- } : {
90
- x,
91
- y
92
- },
93
- at: function (angle) {
94
- let radiusX = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : rx;
95
- let radiusY = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ry;
96
- return point(cx + radiusX * Math.cos(angle), cy + radiusY * Math.sin(angle));
97
- },
98
- option
99
- };
100
- }
101
- /** Left drag increases bottom dial; downward drag increases the right-side dial. */
102
- export function dragDialRawValue(value, delta, p) {
103
- const {
104
- min,
105
- max
106
- } = dialRange(p);
107
- const scale = Number.isFinite(p.scale) && p.scale > 0 ? p.scale : 1;
108
- return clamp(value + delta * (p.orientation === 'right' ? 1 : -1) * (max - min) / (300 * scale), min, max);
109
- }
110
- export function dragDialValue(value, delta, p) {
111
- return snapDialValue(dragDialRawValue(value, delta, p), p);
112
- }
113
- export function tapDialValue(x, y, value, p) {
114
- const g = dialGeometry(p);
115
- const pt = g.inverse(x, y);
116
- const nx = (pt.x - g.cx) / g.rx;
117
- const ny = (pt.y - g.cy) / g.ry;
118
- const radius = Math.sqrt(nx * nx + ny * ny);
119
- const theta = (Math.atan2(ny, nx) + Math.PI * 2) % (Math.PI * 2);
120
- if (radius < 0.55 || radius > 1.4 || theta < Math.PI) return null;
121
- return dialValue(dialProgress(value, p) + (theta - Math.PI * 1.5) / Math.PI, p);
122
- }
@@ -1,3 +0,0 @@
1
- import type { ZoomTurntableProps } from './type';
2
- /** Same ellipse as RJS, one native vector node; labels remain native Text. */
3
- export declare function dialPaint(p: ZoomTurntableProps, value: number): string;
@@ -1,36 +0,0 @@
1
- import "core-js/modules/esnext.iterator.constructor.js";
2
- import "core-js/modules/esnext.iterator.for-each.js";
3
- import { dialGeometry, dialProgress } from './lynxModel';
4
- const number = n => Number(n.toFixed(3));
5
- const escape = s => s.replace(/[&<>"']/g, c => ({
6
- '&': '&amp;',
7
- '<': '&lt;',
8
- '>': '&gt;',
9
- '"': '&quot;',
10
- "'": '&apos;'
11
- })[c]);
12
-
13
- /** Same ellipse as RJS, one native vector node; labels remain native Text. */
14
- export function dialPaint(p, value) {
15
- const g = dialGeometry(p);
16
- const progress = dialProgress(value, p);
17
- const right = p.orientation === 'right';
18
- const geo = g.scale * 5 / 6;
19
- const rotation = Math.PI * (0.5 - progress);
20
- const start = Math.max(Math.PI, Math.PI + rotation);
21
- const end = Math.min(Math.PI * 2, Math.PI * 2 + rotation);
22
- const from = g.at(start);
23
- const to = g.at(end);
24
- const path = `M${number(from.x)} ${number(from.y)} A${number(right ? g.ry : g.rx)} ${number(right ? g.rx : g.ry)} 0 0 1 ${number(to.x)} ${number(to.y)}`;
25
- let paint = `<path d="${path}" fill="none" stroke="#fff" stroke-opacity="0.42" stroke-width="${number(g.option('trackLineWidth', 2.2) * 5 / 6)}" stroke-dasharray="${number(g.option('dashLength', 8) * 5 / 6)} ${number(g.option('dashGap', 8) * 5 / 6)}" stroke-linecap="round"/>`;
26
- (p.marks || []).forEach(mark => {
27
- const offset = dialProgress(mark.value, p) - progress;
28
- if (Math.abs(offset) > 0.28 || Math.abs(offset) < 0.012) return;
29
- const pt = g.at(Math.PI * 1.5 + offset * Math.PI);
30
- paint += `<circle cx="${number(pt.x)}" cy="${number(pt.y)}" r="${number(g.option('markDotRadius', 3) * 5 / 6)}" fill="#fff" fill-opacity="0.62"/>`;
31
- });
32
- const pointer = g.at(Math.PI * 1.5);
33
- const color = escape(p.activeColor || '#fff');
34
- paint += `<circle cx="${number(pointer.x)}" cy="${number(pointer.y)}" r="${number(g.option('pointerRadius', 6) * 5 / 6)}" fill="none" stroke="${color}" stroke-width="${number(g.option('pointerStrokeWidth', 1.5) * 5 / 6)}"/><circle cx="${number(pointer.x)}" cy="${number(pointer.y)}" r="${number(3 * geo)}" fill="${color}"/>`;
35
- return `<svg xmlns="http://www.w3.org/2000/svg" width="${g.width}" height="${g.height}" viewBox="0 0 ${g.width} ${g.height}">${paint}</svg>`;
36
- }