Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
48 lines
1.7 KiB
TypeScript
48 lines
1.7 KiB
TypeScript
// Module ID: 17324
|
|
// Function ID: 17325
|
|
// Name: useHideSelfVideo
|
|
// Dependencies: [502, 1908, 1074, 4661, 504, 9218, 2]
|
|
// Exports: default
|
|
|
|
// Module 17324 (useHideSelfVideo)
|
|
import AudioActionCreatorsDefault from "AudioActionCreators" /* 9218 */;
|
|
import AuthenticationStore from "AuthenticationStore" /* 502 */;
|
|
import MediaEngineStore from "MediaEngineStore" /* 1908 */;
|
|
|
|
const require = fn;
|
|
const VideoToggleState = fn(1074).VideoToggleState;
|
|
const Constants = fn(4661);
|
|
({ MediaEngineContextTypes: metroRequire, Features: closure_7 } = Constants);
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/calls/useHideSelfVideo.tsx");
|
|
|
|
export default function useHideSelfVideo(arg0) {
|
|
let DEFAULT = arg1;
|
|
if (arg1 === undefined) {
|
|
DEFAULT = constants.DEFAULT;
|
|
}
|
|
const items = [AuthenticationStore];
|
|
const stateFromStores = DEFAULT(504).useStateFromStores(items, () => id.getId());
|
|
const obj = DEFAULT(504);
|
|
const items1 = [MediaEngineStore];
|
|
const stateFromStores1 = DEFAULT(504).useStateFromStores(items1, () => MediaEngineStore.supports(constants.DISABLE_VIDEO));
|
|
const obj2 = DEFAULT(504);
|
|
const items2 = [MediaEngineStore];
|
|
const items3 = [stateFromStores, DEFAULT];
|
|
let tmp5 = null == arg0;
|
|
const stateFromStores2 = DEFAULT(504).useStateFromStores(items2, () => MediaEngineStore.isLocalVideoDisabled(stateFromStores, DEFAULT), items3);
|
|
if (!tmp5) {
|
|
tmp5 = arg0 === stateFromStores;
|
|
}
|
|
if (tmp5) {
|
|
tmp5 = stateFromStores1;
|
|
}
|
|
const items4 = [
|
|
tmp5,
|
|
stateFromStores2,
|
|
(arg0) => {
|
|
AudioActionCreatorsDefault.setDisableLocalVideo(stateFromStores, arg0 ? VideoToggleState.DISABLED : VideoToggleState.MANUAL_ENABLED, DEFAULT);
|
|
}
|
|
];
|
|
return items4;
|
|
};
|