Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
60 lines
2.1 KiB
TypeScript
60 lines
2.1 KiB
TypeScript
// Module ID: 9748
|
|
// Function ID: 9749
|
|
// Name: useVideoReadyTimeout
|
|
// Dependencies: [19, 1091, 1953, 9747, 4693, 9749, 9752, 2]
|
|
// Exports: default
|
|
|
|
// Module 9748 (useVideoReadyTimeout)
|
|
import DurationsDefault from "Durations" /* 1091 */;
|
|
import VideoStreamReadyActionCreators from "VideoStreamReadyActionCreators" /* 9752 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
require = fn;
|
|
let closure_3 = 20 * DurationsDefault.Millis.SECOND;
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("modules/errors/hooks/useVideoReadyTimeout.tsx");
|
|
|
|
export default function useVideoReadyTimeout(streamId) {
|
|
streamId = streamId.streamId;
|
|
const userId = streamId.userId;
|
|
({ videoSpinnerContext, streamKey } = streamId);
|
|
const loading = streamId.loading;
|
|
let flag = streamId.paused;
|
|
if (flag === undefined) {
|
|
flag = false;
|
|
}
|
|
let STREAM;
|
|
const timeout = new streamId(userId[2]).Timeout();
|
|
streamKey.useRef(timeout);
|
|
if (videoSpinnerContext !== streamId(userId[3]).VideoSpinnerContext.SELF_STREAM) {
|
|
if (videoSpinnerContext !== tmp(tmp2[3]).VideoSpinnerContext.REMOTE_STREAM) {
|
|
STREAM = tmp(tmp2[4]).MediaEngineContextTypes.DEFAULT;
|
|
}
|
|
const items = [flag, streamId, loading, STREAM, streamKey, userId];
|
|
const effect = obj.useEffect(() => {
|
|
if (loading) {
|
|
if (!flag) {
|
|
const WindowVisibilityVideoManager = streamId(userId[5]).WindowVisibilityVideoManager;
|
|
if (WindowVisibilityVideoManager.isIncomingVideoEnabled()) {
|
|
const current = ref.current;
|
|
current.start(loading, () => {
|
|
streamId(userId[6]).videoStreamTimedOut(current, closure_1_1, STREAM, streamKey);
|
|
});
|
|
return () => {
|
|
current.stop();
|
|
};
|
|
}
|
|
}
|
|
}
|
|
}, items);
|
|
const obj2 = { onReady: null };
|
|
const items1 = [userId, STREAM];
|
|
obj2.onReady = obj.useCallback(() => {
|
|
const current = ref.current;
|
|
current.stop();
|
|
const result = VideoStreamReadyActionCreators.clearVideoStreamTimeout(STREAM, userId);
|
|
}, items1);
|
|
return obj2;
|
|
}
|
|
STREAM = tmp(tmp2[4]).MediaEngineContextTypes.STREAM;
|
|
};
|