@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
|
-
|
|
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;
|
package/es/Player/live_heart.js
CHANGED
|
@@ -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 {
|
|
5
|
-
import { Context } from './context';
|
|
4
|
+
import { useRef } from 'react';
|
|
6
5
|
import Events from './event/eventName';
|
|
7
6
|
function useLiveHeart(_ref) {
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
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() {
|