@cloud-app-dev/vidc 3.2.6 → 3.2.7

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.
@@ -1,4 +1,8 @@
1
- declare function useLiveHeart({ isLive }: {
1
+ import type Api from './api';
2
+ import type VideoEventInstance from './event';
3
+ declare function useLiveHeart({ api, event, isLive }: {
4
+ api: Api;
5
+ event: VideoEventInstance;
2
6
  isLive: boolean;
3
7
  }): void;
4
8
  export default useLiveHeart;
@@ -1,14 +1,12 @@
1
1
  import _useRafInterval from "ahooks/es/useRafInterval";
2
2
  import _useUpdateEffect from "ahooks/es/useUpdateEffect";
3
3
  import _useDocumentVisibility from "ahooks/es/useDocumentVisibility";
4
- import { useContext, useRef } from 'react';
5
- import { Context } from './context';
4
+ import { useRef } from 'react';
6
5
  import Events from './event/eventName';
7
6
  function useLiveHeart(_ref) {
8
- var isLive = _ref.isLive;
9
- var _useContext = useContext(Context),
10
- api = _useContext.api,
11
- event = _useContext.event;
7
+ var api = _ref.api,
8
+ event = _ref.event,
9
+ isLive = _ref.isLive;
12
10
  var documentVisibility = _useDocumentVisibility();
13
11
  var cTimeRef = useRef(null);
14
12
  var run = function run() {
@@ -189,6 +189,8 @@ var SinglePlayer = /*#__PURE__*/React.forwardRef(function (_a, ref) {
189
189
  });
190
190
  // 直播缓冲追回
191
191
  useLiveHeart({
192
+ api: api,
193
+ event: event,
192
194
  isLive: isLive
193
195
  });
194
196
  var videoProps = {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "private": false,
3
3
  "name": "@cloud-app-dev/vidc",
4
4
  "description": "Video Image Data Componennts",
5
- "version": "3.2.6",
5
+ "version": "3.2.7",
6
6
  "scripts": {
7
7
  "start": "dumi dev",
8
8
  "docs:build": "dumi build",