@ray-js/ipc-player-integration 0.0.1-beta-74 → 0.0.1-beta-76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/ui/ui.js CHANGED
@@ -440,19 +440,10 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
440
440
  console.log(`onCameraNotifyWeakNetwork: ${JSON.stringify(data)}`);
441
441
  },
442
442
  clarity: decodeClarityDic[resolution],
443
- onZoomChange: onZoomChange
444
- // objectFit={
445
- // screenType === 'vertical'
446
- // ? playerFit === 'contain'
447
- // ? 'fillCrop'
448
- // : 'contain'
449
- // : landscapeMode === 'standard'
450
- // ? 'contain'
451
- // : 'fillCrop'
452
- // }
453
- ,
454
- objectFit: "fillCrop",
455
- scaleMultiple: scaleMultiple
443
+ onZoomChange: onZoomChange,
444
+ objectFit: screenType === 'vertical' ? playerFit === 'contain' ? 'fillCrop' : 'contain' : landscapeMode === 'standard' ? 'contain' : 'fillCrop',
445
+ scaleMultiple: 0
446
+ // objectFit="fillCrop"
456
447
  // scaleMultiple={-100}
457
448
  // 安卓横屏问题
458
449
  // ptzControllable={screenType === 'vertical'}
package/lib/ui/ui.less CHANGED
@@ -248,4 +248,26 @@
248
248
 
249
249
  .ipc-player-element-hidden {
250
250
  // visibility: hidden !important;
251
+ }
252
+
253
+ @keyframes absolute-move-in-right-animation {
254
+ from {
255
+ transform: translate(calc(100vw), 0);
256
+ }
257
+ to {
258
+ transform: translate(0, 0);
259
+ }
260
+ }
261
+
262
+ @animation-time: 0.3s;
263
+
264
+ .ipc-plugin-absolute-move-in-right {
265
+ --translate-length: calc(50 * 1vw);
266
+ animation: absolute-move-in-right-animation @animation-time ease-in-out;
267
+ transition: transform @animation-time ease-in, opacity @animation-time ease-in, width @animation-time ease-in;
268
+ &.ipc-plugin-absolute-move-in-right-hide {
269
+ transform: translate(var(--translate-length), 0);
270
+ opacity: 0;
271
+ width: 0;
272
+ }
251
273
  }
@@ -9,9 +9,7 @@
9
9
 
10
10
  .ipc-player-plugin-full-screen-voice-wrap {
11
11
  position: absolute;
12
- top: 50%;
13
- transform: translate(0, -50%);
14
- // transform: translate(180%, 0);
12
+ bottom: calc(24px * var(--ipc-player-size-scale, 1));
15
13
  right: calc(50px * var(--ipc-player-size-scale, 1));
16
14
  z-index: 340;
17
15
  }
@@ -21,11 +19,7 @@
21
19
  flex-direction: column;
22
20
  align-items: flex-end;
23
21
  justify-content: center;
24
- transform: translate(0, 0);
25
- transition: transform ease-in 0.3s;
26
- &.ipc-player-plugin-full-screen-voice-hide {
27
- transform: translate(180%, 0);
28
- }
22
+ width: auto;
29
23
  }
30
24
 
31
25
  .ipc-player-plugin-full-screen-voice-disappear {
@@ -35,6 +29,6 @@
35
29
  }
36
30
 
37
31
  .ipc-plugin-full-travel-route-control {
38
- width: calc(172px * var(--ipc-player-size-scale, 1));
39
- height: calc(172px * var(--ipc-player-size-scale, 1));
32
+ // width: calc(172px * var(--ipc-player-size-scale, 1));
33
+ // height: calc(172px * var(--ipc-player-size-scale, 1));
40
34
  }
@@ -66,8 +66,8 @@ export function FullTravelRouteControl(props) {
66
66
  prevRotate.current = value;
67
67
  };
