26 lines
953 B
TypeScript
26 lines
953 B
TypeScript
// Metro module 10568 (f10569).
|
|
import AVErrorStore from "../errors/av_errors/AVErrorStore";
|
|
import { AVError } from "../errors/av_errors/AVError";
|
|
import { useStateFromStores } from "../../_bundle/Module589";
|
|
const r15 = {};
|
|
r15[AVError.STREAM_SOUNDSHARE_FAILED] = 0;
|
|
r15[AVError.STREAM_SEND_HIGH_PACKET_LOSS] = 1;
|
|
r15[AVError.STREAM_VIEW_HIGH_PACKET_LOSS] = 1;
|
|
r15[AVError.STREAM_SEND_LOW_FPS] = 2;
|
|
r15[AVError.STREAM_VIEW_LOW_FPS] = 2;
|
|
r15[AVError.STREAM_BAD_NETWORK_QUALITY] = 3;
|
|
let c7104_3 = r15;
|
|
export default function useStreamError({ id }) {
|
|
return useStateFromStores([AVErrorStore], () => Array.from(AVErrorStore.getActiveErrors().values()).filter((item) => "streamKey" in item && item.streamKey === id && c7104_3[item.type] != null).sort((a, b) => {
|
|
let r3 = c7104_3[a.type];
|
|
if (r3 == null) {
|
|
r3 = 0;
|
|
}
|
|
let r9 = c7104_3[b.type];
|
|
if (r9 == null) {
|
|
r9 = 0;
|
|
}
|
|
return r3 - r9;
|
|
})[0]?.type, [id]);
|
|
};
|