@ray-js/ipc-player-integration 0.0.1-beta-31 → 0.0.1-beta-33

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.
@@ -49,6 +49,7 @@ export function FullScreen(props) {
49
49
  absoluteContentClassName: 'ipc-player-plugin-vertical-screen-wrap',
50
50
  initProps: _objectSpread(_objectSpread({}, props), {}, {
51
51
  onClick: () => {
52
+ event.emit(pauseTimeToHideAllComponent);
52
53
  event.emit(showAllComponent);
53
54
  handClick('vertical');
54
55
  }
@@ -79,13 +80,13 @@ export function FullScreen(props) {
79
80
  });
80
81
  ty.showMenuButton();
81
82
  ty.showStatusBar();
83
+ event.emit(pauseTimeToHideAllComponent);
82
84
  deleteContent('topLeft', verticalScreenId);
83
85
  deleteContent('absolute', voiceIntercomId);
84
86
  deleteContent('absolute', ptzControlId);
85
87
  deleteContent('absolute', fullResolutionId);
86
88
  // 还原Ptz点击状态值
87
89
  setPtzActive(false);
88
- console.log('_________dshadhsah');
89
90
  // 还原全屏清晰度状态值
90
91
  setFullResolutionActive(false);
91
92
  }
@@ -40,10 +40,12 @@ export const PtzControl = props => {
40
40
  } = props;
41
41
  const {
42
42
  screenType,
43
- brandColor
43
+ brandColor,
44
+ fullResolutionActive
44
45
  } = useStore({
45
46
  screenType: props.screenType,
46
- brandColor: props.brandColor
47
+ brandColor: props.brandColor,
48
+ fullResolutionActive: props.fullResolutionActive
47
49
  });
48
50
  const [shouldHide] = useComponentHideState(screenType);
49
51
  const {
@@ -61,7 +63,7 @@ export const PtzControl = props => {
61
63
  }, []);
62
64
  return /*#__PURE__*/React.createElement(CoverView, {
63
65
  className: clsx('ipc-player-plugin-full-screen-ptz-control', {
64
- 'ipc-player-plugin-full-screen-ptz-control-hide': shouldHide
66
+ 'ipc-player-plugin-full-screen-ptz-control-hide': shouldHide || fullResolutionActive
65
67
  })
66
68
  }, /*#__PURE__*/React.createElement(IpcPtzZoom, {
67
69
  ptzSize: "172px",
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { useCallback } from 'react';
2
2
  import { Text, View } from '@ray-js/ray';
3
3
  import clsx from 'clsx';
4
4
  import Strings from '../../i18n';
@@ -24,8 +24,7 @@ export const FullResolutionControl = props => {
24
24
  resolution: props.resolution
25
25
  });
26
26
  const [shouldHide] = useComponentHideState(screenType);
27
- const changeResolution = value => {
28
- console.log('________', value);
27
+ const changeResolution = useCallback(value => {
29
28
  if (value === resolution) {
30
29
  ty.showToast({
31
30
  icon: 'none',
@@ -33,11 +32,12 @@ export const FullResolutionControl = props => {
33
32
  });
34
33
  } else {
35
34
  setResolution(value);
36
- setFullResolutionActive(false);
35
+ // setFullResolutionActive(false);
37
36
  }
38
- };
37
+ }, [resolution]);
39
38
  return /*#__PURE__*/React.createElement(View, {
40
39
  className: clsx('ipc-player-plugin-full-resolution-control', {
40
+ 'ipc-player-plugin-full-resolution-control-show': fullResolutionActive,
41
41
  'ipc-player-plugin-full-resolution-control-hide': shouldHide || !fullResolutionActive
42
42
  })
43
43
  }, resolutionList.map(item => /*#__PURE__*/React.createElement(Text, {
@@ -1,3 +1,5 @@
1
+ @animation-time: 0.3s;
2
+
1
3
  .ipc-player-plugin-resolution {
2
4
  background-color: rgba(255,255,255,0.2);
3
5
  padding: calc(4px * var(--ipc-player-size-scale, 1)) calc(5px * var(--ipc-player-size-scale, 1)) !important;
@@ -15,15 +17,16 @@
15
17
  }
16
18
 
17
19
  .ipc-player-plugin-full-resolution-control {
18
- transform: translate(0, 0);
20
+ transform: translate(300%, 0);
19
21
  height: 100%;
20
- transition: transform 0.3s ease-in, opacity 0.3s ease-in, width 0.3s ease-in;
22
+ transition: transform @animation-time ease-in, opacity @animation-time ease-in, width @animation-time ease-in;
21
23
  width: 200px;
22
24
  display: flex;
23
25
  flex-direction: column;
24
26
  justify-content: center;
25
27
  align-items: center;
26
28
  background-color: rgba(0,0,0,0.9);
29
+ animation: ipc-player-plugin-full-resolution-control-move-in @animation-time ease-in-out forwards;
27
30
  &.ipc-player-plugin-full-resolution-control-hide {
28
31
  transform: translate(300%, 0);
29
32
  opacity: 0;
@@ -43,6 +46,15 @@
43
46
  z-index: 345;
44
47
  }
45
48
 
49
+ @keyframes ipc-player-plugin-full-resolution-control-move-in {
50
+ form {
51
+ transform: translate(300%, 0);
52
+ }
53
+ to {
54
+ transform: translate(0, 0);
55
+ }
56
+ }
57
+
46
58
  .ipc-player-plugin-full-resolution-control-text {
47
59
  font-size: 14px;
48
60
  font-weight: 400;
package/lib/ui/ui.js CHANGED
@@ -36,7 +36,7 @@ const defaultCSSVariable = {
36
36
  '--fontColor': '#fff',
37
37
  '--fontSize': '12px'
38
38
  };
39
- const HIDE_COMPONENT_TIME = 10000;
39
+ const HIDE_COMPONENT_TIME = 5000;
40
40
  export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
41
41
  const {
42
42
  className,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/ipc-player-integration",
3
- "version": "0.0.1-beta-31",
3
+ "version": "0.0.1-beta-33",
4
4
  "description": "IPC 播放器功能集成",
5
5
  "main": "lib/index",
6
6
  "files": [
@@ -35,7 +35,7 @@
35
35
  "dependencies": {
36
36
  "@ray-js/ipc-ptz-zoom": "0.0.2-beta-4",
37
37
  "@ray-js/panel-sdk": "^1.13.1",
38
- "@ray-js/ray-ipc-player": "2.0.20-beta-5",
38
+ "@ray-js/ray-ipc-player": "2.0.20-beta-6",
39
39
  "@ray-js/ray-ipc-utils": "1.1.0-beta-13",
40
40
  "@ray-js/svg": "0.2.0",
41
41
  "clsx": "^1.2.1",