@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
@@ -0,0 +1,85 @@
1
+ import React from 'react';
2
+ import { Image, Text, View } from '@ray-js/ray';
3
+ import clsx from 'clsx';
4
+ import Strings from '../../i18n';
5
+ import './captureResult.less';
6
+ const BACKDROP_LAYERS = ['back', 'middle'];
7
+ const TEXT_KEYS = {
8
+ record: {
9
+ check: 'ipc_player_record_success_check',
10
+ multi: 'ipc_player_record_multi_success_tip',
11
+ single: 'ipc_player_record_success_tip'
12
+ },
13
+ screenshot: {
14
+ check: 'ipc_player_shot_success_check',
15
+ multi: 'ipc_player_screenshot_multi_success_tip',
16
+ single: 'ipc_player_screenshot_success_tip'
17
+ }
18
+ };
19
+ const LEGACY_CLASS_MAP = {
20
+ record: {
21
+ toast: 'ipc-player-plugin-record-success-toast',
22
+ imageBox: 'ipc-player-plugin-record-success-toast-image-box',
23
+ imageBoxMulti: 'ipc-player-plugin-record-success-toast-image-box-multi',
24
+ image: 'ipc-player-plugin-record-success-toast-image',
25
+ playIconBox: 'ipc-player-plugin-record-success-play-icon-box',
26
+ playIcon: 'ipc-player-plugin-record-success-play-icon',
27
+ title: 'ipc-player-plugin-record-success-toast-title',
28
+ check: 'ipc-player-plugin-record-success-toast-bottom'
29
+ },
30
+ screenshot: {
31
+ toast: 'ipc-player-plugin-screenshot-toast',
32
+ imageBox: 'ipc-player-plugin-screenshot-toast-image-box',
33
+ imageBoxMulti: 'ipc-player-plugin-screenshot-toast-image-box-multi',
34
+ image: 'ipc-player-plugin-screenshot-toast-image',
35
+ playIconBox: '',
36
+ playIcon: '',
37
+ title: 'ipc-player-plugin-screenshot-toast-title',
38
+ check: 'ipc-player-plugin-screenshot-toast-bottom'
39
+ }
40
+ };
41
+ export function CaptureResultToast(_ref) {
42
+ let {
43
+ brandColor,
44
+ count = 0,
45
+ kind,
46
+ onCheck,
47
+ thumbnailPath,
48
+ title,
49
+ checkText,
50
+ className
51
+ } = _ref;
52
+ const isMultiLens = count > 1;
53
+ const textKeys = TEXT_KEYS[kind];
54
+ const legacyCls = LEGACY_CLASS_MAP[kind];
55
+ const imageClassName = clsx('ipc-player-plugin-capture-result-image', legacyCls.image);
56
+ return /*#__PURE__*/React.createElement(View, {
57
+ className: clsx('ipc-player-plugin-capture-result-toast', legacyCls.toast, className)
58
+ }, /*#__PURE__*/React.createElement(View, {
59
+ className: clsx('ipc-player-plugin-capture-result-image-box', legacyCls.imageBox, isMultiLens && ['ipc-player-plugin-capture-result-image-box-multi', legacyCls.imageBoxMulti])
60
+ }, isMultiLens ? /*#__PURE__*/React.createElement(React.Fragment, null, BACKDROP_LAYERS.map(layer => /*#__PURE__*/React.createElement(View, {
61
+ key: layer,
62
+ className: clsx('ipc-player-plugin-capture-result-backdrop', `ipc-player-plugin-capture-result-image-${layer}`)
63
+ })), /*#__PURE__*/React.createElement(Image, {
64
+ className: clsx(imageClassName, 'ipc-player-plugin-capture-result-image-front'),
65
+ src: thumbnailPath
66
+ })) : /*#__PURE__*/React.createElement(Image, {
67
+ className: imageClassName,
68
+ src: thumbnailPath
69
+ }), kind === 'record' && /*#__PURE__*/React.createElement(View, {
70
+ className: clsx('ipc-player-plugin-capture-result-play-icon-box', legacyCls.playIconBox)
71
+ }, /*#__PURE__*/React.createElement(Text, {
72
+ className: clsx('icon-panel', 'icon-panel-record-play', 'ipc-player-plugin-capture-result-play-icon', legacyCls.playIcon)
73
+ }))), /*#__PURE__*/React.createElement(View, {
74
+ className: clsx('ipc-player-plugin-capture-result-title', legacyCls.title)
75
+ }, title ? typeof title === 'string' ? /*#__PURE__*/React.createElement(Text, null, title) : title : isMultiLens ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, null, Strings.getLang(textKeys.multi)), /*#__PURE__*/React.createElement(Text, {
76
+ className: "ipc-player-plugin-capture-result-count"
77
+ }, Strings.formatString(Strings.getLang('ipc_player_multi_capture_success_count'), count))) : Strings.getLang(textKeys.single)), /*#__PURE__*/React.createElement(View, {
78
+ onClick: onCheck,
79
+ className: clsx('ipc-player-plugin-capture-result-check', legacyCls.check),
80
+ style: {
81
+ color: brandColor,
82
+ borderColor: brandColor
83
+ }
84
+ }, checkText || Strings.getLang(textKeys.check)));
85
+ }
@@ -0,0 +1,144 @@
1
+ .ipc-player-plugin-capture-result-toast,
2
+ .ipc-player-plugin-record-success-toast,
3
+ .ipc-player-plugin-screenshot-toast {
4
+ --capture-result-text-color: var(--fontColor, #fff);
5
+ --capture-result-near-backdrop-color: rgba(255, 255, 255, 0.2);
6
+ --capture-result-far-backdrop-color: rgba(255, 255, 255, 0.1);
7
+
8
+ z-index: 100;
9
+ display: flex;
10
+ flex: 1;
11
+ align-items: center;
12
+ padding: calc(7px * var(--ipc-player-size-scale, 1))
13
+ calc(16px * var(--ipc-player-size-scale, 1))
14
+ calc(7px * var(--ipc-player-size-scale, 1))
15
+ calc(12px * var(--ipc-player-size-scale, 1));
16
+ background-color: var(--shot-card-bg-color);
17
+ border-radius: calc(8px * var(--ipc-player-size-scale, 1));
18
+ }
19
+
20
+ :root[theme='light'] .ipc-player-plugin-capture-result-toast {
21
+ --capture-result-text-color: #1a1a1a;
22
+ --capture-result-near-backdrop-color: rgba(0, 0, 0, 0.1);
23
+ --capture-result-far-backdrop-color: rgba(0, 0, 0, 0.05);
24
+
25
+ background-color: #fff;
26
+ }
27
+
28
+ .ipc-player-plugin-capture-result-image-box,
29
+ .ipc-player-plugin-record-success-toast-image-box,
30
+ .ipc-player-plugin-screenshot-toast-image-box {
31
+ position: relative;
32
+ width: calc(66px * var(--ipc-player-size-scale, 1));
33
+ height: calc(39px * var(--ipc-player-size-scale, 1));
34
+ overflow: hidden;
35
+ border-radius: calc(4px * var(--ipc-player-size-scale, 1));
36
+ }
37
+
38
+ .ipc-player-plugin-capture-result-image,
39
+ .ipc-player-plugin-record-success-toast-image,
40
+ .ipc-player-plugin-screenshot-toast-image {
41
+ width: 100%;
42
+ height: 100%;
43
+ object-fit: cover;
44
+ }
45
+
46
+ .ipc-player-plugin-capture-result-backdrop,
47
+ .ipc-player-plugin-capture-result-image-front {
48
+ position: absolute;
49
+ box-sizing: border-box;
50
+ border-radius: calc(4px * var(--ipc-player-size-scale, 1));
51
+ }
52
+
53
+ .ipc-player-plugin-capture-result-image-back {
54
+ top: calc(1px * var(--ipc-player-size-scale, 1));
55
+ left: calc(5px * var(--ipc-player-size-scale, 1));
56
+ z-index: 1;
57
+ width: calc(56px * var(--ipc-player-size-scale, 1));
58
+ height: calc(28px * var(--ipc-player-size-scale, 1));
59
+ background: var(--capture-result-far-backdrop-color);
60
+ }
61
+
62
+ .ipc-player-plugin-capture-result-image-middle {
63
+ top: calc(3px * var(--ipc-player-size-scale, 1));
64
+ left: calc(2.5px * var(--ipc-player-size-scale, 1));
65
+ z-index: 2;
66
+ width: calc(61px * var(--ipc-player-size-scale, 1));
67
+ height: calc(30.5px * var(--ipc-player-size-scale, 1));
68
+ background: var(--capture-result-near-backdrop-color);
69
+ }
70
+
71
+ .ipc-player-plugin-capture-result-image-front {
72
+ top: calc(5px * var(--ipc-player-size-scale, 1));
73
+ left: 0;
74
+ z-index: 3;
75
+ width: calc(66px * var(--ipc-player-size-scale, 1));
76
+ height: calc(33px * var(--ipc-player-size-scale, 1));
77
+ }
78
+
79
+ .ipc-player-plugin-capture-result-play-icon-box,
80
+ .ipc-player-plugin-record-success-play-icon-box {
81
+ position: absolute;
82
+ top: 50%;
83
+ left: 50%;
84
+ z-index: 4;
85
+ display: flex;
86
+ align-items: center;
87
+ justify-content: center;
88
+ width: calc(16px * var(--ipc-player-size-scale, 1));
89
+ height: calc(16px * var(--ipc-player-size-scale, 1));
90
+ overflow: hidden;
91
+ background-color: rgba(0, 0, 0, 0.2);
92
+ border-radius: 50%;
93
+ transform: translate(-50%, -50%);
94
+ }
95
+
96
+ .ipc-player-plugin-capture-result-image-box-multi
97
+ .ipc-player-plugin-capture-result-play-icon-box {
98
+ top: calc(50% + 2px * var(--ipc-player-size-scale, 1));
99
+ }
100
+
101
+ .ipc-player-plugin-capture-result-play-icon,
102
+ .ipc-player-plugin-record-success-play-icon {
103
+ color: #ffffff;
104
+ font-size: calc(9px * var(--ipc-player-size-scale, 1)) !important;
105
+ }
106
+
107
+ .ipc-player-plugin-capture-result-title,
108
+ .ipc-player-plugin-record-success-toast-title,
109
+ .ipc-player-plugin-screenshot-toast-title {
110
+ display: flex;
111
+ flex: 1;
112
+ flex-direction: column;
113
+ min-width: 0;
114
+ margin-right: calc(12px * var(--ipc-player-size-scale, 1));
115
+ margin-left: calc(8px * var(--ipc-player-size-scale, 1));
116
+ color: var(--capture-result-text-color, var(--fontColor));
117
+ font-size: calc(14px * var(--ipc-player-size-scale, 1));
118
+ line-height: calc(20px * var(--ipc-player-size-scale, 1));
119
+ word-break: break-word;
120
+ }
121
+
122
+ .ipc-player-plugin-capture-result-count {
123
+ margin-top: calc(2px * var(--ipc-player-size-scale, 1));
124
+ color: var(--capture-result-text-color, var(--fontColor));
125
+ font-size: calc(12px * var(--ipc-player-size-scale, 1));
126
+ line-height: calc(17px * var(--ipc-player-size-scale, 1));
127
+ opacity: 0.5;
128
+ }
129
+
130
+ .ipc-player-plugin-capture-result-check,
131
+ .ipc-player-plugin-record-success-toast-bottom,
132
+ .ipc-player-plugin-screenshot-toast-bottom {
133
+ min-width: calc(52px * var(--ipc-player-size-scale, 1));
134
+ max-width: calc(100px * var(--ipc-player-size-scale, 1));
135
+ flex-shrink: 0;
136
+ padding: calc(5px * var(--ipc-player-size-scale, 1))
137
+ calc(11px * var(--ipc-player-size-scale, 1));
138
+ overflow: hidden;
139
+ font-size: calc(14px * var(--ipc-player-size-scale, 1));
140
+ white-space: nowrap;
141
+ text-overflow: ellipsis;
142
+ border: 1px solid #1989fa;
143
+ border-radius: calc(4px * var(--ipc-player-size-scale, 1));
144
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,80 @@
1
+ import React from 'react';
2
+ import { renderToStaticMarkup } from 'react-dom/server';
3
+ jest.mock('@ray-js/ray', () => {
4
+ const React = require('react');
5
+ return {
6
+ Image: _ref => {
7
+ let {
8
+ className,
9
+ src
10
+ } = _ref;
11
+ return /*#__PURE__*/React.createElement("img", {
12
+ alt: "",
13
+ className: className,
14
+ src: src
15
+ });
16
+ },
17
+ Text: _ref2 => {
18
+ let {
19
+ children,
20
+ className
21
+ } = _ref2;
22
+ return /*#__PURE__*/React.createElement("span", {
23
+ className: className
24
+ }, children);
25
+ },
26
+ View: _ref3 => {
27
+ let {
28
+ children,
29
+ className
30
+ } = _ref3;
31
+ return /*#__PURE__*/React.createElement("div", {
32
+ className: className
33
+ }, children);
34
+ }
35
+ };
36
+ });
37
+ jest.mock('../../i18n', () => ({
38
+ __esModule: true,
39
+ default: {
40
+ getLang: key => key,
41
+ formatString: (template, count) => `${template}:${count}`
42
+ }
43
+ }));
44
+ jest.mock('./captureResult.less', () => ({}));
45
+ const {
46
+ CaptureResultToast
47
+ } = require('./captureResult');
48
+ const renderToast = count => renderToStaticMarkup(/*#__PURE__*/React.createElement(CaptureResultToast, {
49
+ brandColor: "#ff592a",
50
+ count: count,
51
+ kind: "screenshot",
52
+ onCheck: () => undefined,
53
+ thumbnailPath: "thingfile://capture.jpg"
54
+ }));
55
+ const countClass = (markup, className) => [...markup.matchAll(/class="([^"]*)"/g)].filter(_ref4 => {
56
+ let [, names] = _ref4;
57
+ return names.split(/\s+/).includes(className);
58
+ }).length;
59
+ describe('CaptureResultToast', () => {
60
+ it('keeps the single-item thumbnail unchanged', () => {
61
+ const markup = renderToast(1);
62
+ expect(countClass(markup, 'ipc-player-plugin-capture-result-backdrop')).toBe(0);
63
+ expect(countClass(markup, 'ipc-player-plugin-capture-result-image-front')).toBe(0);
64
+ expect(countClass(markup, 'ipc-player-plugin-capture-result-image')).toBe(1);
65
+ });
66
+ it('renders both backdrops for two captured items', () => {
67
+ const markup = renderToast(2);
68
+ expect(countClass(markup, 'ipc-player-plugin-capture-result-backdrop')).toBe(2);
69
+ expect(countClass(markup, 'ipc-player-plugin-capture-result-image-back')).toBe(1);
70
+ expect(countClass(markup, 'ipc-player-plugin-capture-result-image-middle')).toBe(1);
71
+ expect(countClass(markup, 'ipc-player-plugin-capture-result-image-front')).toBe(1);
72
+ });
73
+ it('caps the backdrop count at two', () => {
74
+ const markup = renderToast(4);
75
+ expect(countClass(markup, 'ipc-player-plugin-capture-result-backdrop')).toBe(2);
76
+ expect(countClass(markup, 'ipc-player-plugin-capture-result-image-back')).toBe(1);
77
+ expect(countClass(markup, 'ipc-player-plugin-capture-result-image-middle')).toBe(1);
78
+ expect(countClass(markup, 'ipc-player-plugin-capture-result-image-front')).toBe(1);
79
+ });
80
+ });
@@ -0,0 +1,2 @@
1
+ export * from './captureResult';
2
+ export type { CaptureResultToastProps, CaptureKind } from './captureResult';
@@ -0,0 +1,2 @@
1
+ export * from './captureResult';
2
+ export {};
@@ -1,7 +1,6 @@
1
- import { View } from '@ray-js/ray';
1
+ import { View, Text } from '@ray-js/ray';
2
2
  import React, { useContext } from 'react';
