Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
40 lines
1.6 KiB
TypeScript
40 lines
1.6 KiB
TypeScript
// Module ID: 17035
|
|
// Function ID: 17036
|
|
// Name: useExternalPipEnabler
|
|
// Dependencies: [4590, 502, 4597, 504, 17036, 2]
|
|
// Exports: default
|
|
|
|
// Module 17035 (useExternalPipEnabler)
|
|
import ExternalPipEnablerState from "ExternalPipEnablerState" /* 17036 */;
|
|
import ChannelRTCStore from "ChannelRTCStore" /* 4590 */;
|
|
import AuthenticationStore from "AuthenticationStore" /* 502 */;
|
|
import RTCConnectionStore from "RTCConnectionStore" /* 4597 */;
|
|
|
|
require = fn;
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/external_pip/useExternalPipEnabler.android.tsx");
|
|
|
|
export default function useExternalPIPEnabler(disabled) {
|
|
disabled = disabled.disabled;
|
|
const items = [ChannelRTCStore, RTCConnectionStore, AuthenticationStore];
|
|
const items1 = [disabled];
|
|
return disabled(504).useStateFromStoresObject(items, () => {
|
|
const channelId = RTCConnectionStore.getChannelId();
|
|
if (null != channelId) {
|
|
if (!disabled) {
|
|
const videoParticipants = ChannelRTCStore.getVideoParticipants(channelId);
|
|
let tmp2 = videoParticipants.filter((localVideoDisabled) => !localVideoDisabled.localVideoDisabled).length > 0;
|
|
if (!tmp2) {
|
|
const streamParticipants = ChannelRTCStore.getStreamParticipants(channelId);
|
|
const found = streamParticipants.filter((user) => user.user.id !== id.getId());
|
|
tmp2 = null != found.find((streamId) => null != streamId.streamId);
|
|
}
|
|
const obj2 = {};
|
|
const merged = Object.assign(ExternalPipEnablerState.DEFAULT_STATE);
|
|
obj2.externalPipEnabled = tmp2;
|
|
return obj2;
|
|
}
|
|
}
|
|
return ExternalPipEnablerState.DEFAULT_STATE;
|
|
}, items1);
|
|
};
|