68
68
  return /*#__PURE__*/React.createElement(View, {
69
- className: clsx('ipc-player-plugin-full-screen-voice', {
70
- 'ipc-player-plugin-full-screen-voice-hide': shouldHide || isPtzActive
69
+ className: clsx('ipc-player-plugin-full-screen-voice', 'ipc-plugin-absolute-move-in-right', {
70
+ 'ipc-plugin-absolute-move-in-right-hide': shouldHide || isPtzActive
71
71
  })
72
72
  }, /*#__PURE__*/React.createElement(RectDirectionControl, _extends({
73
73
  className: "ipc-plugin-full-travel-route-control",
@@ -28,8 +28,7 @@ export function MoveInteractiveControl(props) {
28
28
  } = props;
29
29
  const [state, _, sendDp] = useDpState({
30
30
  devId,
31
- dpCodes: [TYPE_CODE, STATE_CODE],
32
- listenDpChange: false
31
+ dpCodes: [TYPE_CODE, STATE_CODE]
33
32
  });
34
33
  const [schemaInfo] = useSchemaInfo(devId, [TYPE_CODE]);
35
34
  const menu = useMemo(() => {
@@ -62,8 +61,8 @@ export function MoveInteractiveControl(props) {
62
61
  };
63
62
  }, []);
64
63
  return /*#__PURE__*/React.createElement(MoveInterActiveControlUI, {
65
- wrapClsName: clsx('ipc-player-plugin-move-control', {
66
- 'ipc-player-plugin-move-control-hide': hide
64
+ wrapClsName: clsx('ipc-player-plugin-move-control', 'ipc-plugin-absolute-move-in-right', {
65
+ 'ipc-plugin-absolute-move-in-right-hide': hide
67
66
  }),
68
67
  menu: menu,
69
68
  onClick: value => {
@@ -21,18 +21,7 @@
21
21
  }
22
22
 
23
23
  .ipc-player-plugin-move-control {
24
- position: absolute;
25
- right: 0;
26
- top: 0;
27
- bottom: 0;
28
- transition: transform @animation-time ease-in, opacity @animation-time ease-in;
29
- animation: ipc-player-plugin-move-interactive 0.3s ease-in-out;
24
+ flex: 1;
30
25
  width: calc(288px * var(--ipc-player-size-scale, 1));
31
- &.ipc-player-plugin-move-control-hide {
32
- transform: translate(100%, 0);
33
- opacity: 0;
34
- }
35
- &.ipc-player-plugin-move-control-show {
36
- transform: translate(0, 0);
37
- }
26
+ z-index: 345;
38
27
  }
@@ -18,6 +18,7 @@ export type MoveInterActiveControlUIProps = {
18
18
  menu?: MenuItem[];
19
19
  onClick?: (key: MenuItem['key']) => void;
20
20
  activeKey?: string;
21
+ coverView?: boolean;
21
22
  };
22
23
  type MenuItem = {
23
24
  key: string;
@@ -2,7 +2,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import "core-js/modules/esnext.iterator.constructor.js";
3
3
  import "core-js/modules/esnext.iterator.map.js";
4
4
  import React from 'react';
5
- import { View, ScrollView } from '@ray-js/ray';
5
+ import { View, ScrollView, CoverView } from '@ray-js/ray';
6
6
  import clsx from 'clsx';
7
7
  import './moveInteractiveControlUI.less';
8
8
  const defaultMenu = [{
@@ -68,20 +68,22 @@ export function MoveInterActiveControlUI(props) {
68
68
  CSSVariable = defaultCSSVariable,
69
69
  menu = defaultMenu,
70
70
  activeKey,
71
- onClick
71
+ onClick,
72
+ coverView
72
73
  } = props;
73
74
  const handClick = (item, e) => {
74
75
  e.origin.stopPropagation();
75
76
  onClick && onClick(item.key);
76
77
  };
77
- return /*#__PURE__*/React.createElement(View
78
+ const WrapComponent = coverView ? CoverView : View;
79
+ return /*#__PURE__*/React.createElement(WrapComponent
78
80
  // @ts-ignore
79
81
  , {
80
82
  style: _objectSpread({}, CSSVariable),
81
83
  className: clsx('ipc-player-plugin-active-control-wrap', wrapClsName)
82
84
  }, /*#__PURE__*/React.createElement(View, {
83
85
  className: clsx('ipc-player-plugin-active-control-title')
84
- }, I18n.t('interactive')), /*#__PURE__*/React.createElement(ScrollView, {
86
+ }, I18n.t('homeFeatureInteractiveMenuTitle')), /*#__PURE__*/React.createElement(ScrollView, {
85
87
  style: {
86
88
  flex: 1
87
89
  },
@@ -64,8 +64,8 @@ export const FullResolutionControl = props => {
64
64
  }
65
65
  }, [resolution]);
66
66
  return /*#__PURE__*/React.createElement(View, {
67
- className: clsx('ipc-player-plugin-full-resolution-control', {
68
- 'ipc-player-plugin-full-resolution-control-hide': hide
67
+ className: clsx('ipc-player-plugin-full-resolution-control', 'ipc-plugin-absolute-move-in-right', {
68
+ 'ipc-plugin-absolute-move-in-right-hide': hide
69
69
  })
70
70
  }, resolutionList.map(item => /*#__PURE__*/React.createElement(Text, {
71
71
  onClick: () => changeResolution(item),
@@ -60,6 +60,7 @@ export const Resolution = props => {
60
60
  }, /*#__PURE__*/React.createElement(View, {
61
61
  className: clsx('ipc-player-plugin-resolution', {
62
62
  'ipc-player-plugin-resolution-full': screenType === 'full'
63
+ // 'ipc-plugin-absolute-move-in-right-hide': screenType === 'full',
63
64
  })
64
65
  }, /*#__PURE__*/React.createElement(Text, {
65
66
  className: "resolutionText"
@@ -24,19 +24,12 @@
24
24
 
25
25
  .ipc-player-plugin-full-resolution-control {
26
26
  height: 100%;
27
- transition: transform @animation-time ease-in, opacity @animation-time ease-in, width @animation-time ease-in;
28
27
  width: 200px;
29
28
  display: flex;
30
29
  flex-direction: column;
31
30
  justify-content: center;
32
31
  align-items: center;
33
32
  background-color: rgba(0,0,0,0.9);
34
- animation: ipc-player-plugin-full-resolution-control-move-in @animation-time ease-in-out;
35
- &.ipc-player-plugin-full-resolution-control-hide {
36
- transform: translate(300%, 0);
37
- opacity: 0;
38
- width: 0;
39
- }
40
33
  }
41
34
 
42
35
  .ipc-player-plugin-full-resolution-control-wrap {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/ipc-player-integration",
3
- "version": "0.0.1-beta-74",
3
+ "version": "0.0.1-beta-76",
4
4
  "description": "IPC 播放器功能集成",
5
5
  "main": "lib/index",
6
6
  "files": [