3
3
  import clsx from 'clsx';
4
- import { PlayerText as Text } from '../../renderer/text';
5
4
  import { useDpState } from '../../hooks';
6
5
  import { useStore } from '../../ctx/store';
7
6
  import { UIEventContext } from '../../ui/context';
@@ -1,9 +1,8 @@
1
- import { View } from '@ray-js/ray';
1
+ import { View, Text } from '@ray-js/ray';
2
2
  import clsx from 'clsx';
3
3
  import React, { useEffect, useRef, useState } from 'react';
4
4
  import { getServiceUrl } from '@ray-js/ray-ipc-utils';
5
5
  import { useMemoizedFn } from 'ahooks';
6
- import { PlayerText as Text } from '../../renderer/text';
7
6
  import Strings from '../../i18n';
8
7
  import { useStore } from '../../ctx/store';
9
8
  import { showFlowLowTipId } from '../../ui/constant';
@@ -1,9 +1,8 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import React, { useContext, useEffect, useMemo } from 'react';
3
- import { View, setPageOrientation, hideMenuButton, showMenuButton, showStatusBar, hideStatusBar, setNavigationBarBack, getSystemInfoSync } from '@ray-js/ray';
3
+ import { View, setPageOrientation, Text, hideMenuButton, showMenuButton, showStatusBar, hideStatusBar, setNavigationBarBack, getSystemInfoSync } from '@ray-js/ray';
4
4
  import clsx from 'clsx';
