@ray-js/ipc-player-integration 0.0.33-beta.1 → 0.0.34

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.
@@ -4,7 +4,7 @@ const _excluded = ["title", "duration"];
4
4
  import { getCameraConfigInfo } from '@ray-js/ray-ipc-utils';
5
5
  import { IntercomMode, MuteMode, ClarityType } from '@ray-js/ray-ipc-utils/lib/interface';
6
6
  import { createUseCtx } from './ctx';
7
- import { FullSmallIntercom, VerticalSmallIntercom, BatteryFull, Battery, Screenshot, TempHumidity, Signal4G, RecordVideo, FullScreen, VideoBitKBP, Muted, Floodlight, Siren, Resolution, Ptz, MultiPtz, TileTip, PtzMoveableTip, LandscapeTip, TileActions, MoveablePtzControl, SwitchLayout, ToggleVerticalFull, RealTimeMagnification } from '../widgets';
7
+ import { FullSmallIntercom, VerticalSmallIntercom, BatteryFull, Battery, Screenshot, TempHumidity, Signal4G, RecordVideo, FullScreen, VideoBitKBP, Muted, Resolution, Ptz, MultiPtz, TileTip, PtzMoveableTip, LandscapeTip, TileActions, MoveablePtzControl, SwitchLayout, ToggleVerticalFull, RealTimeMagnification } from '../widgets';
8
8
  import { authorizeStatus } from '../utils/authorize';
9
9
  import { landscapeTipId, moveablePtzControlId, multiPtzId, ptzMoveableTipId, tileActionsId, tileTipId } from '../ui/constant';
10
10
  import { multiPrefix } from '../widgets/multiCamera/constants';
