2026-09-11 19:12:58 +00:00
|
|
|
// Module ID: 9699
|
|
|
|
|
// Function ID: 9700
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: useVideoReadyTimeout
|
2026-09-11 19:12:58 +00:00
|
|
|
// Dependencies: [19, 1090, 1952, 9698, 4661, 9700, 9703, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-09-11 19:12:58 +00:00
|
|
|
// Module 9699 (useVideoReadyTimeout)
|
2026-09-10 05:38:07 +00:00
|
|
|
import DurationsDefault from "Durations" /* 1090 */;
|
2026-09-11 19:12:58 +00:00
|
|
|
import VideoStreamReadyActionCreators from "VideoStreamReadyActionCreators" /* 9703 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import noop from "module_19" /* 19 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
require = fn;
|
|
|
|
|
let closure_3 = 20 * DurationsDefault.Millis.SECOND;
|
|
|
|
|
const size = fn(2);
|
|
|
|
|
let result = size.fileFinishedImporting("modules/errors/hooks/useVideoReadyTimeout.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
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;
|
2026-07-23 10:11:24 +00:00
|
|
|
const timeout = new streamId(userId[2]).Timeout();
|
2026-09-10 05:38:07 +00:00
|
|
|
streamKey.useRef(timeout);
|
2026-07-23 10:11:24 +00:00
|
|
|
if (videoSpinnerContext !== streamId(userId[3]).VideoSpinnerContext.SELF_STREAM) {
|
2026-07-29 08:29:29 +00:00
|
|
|
if (videoSpinnerContext !== tmp(tmp2[3]).VideoSpinnerContext.REMOTE_STREAM) {
|
|
|
|
|
STREAM = tmp(tmp2[4]).MediaEngineContextTypes.DEFAULT;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
const items = [flag, streamId, loading, STREAM, streamKey, userId];
|
2026-07-29 08:29:29 +00:00
|
|
|
const effect = obj.useEffect(() => {
|
2026-07-20 16:05:17 +00:00
|
|
|
if (loading) {
|
|
|
|
|
if (!flag) {
|
|
|
|
|
const WindowVisibilityVideoManager = streamId(userId[5]).WindowVisibilityVideoManager;
|
|
|
|
|
if (WindowVisibilityVideoManager.isIncomingVideoEnabled()) {
|
|
|
|
|
const current = ref.current;
|
|
|
|
|
current.start(loading, () => {
|
2026-09-10 05:38:07 +00:00
|
|
|
streamId(userId[6]).videoStreamTimedOut(current, closure_1_1, STREAM, streamKey);
|
2026-07-20 16:05:17 +00:00
|
|
|
});
|
|
|
|
|
return () => {
|
|
|
|
|
current.stop();
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, items);
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj2 = { onReady: null };
|
2026-07-20 16:05:17 +00:00
|
|
|
const items1 = [userId, STREAM];
|
2026-09-10 05:38:07 +00:00
|
|
|
obj2.onReady = obj.useCallback(() => {
|
2026-07-20 16:05:17 +00:00
|
|
|
const current = ref.current;
|
|
|
|
|
current.stop();
|
2026-09-10 05:38:07 +00:00
|
|
|
const result = VideoStreamReadyActionCreators.clearVideoStreamTimeout(STREAM, userId);
|
2026-07-20 16:05:17 +00:00
|
|
|
}, items1);
|
2026-09-10 05:38:07 +00:00
|
|
|
return obj2;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
STREAM = tmp(tmp2[4]).MediaEngineContextTypes.STREAM;
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|