5
5
  import { unstable_batchedUpdates as batchedUpdates } from '@ray-core/ray';
6
- import { PlayerText as Text } from '../../renderer/text';
7
6
  import { UIEventContext } from '../../ui/context';
8
7
  import { showAllComponent, voiceIntercomId, verticalScreenId, fullTravelRouteControlId, ptzControlId, fullResolutionId, fullSmallIntercomId, pauseTimeToHideAllComponent, widgetLabs, widgetClick } from '../../ui/constant';
9
8
  import { useStore } from '../../ctx/store';
@@ -2,7 +2,7 @@
2
2
  * 全屏状态下要添加的摄像机行进路线控件
3
3
  */
4
4
  import React from 'react';
5
- import RectDirectionControl from '../../renderer/directionControl';
5
+ import RectDirectionControl from '@ray-js/direction-control';
6
6
  import type { ComponentConfigProps } from '../../interface';
7
7
  type RectDirectionControlProps = React.ComponentProps<typeof RectDirectionControl>;
8
8
  export type FullTravelRouteControlProps = ComponentConfigProps & {
@@ -6,8 +6,8 @@ import _extends from "@babel/runtime/helpers/esm/extends";
6
6
  import React, { useEffect, useContext, useState, useRef } from 'react';
7
7
  import { View } from '@ray-js/ray';
8
8
  import clsx from 'clsx';
9
+ import RectDirectionControl from '@ray-js/direction-control';
9
10
  import { useMemoizedFn } from 'ahooks';
10
- import RectDirectionControl from '../../renderer/directionControl';
11
11
  import { UIEventContext } from '../../ui/context';
12
12
  import { useDpState } from '../../hooks';
13
13
  import { useComponentHideState } from '../../ui/hooks';
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
- import { View } from '@ray-js/ray';
2
+ import { View, Text } from '@ray-js/ray';
3
3
  import clsx from 'clsx';
4
- import { PlayerText as Text } from '../../renderer/text';
5
4
  import './verticalScreen.less';
6
5
  const NILL = () => null;
7
6
  export function VerticalScreen(_ref) {
@@ -24,3 +24,4 @@ export * from './toggleVerticalFull';
24
24
  export * from './flowLowTip';
25
25
  export * from './realTimeMagnification';
26
26
  export * from './zoomTurntable';
27
+ export * from './captureResult';
@@ -23,4 +23,5 @@ export * from './smallIntercom';
23
23
  export * from './toggleVerticalFull';
24
24
  export * from './flowLowTip';
25
25
  export * from './realTimeMagnification';
26
- export * from './zoomTurntable';
26
+ export * from './zoomTurntable';
27
+ export * from './captureResult';
@@ -1,7 +1,6 @@
1
1
  import React, { useContext } from 'react';
2
- import { View } from '@ray-js/ray';
2
+ import { View, Text } from '@ray-js/ray';
3
3
  import clsx from 'clsx';
4
- import { PlayerText as Text } from '../../renderer/text';
5
4
  import { useStore } from '../../ctx/store';
6
5
  import { UIEventContext } from '../../ui/context';
7
6
  import { hideAllComponent, widgetLabs, widgetClick } from '../../ui/constant';
@@ -4,8 +4,6 @@ import "core-js/modules/esnext.iterator.map.js";
4
4
  import React from 'react';
5
5
  import { View, ScrollView, CoverView } from '@ray-js/ray';
6
6
  import clsx from 'clsx';
7
- import { usePlayerRenderMode } from '../../renderer/context';
8
- import { PlayerText } from '../../renderer/text';
9
7
  import './moveInteractiveControlUI.less';
10
8
  const defaultMenu = [{
11
9
  key: '0',
@@ -64,7 +62,6 @@ const defaultCSSVariable = {
64
62
  '--activeColor': '#FF592A'
65
63
  };
66
64
  export function MoveInterActiveControlUI(props) {
67
- const isLynx = usePlayerRenderMode() === 'lynx';
68
65
  const {
69
66
  contentClsName,
70
67
  wrapClsName,
@@ -83,17 +80,13 @@ export function MoveInterActiveControlUI(props) {
83
80
  // @ts-ignore
84
81
  , {
85
82
  style: _objectSpread({}, CSSVariable),
86
- className: clsx('ipc-player-plugin-active-control-wrap', wrapClsName, {
87
- 'ipc-player-plugin-active-control-wrap-lynx': isLynx,
88
- 'ipc-player-plugin-active-control-wrap-webview': !isLynx
89
- })
83
+ className: clsx('ipc-player-plugin-active-control-wrap', wrapClsName)
90
84
  }, /*#__PURE__*/React.createElement(View, {
91
85
  className: clsx('ipc-player-plugin-active-control-title')
92
86
  }, I18n.t('homeFeatureInteractiveMenuTitle')), /*#__PURE__*/React.createElement(ScrollView, {
93
87
  style: {
94
88
  flex: 1
95
89
  },
96
- className: isLynx ? 'ipc-player-plugin-active-control-scroll-lynx' : undefined,
97
90
  scrollY: true
98
91
  }, /*#__PURE__*/React.createElement(View, {
99
92
  className: clsx('ipc-player-plugin-active-control', contentClsName)
@@ -105,11 +98,9 @@ export function MoveInterActiveControlUI(props) {
105
98
  })
106
99
  }, /*#__PURE__*/React.createElement(View, {
107
100
  className: clsx('ipc-player-plugin-active-control-item-icon')
108
- }, !isLynx && /*#__PURE__*/React.createElement(View, {
101
+ }, /*#__PURE__*/React.createElement(View, {
109
102
  className: clsx('ipc-player-plugin-active-control-item-icon-mask')
110
- }), isLynx ? /*#__PURE__*/React.createElement(PlayerText, {
111
- className: clsx('icon-panel', item.iconName, 'ipc-player-plugin-interactive-icon')
112
- }) : /*#__PURE__*/React.createElement(View, {
103
+ }), /*#__PURE__*/React.createElement(View, {
113
104
  className: clsx('icon-panel', item.iconName, 'ipc-player-plugin-interactive-icon')
114
105
  })), /*#__PURE__*/React.createElement(View, {
115
106
  className: clsx('ipc-player-plugin-active-control-item-title')
@@ -43,6 +43,8 @@
43
43
  }
44
44
  }
45
45
  .ipc-player-plugin-active-control-item-icon {
46
+ position: relative;
47
+ z-index: 1;
46
48
  width: calc(42px * var(--ipc-player-size-scale, 1));
47
49
  height: calc(42px * var(--ipc-player-size-scale, 1));
48
50
  border-radius: calc(42px * var(--ipc-player-size-scale, 1));
@@ -52,6 +54,7 @@
52
54
  justify-content: center;
53
55
  font-size: calc(16px * var(--ipc-player-size-scale, 1));
54
56
  color: var(--color);
57
+ overflow: hidden;
55
58
  .ipc-player-plugin-active-control-item-icon-mask {
56
59
  position: absolute;
57
60
  width: 100%;
@@ -61,14 +64,6 @@
61
64
  opacity: 1;
62
65
  }
63
66
  }
64
-
65
- .ipc-player-plugin-active-control-wrap-webview {
66
- .ipc-player-plugin-active-control-item-icon {
67
- position: relative;
68
- z-index: 1;
69
- overflow: hidden;
70
- }
71
- }
72
67
  .ipc-player-plugin-active-control-item-title {
73
68
  width: calc(70px * var(--ipc-player-size-scale, 1));
74
69
  white-space: nowrap; /* 防止文本换行 */
@@ -78,19 +73,4 @@
78
73
  }
79
74
  .ipc-player-plugin-interactive-icon {
80
75
  font-size: calc(20px * var(--ipc-player-size-scale, 1));;
81
- }
82
-
83
- .ipc-player-plugin-active-control-wrap-lynx {
84
- min-height: 0;
85
-
86
- .ipc-player-plugin-active-control-scroll-lynx {
87
- height: 0;
88
- min-height: 0;
89
- overflow: hidden;
90
- }
91
-
92
- .ipc-player-plugin-active-control-item-icon {
93
- // The background belongs to the scrolling card, not a separate absolute layer.
94
- background: var(--iconBgColor);
95
- }
96
- }
76
+ }
@@ -1,7 +1,6 @@
1
1
  import React, { useState } from 'react';
2
- import { View, CoverView } from '@ray-js/ray';
2
+ import { View, CoverView, Text } from '@ray-js/ray';
3
3
  import clsx from 'clsx';
4
- import { PlayerText as Text } from '../../renderer/text';
5
4
  import { useStore } from '../../ctx/store';
6
5
  import { landscapeTipId } from '../../ui/constant';
7
6
  import { PlayState } from '../../interface';
@@ -7,7 +7,7 @@ import { getDpIdByCode, publishDps } from '@ray-js/ray-ipc-utils';
7
7
  import _find from 'lodash/find';
8
8
  import _get from 'lodash/get';
9
9
  import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
10
- import IpcPtzZoom from '../../renderer/ptzZoom';
10
+ import IpcPtzZoom from '@ray-js/ipc-ptz-zoom';
11
11
  import { useStore } from '../../ctx/store';
12
12
  import { useMemoizedFn } from '../../hooks';
13
13
  import { MultiCameraScreenMode } from '../../interface';
@@ -1,9 +1,8 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
- import { View } from '@ray-js/ray';
2
+ import { View, Text } from '@ray-js/ray';
3
3
  import clsx from 'clsx';
4
4
  import React from 'react';
5
5
  import { useMemoizedFn } from 'ahooks';
6
- import { PlayerText as Text } from '../../renderer/text';
7
6
  import { useStore } from '../../ctx/store';
8
7
  import './index.less';
9
8
  /**
@@ -1,7 +1,6 @@
1
1
  import React, { useMemo, useState } from 'react';
2
- import { View, CoverView } from '@ray-js/ray';
2
+ import { View, CoverView, Text } from '@ray-js/ray';
3
3
  import clsx from 'clsx';
4
- import { PlayerText as Text } from '../../renderer/text';
5
4
  import { useStore } from '../../ctx/store';
6
5
  import { ptzMoveableTipId } from '../../ui/constant';
7
6
  import { PlayState } from '../../interface';
@@ -1,7 +1,6 @@
1
- import { View } from '@ray-js/ray';
1
+ import { Text, View } from '@ray-js/ray';
2
2
  import clsx from 'clsx';
3
3
  import React, { useMemo } from 'react';
4
- import { PlayerText as Text } from '../../renderer/text';
5
4
  import { useStore } from '../../ctx/store';
6
5
  import { MultiCameraLayoutStyle, MultiCameraScreenMode } from '../../interface';
7
6
  import { multiPrefix } from './constants';
@@ -1,10 +1,9 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
- import { View } from '@ray-js/ray';
2
+ import { View, Text } from '@ray-js/ray';
3
3
  import clsx from 'clsx';
4
4
  import React from 'react';
5
5
  import { useMemoizedFn } from 'ahooks';
6
6
  import Color from 'color';
7
- import { PlayerText as Text } from '../../renderer/text';
8
7
  import { useStore } from '../../ctx/store';
9
8
  import { multiPrefix } from './constants';
10
9
  import './index.less';
@@ -1,7 +1,6 @@
1
- import { View } from '@ray-js/ray';
1
+ import { View, Text } from '@ray-js/ray';
2
2
  import React, { useMemo } from 'react';
3
3
  import clsx from 'clsx';
4
- import { PlayerText as Text } from '../../renderer/text';
5
4
  import { MultiCameraLayoutStyle } from '../../interface';
6
5
  import { multiPrefix } from './constants';
7
6
  import { useStore } from '../../ctx/store';
@@ -1,7 +1,6 @@
1
1
  import React, { useState } from 'react';
2
- import { View, CoverView } from '@ray-js/ray';
2
+ import { View, CoverView, Text } from '@ray-js/ray';
3
3
  import clsx from 'clsx';
4
- import { PlayerText as Text } from '../../renderer/text';
5
4
  import { useStore } from '../../ctx/store';
6
5
  import { tileTipId } from '../../ui/constant';
7
6
  import { PlayState } from '../../interface';
@@ -1,7 +1,6 @@
1
- import { View } from '@ray-js/ray';
1
+ import { View, Text } from '@ray-js/ray';
2
2
  import React, { useContext } from 'react';
3
3
  import clsx from 'clsx';
4
- import { PlayerText as Text } from '../../renderer/text';
5
4
  import { useStore } from '../../ctx/store';
6
5
  import { UIEventContext } from '../../ui/context';
7
6
  import { widgetLabs, widgetClick, pauseTimeToHideAllComponent, startTimeToHideAllComponent } from '../../ui/constant';
@@ -18,13 +17,19 @@ export const Muted = props => {
18
17
  } = useContext(UIEventContext);
19
18
  const event = propsEvent !== null && propsEvent !== void 0 ? propsEvent : ctxEvent;
20
19
  const {
21
- isMuted
20
+ isMuted,
21
+ intercom
22
22
  } = useStore({
23
- isMuted: mute
23
+ isMuted: mute,
24
+ intercom: props.intercom
24
25
  });
26
+ const disabled = intercom;
25
27
  return /*#__PURE__*/React.createElement(View, {
26
- className: clsx(className),
28
+ className: clsx(className, {
29
+ 'ipc-player-plugin-muted-disabled': disabled
30
+ }),
27
31
  onClick: () => {
32
+ if (disabled) return;
28
33
  event.emit(widgetClick, {
29
34
  widgetId: widgetLabs.MUTED
30
35
  });
@@ -8,4 +8,8 @@
8
8
  .ipc-player-plugin-muted-text-icon {
9
9
  color: var(--iconColor);
10
10
  font-size: calc(var(--iconPlayerSize) * var(--ipc-player-size-scale, 1)) !important;
11
- }
11
+ }
12
+
13
+ .ipc-player-plugin-muted-disabled {
14
+ opacity: 0.4;
15
+ }
@@ -0,0 +1 @@
1
+ export {};