666 lines
37 KiB
TypeScript
666 lines
37 KiB
TypeScript
/* Metro module 16140; source: modules/clips/ClipsManager.tsx; dependencies: [5, 6, 7, 15, 17, 18, 4289, 1226, 4259, 4294, 4395, 4265, 4281, 661, 4286, 12383, 4406, 4285, 683, 4654, 3829, 694, 12384, 3767, 4284, 477, 12382, 4860, 2] */
|
|
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import AnalyticsUtils from '../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
|
|
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
|
|
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import MediaEngineStore from '../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
|
|
import ClipsStore from './ClipsStore.tsx'; /* Metro dependency 4265 */
|
|
import RTCConnectionStore from '../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
|
|
import StreamRTCConnectionStore from '../../stores/StreamRTCConnectionStore.tsx'; /* Metro dependency 4395 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as PlatformUtilsModule from '../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
|
|
import * as ClipsConstantsModule from './ClipsConstants.tsx'; /* Metro dependency 4281 */
|
|
import * as ClipsTypesModule from './ClipsTypes.tsx'; /* Metro dependency 4284 */
|
|
import * as StreamKeyUtilsModule from '../go_live/utils/StreamKeyUtils.tsx'; /* Metro dependency 4285 */
|
|
import * as ConstantsModule from '../go_live/Constants.tsx'; /* Metro dependency 4286 */
|
|
import * as SystemAnalyticsStoreNativeModule from '../system_analytics/SystemAnalyticsStore.native.tsx'; /* Metro dependency 4289 */
|
|
import * as MediaEngineModule from '../../external/discord_common/js/packages/media-engine/index.tsx'; /* Metro dependency 4406 */
|
|
import * as ClipsExperimentModule from './ClipsExperiment.tsx'; /* Metro dependency 12383 */
|
|
|
|
function _fun124636(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:6, offset: 0x025bf93f, size: 431 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ClipsConstantsModule;
|
|
const env0_16 = value.WINDOWS_HARDWARE_AUTO_ENABLE_GPU_REGEX;
|
|
const env0_17 = value.WINDOWS_HARDWARE_MINIMUM_GPU_REGEX;
|
|
const env0_18 = value.CLIPS_HARDWARE_CLASSIFICATION_VERSION;
|
|
value = require(661) /* metro dependency 661: Constants */;
|
|
const env0_19 = value.AnalyticEvents;
|
|
const env0_20 = value.RTCConnectionStates;
|
|
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
|
value = _fun124640(value);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/clips/ClipsManager.tsx');
|
|
exports.default = value;
|
|
function _isNativeReflectConstruct_124637() { // fn#124637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:455, offset: 0x025bfaee, size: 98 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_124637_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun124640(a0) { // fn#124640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:654, offset: 0x025bfb50, size: 431 bytes, params: 2, frame: 17
|
|
const ClipsManager_1246412 = ClipsManager_124641;
|
|
Inherits(ClipsManager_1246412, a0);
|
|
const items2 = [{key: 'handleRTCConnectionState', value: value_124656}];
|
|
items2[1] = {key: 'handleRTCUsersUpdate', value: function(a0) {
|
|
var env0_0 = this;
|
|
var userIds = a0.userIds;
|
|
if (a0.context === require(dependencyMap[16]).MediaEngineContextTypes.DEFAULT) {
|
|
userIds.forEach(_fun124658);
|
|
}
|
|
}};
|
|
items2[2] = {key: 'handleRTCConnectionFlags', value: value_124659};
|
|
items2[3] = {key: 'handleClipsInitFailure', value: value_124660};
|
|
items2[4] = {key: 'maybeShowClipsWarning', value: value_124661};
|
|
items2[5] = {key: 'handleClipsAllowVoiceRecordingUpdate', value: value_124662};
|
|
items2[6] = {key: 'handlePostConnectionOpen', value: value_124664};
|
|
items2[7] = {key: 'loadClipsFromStorage', value: function() {
|
|
}};
|
|
items2[8] = {key: 'handleRTCConnectionVideo', value: value_124667};
|
|
let env0_0 = Module00005(_fun124669);
|
|
items2[9] = {key: 'classifyHardwareAndTrack', value: value_124675};
|
|
items2[10] = {key: 'classifyHardware', value: value_124676};
|
|
items2[11] = {key: 'applyUserVoiceRecording', value: value_124679};
|
|
items2[12] = {key: 'applyUserSoundboardRecording', value: value_124680};
|
|
items2[13] = {key: 'applyStreamRecording', value: value_124681};
|
|
return CreateClass(ClipsManager_1246412, items2);
|
|
function ClipsManager_124641(a0) { // fn#124641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:666, offset: 0x025bfcff, size: 314 bytes, params: 2, frame: 20
|
|
var r0;
|
|
var Reflect;
|
|
let value = copyRestArgs(0, undefined);
|
|
let binding = env1_5;
|
|
binding(this, ClipsManager_124641);
|
|
const items2 = [];
|
|
arraySpread(items2, value, 0, items2);
|
|
value = env1_8(ClipsManager_124641);
|
|
binding = env1_7;
|
|
if (_isNativeReflectConstruct_124637()) {
|
|
Reflect = global.Reflect;
|
|
value = Reflect.construct(value, items2, env1_8(this).constructor);
|
|
r0 = value;
|
|
} else {
|
|
value = value.apply(this, items2);
|
|
r0 = value;
|
|
}
|
|
value = binding(this, r0);
|
|
value.actions = {POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_124642,
|
|
RTC_CONNECTION_FLAGS: RTC_CONNECTION_FLAGS_124643, RTC_CONNECTION_USERS_MERGED: RTC_CONNECTION_USERS_MERGED,
|
|
CLIPS_INIT_FAILURE: CLIPS_INIT_FAILURE_124645, CLIPS_SETTINGS_UPDATE: CLIPS_SETTINGS_UPDATE_124646,
|
|
CLIPS_ALLOW_VOICE_RECORDING_UPDATE: CLIPS_ALLOW_VOICE_RECORDING_UPDATE, STREAM_START: STREAM_START_124648,
|
|
STREAM_DELETE: STREAM_DELETE_124649, STREAM_CLOSE: STREAM_CLOSE_124650,
|
|
RUNNING_GAME_TOGGLE_DETECTION: RUNNING_GAME_TOGGLE_DETECTION, RUNNING_GAMES_CHANGE: RUNNING_GAMES_CHANGE_124652,
|
|
CLIPS_RESTART: CLIPS_RESTART, RTC_CONNECTION_VIDEO: RTC_CONNECTION_VIDEO_124654,
|
|
RTC_CONNECTION_STATE: RTC_CONNECTION_STATE_124655};
|
|
return value;
|
|
function ClipsManager_124641POST_CONNECTION_OPEN() { // fn#124642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:920, owner: ClipsManager_124641.POST_CONNECTION_OPEN, offset: 0x01148776, size: 19 bytes, params: 1, frame: 9
|
|
return env0_0.handlePostConnectionOpen();
|
|
}
|
|
|
|
function ClipsManager_124641RTC_CONNECTION_FLAGS(a0) { // fn#124643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:974, owner: ClipsManager_124641.RTC_CONNECTION_FLAGS, offset: 0x025bfe39, size: 25 bytes, params: 2, frame: 11
|
|
return env0_0.handleRTCConnectionFlags(a0);
|
|
}
|
|
|
|
function RTC_CONNECTION_USERS_MERGED(a0) { // fn#124644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:1035, owner: ClipsManager_124641.RTC_CONNECTION_USERS_MERGED, offset: 0x025bfe52, size: 25 bytes, params: 2, frame: 11
|
|
return env0_0.handleRTCUsersUpdate(a0);
|
|
}
|
|
|
|
function ClipsManager_124641CLIPS_INIT_FAILURE(a0) { // fn#124645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:1083, owner: ClipsManager_124641.CLIPS_INIT_FAILURE, offset: 0x025bfe6b, size: 25 bytes, params: 2, frame: 11
|
|
return env0_0.handleClipsInitFailure(a0);
|
|
}
|
|
|
|
function ClipsManager_124641CLIPS_SETTINGS_UPDATE(a0) { // fn#124646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:1136, owner: ClipsManager_124641.CLIPS_SETTINGS_UPDATE, offset: 0x025bfe84, size: 23 bytes, params: 2, frame: 11
|
|
return env0_0.applyNativeClipsSettings(a0);
|
|
}
|
|
|
|
function CLIPS_ALLOW_VOICE_RECORDING_UPDATE() { // fn#124647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:1204, owner: ClipsManager_124641.CLIPS_ALLOW_VOICE_RECORDING_UPDATE, offset: 0x025bfe9b, size: 21 bytes, params: 1, frame: 9
|
|
return env0_0.handleClipsAllowVoiceRecordingUpdate();
|
|
}
|
|
|
|
function ClipsManager_124641STREAM_START() { // fn#124648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:1262, owner: ClipsManager_124641.STREAM_START, offset: 0x025bfeb0, size: 19 bytes, params: 1, frame: 9
|
|
return env0_0.applyNativeClipsSettings();
|
|
}
|
|
|
|
function ClipsManager_124641STREAM_DELETE(a0) { // fn#124649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:1309, owner: ClipsManager_124641.STREAM_DELETE, offset: 0x025bfec3, size: 23 bytes, params: 2, frame: 11
|
|
return env0_0.handleStreamEnded(a0);
|
|
}
|
|
|
|
function ClipsManager_124641STREAM_CLOSE(a0) { // fn#124650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:1348, owner: ClipsManager_124641.STREAM_CLOSE, offset: 0x025bfec3, size: 23 bytes, params: 2, frame: 11
|
|
return env0_0.handleStreamEnded(a0);
|
|
}
|
|
|
|
function RUNNING_GAME_TOGGLE_DETECTION(a0) { // fn#124651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:1404, owner: ClipsManager_124641.RUNNING_GAME_TOGGLE_DETECTION, offset: 0x025bfeda, size: 25 bytes, params: 2, frame: 11
|
|
return env0_0.handleClipsInitOnToggleDetection(a0);
|
|
}
|
|
|
|
function ClipsManager_124641RUNNING_GAMES_CHANGE(a0) { // fn#124652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:1466, owner: ClipsManager_124641.RUNNING_GAMES_CHANGE, offset: 0x025bfef3, size: 25 bytes, params: 2, frame: 11
|
|
return env0_0.handleClipsInitOnGamesChange(a0);
|
|
}
|
|
|
|
function CLIPS_RESTART() { // fn#124653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:1517, owner: ClipsManager_124641.CLIPS_RESTART, offset: 0x025bff0c, size: 21 bytes, params: 1, frame: 9
|
|
return env0_0.fireClipsInitEvent();
|
|
}
|
|
|
|
function ClipsManager_124641RTC_CONNECTION_VIDEO(a0) { // fn#124654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:1565, owner: ClipsManager_124641.RTC_CONNECTION_VIDEO, offset: 0x025bff21, size: 25 bytes, params: 2, frame: 11
|
|
return env0_0.handleRTCConnectionVideo(a0);
|
|
}
|
|
|
|
function ClipsManager_124641RTC_CONNECTION_STATE(a0) { // fn#124655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:1619, owner: ClipsManager_124641.RTC_CONNECTION_STATE, offset: 0x025bff3a, size: 23 bytes, params: 2, frame: 11
|
|
return env0_0.handleRTCConnectionState(a0);
|
|
}
|
|
|
|
}
|
|
|
|
function value_124656({context, state, streamKey}) { // fn#124656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:1734, offset: 0x025bff51, size: 273 bytes, params: 2, frame: 18
|
|
var id;
|
|
const MediaEngineContextTypes = (MediaEngineModule).MediaEngineContextTypes;
|
|
var moduleValue2;
|
|
let value = environment.__proto__;
|
|
if (ClipsExperimentModule.areClipsAvailable()) {
|
|
if (state !== RTCConnectionStates.RTC_CONNECTED) {
|
|
return undefined;
|
|
}
|
|
id = AuthenticationStore.getId();
|
|
if (context === MediaEngineContextTypes.DEFAULT) {
|
|
this.applyUserVoiceRecording(id);
|
|
this.applyUserSoundboardRecording(id);
|
|
return undefined;
|
|
}
|
|
if (context !== MediaEngineContextTypes.STREAM) {
|
|
return undefined;
|
|
}
|
|
if (streamKey == null) {
|
|
return undefined;
|
|
}
|
|
moduleValue2 = require(4285) /* metro dependency 4285: StreamKeyUtils */;
|
|
if (moduleValue2.decodeStreamKey(streamKey).ownerId !== id) {
|
|
return undefined;
|
|
}
|
|
value = StreamRTCConnectionStore.getRTCConnection(streamKey);
|
|
if (value == null) {
|
|
return undefined;
|
|
}
|
|
this.applyStreamRecording(id, value);
|
|
}
|
|
}
|
|
|
|
function value_124657({userIds, context}) { // fn#124657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:2197, offset: 0x025c0062, size: 83 bytes, params: 2, frame: 14
|
|
const MediaEngineContextTypes = (MediaEngineModule).MediaEngineContextTypes;
|
|
const DEFAULT = MediaEngineContextTypes.DEFAULT;
|
|
if (context === DEFAULT) {
|
|
userIds.forEach(_fun124658);
|
|
}
|
|
function _fun124658(a0) { // fn#124658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:2286, offset: 0x025c00b5, size: 36 bytes, params: 2, frame: 11
|
|
const binding = env0_0;
|
|
binding.applyUserVoiceRecording(a0);
|
|
binding.applyUserSoundboardRecording(a0);
|
|
}
|
|
|
|
}
|
|
|
|
function value_124659({userId, channelId, guildId}) { // fn#124659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:2402, offset: 0x025c00d9, size: 171 bytes, params: 2, frame: 23
|
|
this.maybeShowClipsWarning(userId);
|
|
this.applyUserVoiceRecording(userId);
|
|
this.applyUserSoundboardRecording(userId);
|
|
let value = environment.__proto__;
|
|
const streamRTCConnectionStoreBinding = StreamRTCConnectionStore;
|
|
const getRTCConnection = streamRTCConnectionStoreBinding.getRTCConnection;
|
|
value = Reflect.apply(getRTCConnection, streamRTCConnectionStoreBinding,
|
|
[StreamKeyUtilsModule.encodeStreamKey({streamType: guildId != null ? StreamTypes.GUILD : StreamTypes.CALL,
|
|
ownerId: userId, channelId: channelId, guildId: guildId})]);
|
|
if (value != null) {
|
|
this.applyStreamRecording(userId, value);
|
|
}
|
|
}
|
|
|
|
function value_124660({applicationName, errMsg}) { // fn#124660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:2742, offset: 0x025c0184, size: 113 bytes, params: 2, frame: 18
|
|
const value = environment.__proto__;
|
|
const defaultImport = AnalyticsUtils;
|
|
const track = defaultImport.track;
|
|
const CLIPS_INIT_FAILURE = AnalyticEvents.CLIPS_INIT_FAILURE;
|
|
const object = {application_name: applicationName, error_message: errMsg};
|
|
object.clip_runtime = (require(4654) /* metro dependency 4654: ClipsV3RuntimeExperiment */).getClipsRuntime('handleClipsInitFailure');
|
|
Reflect.apply(track, defaultImport, [CLIPS_INIT_FAILURE, object]);
|
|
}
|
|
|
|
function value_124661(a0) { // fn#124661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:2956, offset: 0x025c01f5, size: 201 bytes, params: 2, frame: 15
|
|
var r2;
|
|
var clipsStoreBinding;
|
|
var authenticationStoreBinding;
|
|
let value = environment.__proto__;
|
|
const channelId = RTCConnectionStore.getChannelId();
|
|
if (channelId != null) {
|
|
clipsStoreBinding = ClipsStore;
|
|
if (!clipsStoreBinding.getClipsWarningShown(channelId)) {
|
|
authenticationStoreBinding = AuthenticationStore;
|
|
r2 = a0 !== authenticationStoreBinding.getId() && ClipsStore.isClipsEnabledForUser(a0);
|
|
r2 = r2 && (require(3829) /* metro dependency 3829: UserSettings */).ClipsAllowVoiceRecording.getSetting();
|
|
if (r2) {
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.dispatch({type: 'CLIPS_SHOW_CALL_WARNING', channelId: channelId});
|
|
this.showClipsToast();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function value_124662() { // fn#124662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:3260, offset: 0x025c02be, size: 53 bytes, params: 1, frame: 11
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
value = RTCConnectionStore.getUserIds();
|
|
if (value != null) {
|
|
value.forEach(_fun124663);
|
|
}
|
|
function _fun124663(a0) { // fn#124663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:3314, offset: 0x025c02f3, size: 23 bytes, params: 2, frame: 11
|
|
return env0_0.maybeShowClipsWarning(a0);
|
|
}
|
|
|
|
}
|
|
|
|
function value_124664() { // fn#124664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:3389, offset: 0x025c030a, size: 206 bytes, params: 1, frame: 15
|
|
var environment;
|
|
var r1;
|
|
var moduleValue;
|
|
const value = environment.__proto__;
|
|
if ((importDefault(12384) /* metro dependency 12384: isClientClipsCapable */)(MediaEngineStore)) {
|
|
this.applyNativeClipsSettings();
|
|
moduleValue = require(12383) /* metro dependency 12383: ClipsExperiment */;
|
|
if (moduleValue.areClipsAvailable()) {
|
|
this.loadClipsFromStorage();
|
|
r1 = ClipsStore.getHardwareClassification() != null && ClipsStore.getHardwareClassificationForDecoupled() != null;
|
|
r1 = r1 && ClipsStore.getHardwareClassificationVersion() === CLIPS_HARDWARE_CLASSIFICATION_VERSION;
|
|
if (!r1) {
|
|
this.classifyHardwareAndTrack().then(_fun124665);
|
|
}
|
|
}
|
|
}
|
|
function _fun124665(a0) { // fn#124665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:3671, offset: 0x025c03d8, size: 57 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__.__proto__;
|
|
(Dispatcher).dispatch({type: 'CLIPS_CLASSIFY_HARDWARE',
|
|
classification: a0});
|
|
}
|
|
|
|
}
|
|
|
|
function value_124667({userId, context, channelId, guildId}) { // fn#124667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:3837, offset: 0x025c0411, size: 214 bytes, params: 2, frame: 23
|
|
var streamRTCConnectionStoreBinding;
|
|
var getRTCConnection;
|
|
var moduleValue;
|
|
let value = environment.__proto__;
|
|
const MediaEngineContextTypes = (MediaEngineModule).MediaEngineContextTypes;
|
|
const STREAM = MediaEngineContextTypes.STREAM;
|
|
if (context === STREAM) {
|
|
if ((importDefault(12384) /* metro dependency 12384: isClientClipsCapable */)(MediaEngineStore)) {
|
|
streamRTCConnectionStoreBinding = StreamRTCConnectionStore;
|
|
getRTCConnection = streamRTCConnectionStoreBinding.getRTCConnection;
|
|
moduleValue = importAll(4285) /* metro dependency 4285: StreamKeyUtils */;
|
|
value = Reflect.apply(getRTCConnection, streamRTCConnectionStoreBinding,
|
|
[moduleValue.encodeStreamKey({streamType: guildId != null ? StreamTypes.GUILD : StreamTypes.CALL,
|
|
ownerId: userId, channelId: channelId, guildId: guildId})]);
|
|
if (value != null) {
|
|
this.applyStreamRecording(userId, value);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function* _fun124669() { // fn#124669, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:4158, offset: 0x025c04f2, size: 219 bytes, params: 1, frame: 21
|
|
var environment;
|
|
var binding;
|
|
var generator;
|
|
var value3;
|
|
var value4;
|
|
var value5;
|
|
var value6;
|
|
var gpuModels;
|
|
var classification;
|
|
var binding2;
|
|
var property;
|
|
var value7;
|
|
var track;
|
|
var CLIPS_HARDWARE_CLASSIFICATION;
|
|
var object;
|
|
var value8;
|
|
var getClipsRuntime;
|
|
var value9;
|
|
var error;
|
|
var ClipsHardwareClassification;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
try {
|
|
binding = env2_4;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
generator = _fun124671;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
value3 = binding(generator);
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
value4 = value3();
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
yield value4;
|
|
try {
|
|
value5 = undefined;
|
|
value6 = false;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
if (value6) {
|
|
return value5;
|
|
}
|
|
try {
|
|
gpuModels = value5.gpuModels;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
classification = value5.classification;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
binding = env2_1;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
binding2 = env2_3;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
property = binding2[18];
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
value7 = binding(property);
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
track = value7.track;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
binding = env2_19;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
CLIPS_HARDWARE_CLASSIFICATION = binding.CLIPS_HARDWARE_CLASSIFICATION;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
object.classification = classification;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
binding = env2_18;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
object.version = binding;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
object.gpu_models = gpuModels;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
property = binding2[19];
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
value8 = binding(property);
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
getClipsRuntime = value8.getClipsRuntime;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
value9 = Reflect.apply(getClipsRuntime, value8, ['classifyHardwareAndTrack']);
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
object.clip_runtime = value9;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
try {
|
|
Reflect.apply(track, value7, [CLIPS_HARDWARE_CLASSIFICATION, object]);
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
ClipsHardwareClassification = binding(env2_3[24]).ClipsHardwareClassification;
|
|
return ClipsHardwareClassification.UNKNOWN;
|
|
}
|
|
return classification;
|
|
function* _fun124671() { // fn#124671, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:4200, offset: 0x025c05d8, size: 243 bytes, params: 1, frame: 16
|
|
var environment;
|
|
var object;
|
|
var value8;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
const value3 = undefined;
|
|
yield env4_10();
|
|
const value4 = undefined;
|
|
if (false) {
|
|
return value4;
|
|
}
|
|
if ((value4 == null ? value3 : value4.gpus) != null) {
|
|
value = value4.gpus.map(function(a0) {
|
|
return a0.brand;
|
|
});
|
|
value = value.filter(_fun124673);
|
|
object = {gpuModels: value};
|
|
value8 = environment.__proto__;
|
|
} else {
|
|
var processUtils = env4_1(env4_3[23]).processUtils;
|
|
var getSystemInfo = processUtils.getSystemInfo;
|
|
yield Reflect.apply(getSystemInfo, processUtils, []);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = value.gpus.map(function(a0) {
|
|
return a0.model;
|
|
});
|
|
object = {gpuModels: value};
|
|
}
|
|
object.classification = env1_0.classifyHardware(value);
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
function value_124675() { // fn#124675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:4783, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
|
|
return env0_0.apply(this, arguments);
|
|
}
|
|
|
|
function value_124676(a0) { // fn#124676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:4883, offset: 0x025c06ec, size: 321 bytes, params: 2, frame: 17
|
|
const ClipsHardwareClassification = (ClipsTypesModule).ClipsHardwareClassification;
|
|
if (PlatformUtilsModule.isWindows()) {
|
|
return a0.some(function(a0) {
|
|
return WINDOWS_HARDWARE_AUTO_ENABLE_GPU_REGEX.test(a0);
|
|
}) ? ClipsHardwareClassification.MEETS_AUTO_ENABLE : a0.some(_fun124678) ? ClipsHardwareClassification.MEETS_MINIMUM : ClipsHardwareClassification.BELOW_MINIMUM;
|
|
}
|
|
return PlatformUtilsModule.isMac() ? (importDefault(3767) /* metro dependency 3767: DiscordNative */).app.getAppArch() === 'arm64' ? ClipsHardwareClassification.MEETS_AUTO_ENABLE : ClipsHardwareClassification.MEETS_MINIMUM : ClipsHardwareClassification.UNKNOWN;
|
|
function _fun124678(a0) { // fn#124678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:4959, offset: 0x025c0843, size: 22 bytes, params: 2, frame: 11
|
|
return WINDOWS_HARDWARE_MINIMUM_GPU_REGEX.test(a0);
|
|
}
|
|
|
|
}
|
|
|
|
function value_124679(a0) { // fn#124679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:5392, offset: 0x025c0859, size: 163 bytes, params: 2, frame: 18
|
|
var rTCConnection;
|
|
var authenticationStoreBinding;
|
|
var setClipRecordUser;
|
|
let value = environment.__proto__;
|
|
if ((importDefault(12384) /* metro dependency 12384: isClientClipsCapable */)(MediaEngineStore)) {
|
|
rTCConnection = RTCConnectionStore.getRTCConnection();
|
|
if (rTCConnection != null) {
|
|
authenticationStoreBinding = AuthenticationStore;
|
|
if (a0 !== authenticationStoreBinding.getId()) {
|
|
rTCConnection.setClipRecordUser(a0, 'audio', ClipsStore.isVoiceRecordingAllowedForUser(a0));
|
|
} else {
|
|
setClipRecordUser = rTCConnection.setClipRecordUser;
|
|
value = require(12382) /* metro dependency 12382: isClipsEnabled */;
|
|
value = value.isClipsEnabled();
|
|
Reflect.apply(setClipRecordUser, rTCConnection, [a0, 'audio', value]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function value_124680(a0) { // fn#124680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:5658, offset: 0x025c08fc, size: 109 bytes, params: 2, frame: 16
|
|
var rTCConnection;
|
|
var setClipRecordUser;
|
|
let value = environment.__proto__;
|
|
if ((importDefault(12384) /* metro dependency 12384: isClientClipsCapable */)(MediaEngineStore)) {
|
|
rTCConnection = RTCConnectionStore.getRTCConnection();
|
|
if (rTCConnection != null) {
|
|
setClipRecordUser = rTCConnection.setClipRecordUser;
|
|
value = require(12382) /* metro dependency 12382: isClipsEnabled */;
|
|
value = value.isClipsEnabled();
|
|
Reflect.apply(setClipRecordUser, rTCConnection, [a0, 'soundboard', value]);
|
|
}
|
|
}
|
|
}
|
|
|
|
function value_124681(a0, a1) { // fn#124681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:5821, offset: 0x025c0969, size: 127 bytes, params: 3, frame: 16
|
|
var authenticationStoreBinding;
|
|
let value = environment.__proto__;
|
|
if ((importDefault(12384) /* metro dependency 12384: isClientClipsCapable */)(MediaEngineStore)) {
|
|
authenticationStoreBinding = AuthenticationStore;
|
|
if (authenticationStoreBinding.getId() === a0) {
|
|
value = require(12382) /* metro dependency 12382: isClipsEnabled */;
|
|
value = value.isClipsEnabled();
|
|
a1.setClipRecordUser(a0, 'audio', value);
|
|
a1.setClipRecordUser(a0, 'video', value);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _fun124673(a0) { // fn#124673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16348:4301, offset: 0x025c06d6, size: 22 bytes, params: 2, frame: 3
|
|
return a0 != null && a0 !== '';
|
|
}
|
|
|
|
global.__d(_fun124636, 16140, [5, 6, 7, 15, 17, 18, 4289, 1226, 4259, 4294, 4395, 4265, 4281, 661, 4286, 12383,
|
|
4406, 4285, 683, 4654, 3829, 694, 12384, 3767, 4284, 477, 12382, 4860,
|
|
2]) /* metro module 16140, dependencies: [5, 6, 7, 15, 17, 18, 4289, 1226, 4259, 4294, 4395, 4265, 4281, 661, 4286, 12383, 4406, 4285, 683, 4654, 3829, 694, 12384, 3767, 4284, 477, 12382, 4860, 2] */;
|