@ray-js/ray-ipc-player 2.0.18-beta-7 → 2.0.19-beta-beta-1

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 (2) hide show
  1. package/lib/index.js +7 -5
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -17,7 +17,6 @@ const Player = props => {
17
17
  onChangeStreamStatus,
18
18
  onPlayerTap,
19
19
  onZoomChange,
20
- onSessionDidDisconnected,
21
20
  onCameraPreviewFailure,
22
21
  onCameraNotifyWeakNetwork,
23
22
  onInitPreview,
@@ -52,7 +51,7 @@ const Player = props => {
52
51
  const [playState, setPlayState] = useImmer({
53
52
  connectState: false,
54
53
  // 连接状态
55
- loadingState: false,
54
+ loadingState: true,
56
55
  // 加载状态
57
56
  errorState: false,
58
57
  // 异常状态
@@ -110,6 +109,7 @@ const Player = props => {
110
109
 
111
110
  // 设备离线、隐私模式
112
111
  useEffect(() => {
112
+ console.log(onlineStatus, 'onlineStatus');
113
113
  setPlayState(d => {
114
114
  d.deviceOnlineState = onlineStatus;
115
115
  d.errorState = privateState;
@@ -145,6 +145,8 @@ const Player = props => {
145
145
 
146
146
  // 创建ipc实例
147
147
  const createIpcCtx = () => {
148
+ console.log('创建ipc实例');
149
+ console.log(onCtx, 'onCtx');
148
150
  onCtx && onCtx({
149
151
  ctx: ipcCtx.current,
150
152
  retry
@@ -374,7 +376,7 @@ const Player = props => {
374
376
  borderColor: borderColor,
375
377
  borderWidth: borderWidth,
376
378
  backgroundColor: bgColor
377
- }, extend)), /*#__PURE__*/React.createElement(View, {
379
+ }, extend)), /*#__PURE__*/React.createElement(CoverView, {
378
380
  style: {
379
381
  borderRadius: "".concat(borderRadius)
380
382
  },
@@ -388,7 +390,7 @@ const Player = props => {
388
390
  borderRadius: "".concat(borderRadius)
389
391
  },
390
392
  className: clsx(Styles.bg_center, Styles.state_label, !playState.errorState && Styles.hide)
391
- }, privateState ? /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
393
+ }, privateState && /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
392
394
  className: Styles.device_sleep
393
395
  }, locals.getLang('ipc_player_device_sleep')), /*#__PURE__*/React.createElement(View, {
394
396
  className: Styles.re_wake_camera
@@ -399,7 +401,7 @@ const Player = props => {
399
401
  105: false
400
402
  }, devId);
401
403
  }
402
- }, locals.getLang('ipc_player_re_wake_camera'))) : /*#__PURE__*/React.createElement(View, {
404
+ }, locals.getLang('ipc_player_re_wake_camera'))), !privateState && /*#__PURE__*/React.createElement(View, {
403
405
  className: clsx(Styles.err_container)
404
406
  }, /*#__PURE__*/React.createElement(View, {
405
407
  className: clsx(Styles.iconfont, Styles.icon_tishi, !playState.deviceOnlineState && Styles.hide)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/ray-ipc-player",
3
- "version": "2.0.18-beta-7",
3
+ "version": "2.0.19-beta-beta-1",
4
4
  "description": "ray小程序播放器",
5
5
  "keywords": [
6
6
  "tuya-miniapp",