@@ -41,12 +41,6 @@ export const defaultBottomLeftContent = [{
41
41
  }, {
42
42
  id: 'Muted',
43
43
  content: Muted
44
- }, {
45
- id: 'Floodlight',
46
- content: Floodlight
47
- }, {
48
- id: 'Siren',
49
- content: Siren
50
44
  }, {
51
45
  id: 'VerticalSmallIntercom',
52
46
  content: VerticalSmallIntercom
@@ -11,7 +11,7 @@ export type IpcContext = {
11
11
  };
12
12
  export type RetAtom<T> = PrimitiveAtom<T> & WithInitialValue<T>;
13
13
  export type ScreenType = 'full' | 'vertical';
14
- export type WidgetId = 'BatteryFull' | 'TempHumidity' | 'VideoBitKBP' | 'FullSmallIntercom' | 'Screenshot' | 'RecordVideo' | 'Muted' | 'Floodlight' | 'Siren' | 'VerticalSmallIntercom' | 'Ptz' | 'Resolution' | 'FullScreen' | 'moveablePtzControlId';
14
+ export type WidgetId = 'BatteryFull' | 'TempHumidity' | 'VideoBitKBP' | 'FullSmallIntercom' | 'Screenshot' | 'RecordVideo' | 'Muted' | 'VerticalSmallIntercom' | 'Ptz' | 'Resolution' | 'FullScreen' | 'moveablePtzControlId';
15
15
  export declare const enum PlayerStreamStatus {
16
16
  UnknownException = -1000,
17
17
  ConnectSuccess = 1001,
@@ -28,8 +28,6 @@ export declare const widgetLabs: {
28
28
  readonly RESOLUTION: "Resolution";
29
29
  readonly FULL_RESOLUTION_CONTROL: "FullResolutionControl";
30
30
  readonly MUTED: "Muted";
31
- readonly FLOODLIGHT: "Floodlight";
32
- readonly SIREN: "Siren";
33
31
  readonly PTZ: "Ptz";
34
32
  readonly PTZ_CONTROL_TIP: "PtzControlTip";
35
33
  readonly MOVE_INTERACTIVE_CONTROL: "MoveInteractiveControl";
@@ -29,8 +29,6 @@ export const widgetLabs = {
29
29
  RESOLUTION: 'Resolution',
30
30
  FULL_RESOLUTION_CONTROL: 'FullResolutionControl',
31
31
  MUTED: 'Muted',
32
- FLOODLIGHT: 'Floodlight',
33
- SIREN: 'Siren',
34
32
  PTZ: 'Ptz',
35
33
  PTZ_CONTROL_TIP: 'PtzControlTip',
36
34
  MOVE_INTERACTIVE_CONTROL: 'MoveInteractiveControl',
package/lib/ui/ui.d.ts CHANGED
@@ -37,7 +37,6 @@ type Props = {
37
37
  showFlowLowTip?: boolean;
38
38
  extend?: Record<string, any>;
39
39
  refreshElement?: boolean;
40
- autoWakeUp?: boolean;
41
40
  };
42
41
  export declare const IPCPlayerIntegration: React.MemoExoticComponent<(props: Props) => React.JSX.Element>;
43
42
  export {};
package/lib/ui/ui.js CHANGED
@@ -67,8 +67,7 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
67
67
  limitFlow = false,
68
68
  showFlowLowTip = false,
69
69
  extend = {},
70
- refreshElement = false,
71
- autoWakeUp = false
70
+ refreshElement = false
72
71
  } = props;
73
72
  const {
74
73
  event
@@ -704,6 +703,8 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
704
703
  // 重新开始计时
705
704
  // @ts-ignore
706
705
  timer.current = setTimeout(() => {
706
+ // 竖屏全屏模式下控件常驻,不触发隐藏
707
+ if (isVerticalFullLayout && screenType === 'vertical') return;
707
708
  triggerEvent(hideAllComponent);
708
709
  }, HIDE_COMPONENT_TIME);
709
710
  });
@@ -917,7 +918,6 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
917
918
  playerRoute: playerRoute,
918
919
  defaultAutoPlay: defaultAutoPlay,
919
920
  limitFlow: limitFlow,
920
- autoWakeUp: autoWakeUp,
921
921
  extend: _objectSpread(_objectSpread({
922
922
  backgroundColor: '#262626'
923
923
  }, instance.multiCameraCtx.extendProps), extend)
@@ -8,8 +8,6 @@ export * from './fullScreen';
8
8
  export * from './videoBitKBP';
9
9
  export * from './voiceIntercom';
10
10
  export * from './muted';
11
- export * from './floodlight';
12
- export * from './siren';
13
11
  export * from './ptz';
14
12
  export * from './resolution';
15
13
  export * from './fullSmallIntercom';
@@ -8,8 +8,6 @@ export * from './fullScreen';
8
8
  export * from './videoBitKBP';
9
9
  export * from './voiceIntercom';
10
10
  export * from './muted';
11
- export * from './floodlight';
12
- export * from './siren';
13
11
  export * from './ptz';
14
12
  export * from './resolution';
15
13
  export * from './fullSmallIntercom';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/ipc-player-integration",
3
- "version": "0.0.33-beta.1",
3
+ "version": "0.0.34",
4
4
  "description": "IPC 融合播放器",
5
5
  "main": "lib/index",
6
6
  "files": [
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@ray-js/direction-control": "^0.0.8",
39
39
  "@ray-js/ipc-ptz-zoom": "^0.0.3",
40
- "@ray-js/ray-ipc-player": "2.1.1-beta.1",
40
+ "@ray-js/ray-ipc-player": "^2.1.0",
41
41
  "@ray-js/ray-ipc-utils": "^1.1.15",
42
42
  "@ray-js/svg": "0.2.0",
43
43
  "clsx": "^1.2.1",
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { ComponentConfigProps } from '../../interface';
3
- import './floodlight.less';
4
- export declare const Floodlight: (props: ComponentConfigProps) => React.JSX.Element | null;
@@ -1,55 +0,0 @@
1
- import { View, Text } from '@ray-js/ray';
2
- import React, { useContext } from 'react';
3
- import clsx from 'clsx';
4
- import { useDpState } from '../../hooks';
5
- import { useStore } from '../../ctx/store';
6
- import { UIEventContext } from '../../ui/context';
7
- import { widgetLabs, widgetClick, pauseTimeToHideAllComponent, startTimeToHideAllComponent } from '../../ui/constant';
8
- import './floodlight.less';
9
- const FLOODLIGHT_SWITCH_DP_CODE = 'floodlight_switch';
10
- export const Floodlight = props => {
11
- const {
12
- devId,
13
- screenType: screenTypeAtom,
14
- className,
15
- event: propsEvent
16
- } = props;
17
- const {
18
- event: ctxEvent
19
- } = useContext(UIEventContext);
20
- const event = propsEvent !== null && propsEvent !== void 0 ? propsEvent : ctxEvent;
21
- const {
22
- screenType,
23
- brandColor
24
- } = useStore({
25
- screenType: screenTypeAtom,
26
- brandColor: props.brandColor
27
- });
28
- const [state, dpSchema, sendDp] = useDpState({
29
- devId,
30
- dpCodes: [FLOODLIGHT_SWITCH_DP_CODE]
31
- });
32
- const supported = !!(dpSchema !== null && dpSchema !== void 0 && dpSchema[FLOODLIGHT_SWITCH_DP_CODE]);
33
- const enabled = !!state[FLOODLIGHT_SWITCH_DP_CODE];
34
- if (screenType !== 'full' || !supported) {
35
- return null;
36
- }
37
- return /*#__PURE__*/React.createElement(View, {
38
- className: clsx(className),
39
- onClick: () => {
40
- event.emit(widgetClick, {
41
- widgetId: widgetLabs.FLOODLIGHT
42
- });
43
- event.emit(pauseTimeToHideAllComponent);
44
- sendDp({
45
- [FLOODLIGHT_SWITCH_DP_CODE]: !enabled
46
- });
47
- event.emit(startTimeToHideAllComponent);
48
- }
49
- }, /*#__PURE__*/React.createElement(Text, {
50
- className: clsx('icon-panel', 'icon-panel-deng', 'ipc-player-plugin-floodlight-text-icon'),
51
- style: {
52
- color: enabled ? brandColor : undefined
53
- }
54
- }));
55
- };
@@ -1,4 +0,0 @@
1
- .ipc-player-plugin-floodlight-text-icon {
2
- color: var(--iconColor);
3
- font-size: calc(var(--iconPlayerSize) * var(--ipc-player-size-scale, 1)) !important;
4
- }
@@ -1 +0,0 @@
1
- export * from './floodlight';
@@ -1 +0,0 @@
1
- export * from './floodlight';
@@ -1 +0,0 @@
1
- export * from './siren';
@@ -1 +0,0 @@
1
- export * from './siren';
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { ComponentConfigProps } from '../../interface';
3
- import './siren.less';
4
- export declare const Siren: (props: ComponentConfigProps) => React.JSX.Element | null;
@@ -1,55 +0,0 @@
1
- import { View, Text } from '@ray-js/ray';
2
- import React, { useContext } from 'react';
3
- import clsx from 'clsx';
4
- import { useDpState } from '../../hooks';
5
- import { useStore } from '../../ctx/store';
6
- import { UIEventContext } from '../../ui/context';
7
- import { widgetLabs, widgetClick, pauseTimeToHideAllComponent, startTimeToHideAllComponent } from '../../ui/constant';
8
- import './siren.less';
9
- const SIREN_SWITCH_DP_CODE = 'siren_switch';
10
- export const Siren = props => {
11
- const {
12
- devId,
13
- screenType: screenTypeAtom,
14
- className,
15
- event: propsEvent
16
- } = props;
17
- const {
18
- event: ctxEvent
19
- } = useContext(UIEventContext);
20
- const event = propsEvent !== null && propsEvent !== void 0 ? propsEvent : ctxEvent;
21
- const {
22
- screenType,
23
- brandColor
24
- } = useStore({
25
- screenType: screenTypeAtom,
26
- brandColor: props.brandColor
27
- });
28
- const [state, dpSchema, sendDp] = useDpState({
29
- devId,
30
- dpCodes: [SIREN_SWITCH_DP_CODE]
31
- });
32
- const supported = !!(dpSchema !== null && dpSchema !== void 0 && dpSchema[SIREN_SWITCH_DP_CODE]);
33
- const enabled = !!state[SIREN_SWITCH_DP_CODE];
34
- if (screenType !== 'full' || !supported) {
35
- return null;
36
- }
37
- return /*#__PURE__*/React.createElement(View, {
38
- className: clsx(className),
39
- onClick: () => {
40
- event.emit(widgetClick, {
41
- widgetId: widgetLabs.SIREN
42
- });
43
- event.emit(pauseTimeToHideAllComponent);
44
- sendDp({
45
- [SIREN_SWITCH_DP_CODE]: !enabled
46
- });
47
- event.emit(startTimeToHideAllComponent);
48
- }
49
- }, /*#__PURE__*/React.createElement(Text, {
50
- className: clsx('icon-panel', 'icon-panel-jingdi', 'ipc-player-plugin-siren-text-icon'),
51
- style: {
52
- color: enabled ? brandColor : undefined
53
- }
54
- }));
55
- };
@@ -1,4 +0,0 @@
1
- .ipc-player-plugin-siren-text-icon {
2
- color: var(--iconColor);
3
- font-size: calc(var(--iconPlayerSize) * var(--ipc-player-size-scale, 1)) !important;
4
- }