decord/source/modules/go_live/useStreamError.tsx

48 lines
1.5 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 10617
// Function ID: 82813
2026-07-20 16:05:17 +00:00
// Name: useStreamError
2026-07-24 07:16:23 +00:00
// Dependencies: [10595, 8896, 566, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-24 07:16:23 +00:00
// Module 10617 (useStreamError)
2026-07-23 10:11:24 +00:00
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
const require = arg1;
2026-07-24 07:16:23 +00:00
let closure_3 = { [arg1(8896).AVError.STREAM_SOUNDSHARE_FAILED]: 0, [arg1(8896).AVError.STREAM_SEND_HIGH_PACKET_LOSS]: 1, [arg1(8896).AVError.STREAM_VIEW_HIGH_PACKET_LOSS]: 1, [arg1(8896).AVError.STREAM_SEND_LOW_FPS]: 2, [arg1(8896).AVError.STREAM_VIEW_LOW_FPS]: 2, [arg1(8896).AVError.STREAM_BAD_NETWORK_QUALITY]: 3 };
2026-07-23 10:11:24 +00:00
const result = require("initialize").fileFinishedImporting("modules/go_live/useStreamError.tsx");
2026-07-20 16:05:17 +00:00
export default function useStreamError(id) {
id = id.id;
2026-07-23 10:11:24 +00:00
const items = [_createForOfIteratorHelperLoose];
2026-07-20 16:05:17 +00:00
const items1 = [id];
2026-07-23 10:11:24 +00:00
return id(566).useStateFromStores(items, () => {
const activeErrors = outer1_2.getActiveErrors();
2026-07-20 16:05:17 +00:00
const found = Array.from(activeErrors.values()).filter((streamKey) => {
let tmp = "streamKey" in streamKey;
if (tmp) {
2026-07-23 10:11:24 +00:00
tmp = streamKey.streamKey === outer1_0;
2026-07-20 16:05:17 +00:00
}
if (tmp) {
2026-07-23 10:11:24 +00:00
tmp = null != outer2_3[streamKey.type];
2026-07-20 16:05:17 +00:00
}
return tmp;
});
const first = found.sort((arg0, arg1) => {
let num = 0;
2026-07-23 10:11:24 +00:00
if (null != outer2_3[arg0.type]) {
2026-07-20 16:05:17 +00:00
num = tmp;
}
let num2 = 0;
2026-07-23 10:11:24 +00:00
if (null != outer2_3[arg1.type]) {
2026-07-20 16:05:17 +00:00
num2 = tmp2;
}
return num - num2;
})[0];
let type;
if (null != first) {
type = first.type;
}
return type;
}, items1);
};