919 lines
58 KiB
TypeScript
919 lines
58 KiB
TypeScript
/* Metro module 4398; source: modules/go_live/StreamRTCConnection.tsx; dependencies: [15, 17, 102, 18, 6, 7, 4265, 4289, 4399, 1226, 1379, 4400, 4259, 4401, 4294, 4402, 661, 4291, 672, 4285, 4403, 4041, 4404, 22, 694, 4405, 4406, 4482, 683, 4488, 4489, 4303, 4490, 4491, 12382, 5252, 4301, 2] */
|
|
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 Module00102 from '../../by-id/module-00102.js'; /* Metro dependency 102 */
|
|
import Durations from '../../utils/Durations.tsx'; /* Metro dependency 672 */
|
|
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 ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
|
|
import MediaEngineStore from '../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
|
|
import ClipsStore from '../clips/ClipsStore.tsx'; /* Metro dependency 4265 */
|
|
import RTCConnectionStore from '../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
|
|
import RTCConnection from '../../lib/RTCConnection.tsx'; /* Metro dependency 4301 */
|
|
import ApplicationStreamingSettingsStore from '../../stores/ApplicationStreamingSettingsStore.tsx'; /* Metro dependency 4399 */
|
|
import HookErrorStore from '../../stores/HookErrorStore.tsx'; /* Metro dependency 4400 */
|
|
import NetworkStore from '../../stores/NetworkStore.tsx'; /* Metro dependency 4401 */
|
|
import RTCRegionStore from '../../stores/RTCRegionStore.tsx'; /* Metro dependency 4402 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as TimersModule from '../../external/discord_common/js/packages/timers/Timers.tsx'; /* Metro dependency 4041 */
|
|
import * as StreamKeyUtilsModule from './utils/StreamKeyUtils.tsx'; /* Metro dependency 4285 */
|
|
import * as SystemAnalyticsStoreNativeModule from '../system_analytics/SystemAnalyticsStore.native.tsx'; /* Metro dependency 4289 */
|
|
import * as ConstantsModule2 from '../../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */
|
|
import * as RTCConnectionEventModule from '../../lib/RTCConnectionEvent.tsx'; /* Metro dependency 4405 */
|
|
import * as MediaEngineModule from '../../external/discord_common/js/packages/media-engine/index.tsx'; /* Metro dependency 4406 */
|
|
import * as GameAnalyticsUtilsModule from '../game_detection/GameAnalyticsUtils.tsx'; /* Metro dependency 4482 */
|
|
|
|
function _fun37323(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#37323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:6, offset: 0x010a16c5, size: 605 bytes, params: 8, frame: 24
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ConstantsModule;
|
|
const env0_19 = value.AnalyticEvents;
|
|
const env0_20 = value.MediaEngineHookTypes;
|
|
const env0_21 = value.RTCConnectionStates;
|
|
const Millis = (Durations).Millis;
|
|
const SECOND = Millis.SECOND;
|
|
const env0_23 = 5 * SECOND;
|
|
object = {DETACHED: 0};
|
|
object[0] = 'DETACHED';
|
|
object.WAITING = 1;
|
|
object[1] = 'WAITING';
|
|
object.ATTACHED = 2;
|
|
object[2] = 'ATTACHED';
|
|
object.STARTED = 3;
|
|
object[3] = 'STARTED';
|
|
object.PLAYING = 4;
|
|
object[4] = 'PLAYING';
|
|
object.SILENCE = 5;
|
|
object[5] = 'SILENCE';
|
|
value = _fun37327();
|
|
const value3 = _fun37338(RTCConnection);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/go_live/StreamRTCConnection.tsx');
|
|
exports.default = value3;
|
|
exports.StreamRTCAnalyticsContext = value;
|
|
function _isNativeReflectConstruct_37324() { // fn#37324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:405, offset: 0x010a1922, size: 94 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_37324_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun37327() { // fn#37327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:816, offset: 0x010a1980, size: 251 bytes, params: 1, frame: 15
|
|
return CreateClass(StreamRTCAnalyticsContext, [{key: 'setActionContext', value: function(a0) {
|
|
this.actionContext = a0;
|
|
}}, {key: 'updateStreamApplication', value: function(a0) {
|
|
var r4;
|
|
this.streamApplication = a0;
|
|
var streamApplicationHistory = this.streamApplicationHistory;
|
|
var items = [];
|
|
var value = arraySpread(items, streamApplicationHistory, 0, r4);
|
|
items[value] = a0;
|
|
value + 1;
|
|
this.streamApplicationHistory = items;
|
|
}}, {key: 'setAnalyticsLocations', value: function(a0) {
|
|
this.analyticsLocations = a0;
|
|
}}, {key: 'trackViewerCount', value: function(a0) {
|
|
var Math = global.Math;
|
|
this.maxViewers = Math.max(a0, this.maxViewers);
|
|
this.numViewers = a0;
|
|
}}, {key: 'setNativePickerStyleUsed', value: function(a0) {
|
|
this.nativePickerStyleUsed = a0;
|
|
}}, {key: 'trackStart', value: function() {
|
|
this.startTime = global.performance.now();
|
|
}}, {key: 'trackEnd', value: function() {
|
|
this.endTime = global.performance.now();
|
|
}}, {key: 'getStreamApplicationFromHistory', value: function(a0) {
|
|
return this.streamApplicationHistory[a0];
|
|
}}, {key: 'getDuration', value: function() {
|
|
if (this.startTime == null) {
|
|
return null;
|
|
}
|
|
return (this.endTime ?? global.performance.now()) - this.startTime;
|
|
}}]);
|
|
function StreamRTCAnalyticsContext({streamRegion, streamApplication, streamSourceType, actionContext, numViewers, goLiveModalDurationMs, analyticsLocations}) { // fn#37328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:837, offset: 0x010a1a7b, size: 144 bytes, params: 2, frame: 20
|
|
env1_7(this, StreamRTCAnalyticsContext);
|
|
this.streamRegion = streamRegion;
|
|
this.streamApplication = streamApplication;
|
|
this.streamApplicationHistory = [streamApplication];
|
|
this.streamSourceType = streamSourceType;
|
|
this.actionContext = actionContext;
|
|
this.maxViewers = numViewers;
|
|
this.goLiveModalDurationMs = goLiveModalDurationMs;
|
|
this.numViewers = numViewers;
|
|
this.analyticsLocations = analyticsLocations ?? [];
|
|
}
|
|
|
|
}
|
|
|
|
function _fun37338(a0) { // fn#37338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:2132, offset: 0x010a1c28, size: 425 bytes, params: 2, frame: 16
|
|
const StreamRTCConnection2 = StreamRTCConnection;
|
|
Inherits(StreamRTCConnection2, a0);
|
|
return CreateClass(StreamRTCConnection2, [{key: 'isOwner', get: function() {
|
|
return AuthenticationStore.getId() === this.streamContext.ownerId;
|
|
}}, {key: 'destroy', value: value_37342}, {key: 'streamUpdate', value: function(a0) {
|
|
var _videoQuality = this._videoQuality;
|
|
if (_videoQuality != null) {
|
|
if (a0) {
|
|
_videoQuality.pause();
|
|
} else {
|
|
_videoQuality.resume();
|
|
}
|
|
}
|
|
}}, {key: 'layoutChange', value: function(a0) {
|
|
this.videoStreamStats.layoutChange(a0);
|
|
}}, {key: 'autoQualityChange', value: function() {
|
|
this.videoStreamStats.autoQualityChange();
|
|
}}, {key: 'getVideoStats', value: value_37348}, {key: 'getRegion', value: function() {
|
|
return this.analyticsContext.streamRegion;
|
|
}}, {key: 'getMaxViewers', value: function() {
|
|
return this.analyticsContext.maxViewers;
|
|
}}, {key: 'getVoiceParticipantType', value: function() {
|
|
return this.isOwner ? 'streamer' : 'receiver';
|
|
}}, {key: 'initializeEvents', value: value_37352}, {key: 'reportSoundshareFailure', value: value_37368},
|
|
{key: 'getStreamAnalyticsProperties', value: value_37369}, {key: 'getSoundshareAnalyticsProperties',
|
|
value: function() {
|
|
var object = {rtc_connection_id: this.getRTCConnectionId()};
|
|
object.soundshare_experimental = MediaEngineStore.getExperimentalSoundshare();
|
|
return object;
|
|
}}, {key: 'trackVideoStartStats', value: value_37371}, {key: 'trackVideoEndStats', value: value_37372},
|
|
{key: 'getExtraConnectionOptions', value: value_37375}]);
|
|
function StreamRTCConnection({sessionId, streamKey, serverId, initialLayout, analyticsContext, parentMediaSessionId, channelId}) { // fn#37339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:2144, offset: 0x010a1dd1, size: 512 bytes, params: 2, frame: 30
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
env1_7(this, StreamRTCConnection);
|
|
const value3 = (StreamKeyUtilsModule).decodeStreamKey(streamKey);
|
|
const guildId = value3.guildId;
|
|
const channelId2 = value3.channelId;
|
|
const object = {};
|
|
object.userId = AuthenticationStore.getId();
|
|
object.sessionId = sessionId;
|
|
object.guildId = guildId;
|
|
object.channelId = channelId2;
|
|
const STREAM = MediaEngineContextTypes.STREAM;
|
|
object.context = STREAM;
|
|
object.streamServerId = serverId;
|
|
object.streamChannelId = channelId;
|
|
object.parentMediaSessionId = parentMediaSessionId;
|
|
object.joinVoiceId = null;
|
|
const items2 = [object];
|
|
const value4 = env1_4(StreamRTCConnection);
|
|
const value7 = env1_3(this, _isNativeReflectConstruct_37324() ? global.Reflect.construct(value4, items2,
|
|
env1_4(this).constructor) : value4.apply(this, items2));
|
|
value = importDefault(4403) /* metro dependency 4403: SoundshareStatsAggregator */;
|
|
value = new value();
|
|
value7.soundshareStats = value;
|
|
value7._firstFrameDelivered = false;
|
|
value7.screenshareFinishedCount = 0;
|
|
value7.soundshareFailuresReported = {};
|
|
const Timeout = (TimersModule).Timeout;
|
|
let timeout = new Timeout();
|
|
value7.errorTimer = timeout;
|
|
value7.streamContext = value3;
|
|
value7.streamKey = streamKey;
|
|
timeout = importDefault(4404) /* metro dependency 4404: VideoStreamStats */;
|
|
timeout = new timeout(initialLayout, value7.isOwner);
|
|
value7.videoStreamStats = timeout;
|
|
value7.analyticsContext = analyticsContext;
|
|
value7.updateVideoStreamId = (importDefault(22) /* metro dependency 22 */).debounce(_fun37340, 200);
|
|
value7.videoStreamStats.start();
|
|
value7.initializeEvents();
|
|
return value7;
|
|
function _fun37340(a0, a1) { // fn#37340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:2984, offset: 0x010a1fd1, size: 160 bytes, params: 3, frame: 18
|
|
const decodeStreamKey = StreamKeyUtilsModule.decodeStreamKey;
|
|
const binding = env0_0;
|
|
const {guildId, channelId, ownerId} = Reflect.apply(decodeStreamKey, StreamKeyUtilsModule, [binding.streamKey]);
|
|
const defaultImport = Dispatcher;
|
|
const dispatch = defaultImport.dispatch;
|
|
const object = {type: 'RTC_CONNECTION_VIDEO', guildId: guildId, channelId: channelId, userId: ownerId, streamId: a0,
|
|
rtcServerId: a1};
|
|
object.mediaEngineConnectionId = binding.getMediaEngineConnectionId();
|
|
const STREAM = MediaEngineContextTypes.STREAM;
|
|
object.context = STREAM;
|
|
Reflect.apply(dispatch, defaultImport, [object]);
|
|
}
|
|
|
|
}
|
|
|
|
function value_37342(a0) { // fn#37342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:3471, offset: 0x010a2097, size: 140 bytes, params: 2, frame: 17
|
|
this.videoStreamStats.stop();
|
|
this.trackVideoEndStats(a0);
|
|
this.updateVideoStreamId.cancel();
|
|
this.updateVideoStreamId(null, null);
|
|
this.updateVideoStreamId.flush();
|
|
this.errorTimer.stop();
|
|
value_37342_superPropGet(StreamRTCConnection, 'destroy', this, 3)([]);
|
|
function value_37342_superPropGet(a0, a1, a2, a3) { // fn#37343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:3665, owner: value_37342._superPropGet, offset: 0x010a2123, size: 100 bytes, params: 5, frame: 18
|
|
let value = a0;
|
|
const env0_0 = a2;
|
|
const binding = env2_5;
|
|
value = env2_4(1 & 3 ? value.prototype : value);
|
|
value = binding(value, 'destroy', a2);
|
|
return 2 & 3 ? typeof value !== 'function' ? value : _fun37344 : value;
|
|
function _fun37344(a0) { // fn#37344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:3764, offset: 0x00c62408, size: 27 bytes, params: 2, frame: 13
|
|
return env0_1.apply(importDefault, a0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function value_37352() { // fn#37352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:4785, offset: 0x010a22b1, size: 223 bytes, params: 1, frame: 18
|
|
let on = this.on;
|
|
const RTCConnectionEvent = (RTCConnectionEventModule).RTCConnectionEvent;
|
|
const State = RTCConnectionEvent.State;
|
|
Reflect.apply(on, this, [State, _fun37353]);
|
|
on = this.on;
|
|
const Video = RTCConnectionEvent.Video;
|
|
Reflect.apply(on, this, [Video, _fun37364]);
|
|
on = this.on;
|
|
const VideoSourceQualityChanged = RTCConnectionEvent.VideoSourceQualityChanged;
|
|
Reflect.apply(on, this, [VideoSourceQualityChanged, _fun37365]);
|
|
on = this.on;
|
|
const SecureFramesUpdate = RTCConnectionEvent.SecureFramesUpdate;
|
|
Reflect.apply(on, this, [SecureFramesUpdate, _fun37366]);
|
|
on = this.on;
|
|
const RosterMapUpdate = RTCConnectionEvent.RosterMapUpdate;
|
|
Reflect.apply(on, this, [RosterMapUpdate, _fun37367]);
|
|
function _fun37353(a0, a1, a2) { // fn#37353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:4849, offset: 0x010a2390, size: 621 bytes, params: 4, frame: 19
|
|
var _connection;
|
|
const BaseConnectionEvent = (MediaEngineModule).BaseConnectionEvent;
|
|
const defaultImport = Dispatcher;
|
|
const dispatch = defaultImport.dispatch;
|
|
const object = {type: 'RTC_CONNECTION_STATE', state: a0};
|
|
copyDataProperties(object, a1, undefined);
|
|
copyDataProperties(object, a2, undefined);
|
|
object['streamKey'] = env0_0.streamKey;
|
|
Reflect.apply(dispatch, defaultImport, [object]);
|
|
const RTC_CONNECTED = RTCConnectionStates.RTC_CONNECTED;
|
|
if (a0 === RTC_CONNECTED) {
|
|
_connection = env0_0._connection;
|
|
if (_connection != null) {
|
|
_connection.on(BaseConnectionEvent.ScreenshareFinish, _fun37354);
|
|
}
|
|
_connection = env0_0._connection;
|
|
if (_connection != null) {
|
|
_connection.on(BaseConnectionEvent.SoundshareAttached, _fun37356);
|
|
}
|
|
_connection = env0_0._connection;
|
|
if (_connection != null) {
|
|
_connection.on(BaseConnectionEvent.SoundshareFailed, _fun37357);
|
|
}
|
|
_connection = env0_0._connection;
|
|
if (_connection != null) {
|
|
_connection.on(BaseConnectionEvent.SoundshareSpeaking, _fun37358);
|
|
}
|
|
_connection = env0_0._connection;
|
|
if (_connection != null) {
|
|
_connection.on(BaseConnectionEvent.SoundshareTrace, _fun37359);
|
|
}
|
|
_connection = env0_0._connection;
|
|
if (_connection != null) {
|
|
_connection.on(BaseConnectionEvent.FirstFrameStats, _fun37361);
|
|
}
|
|
_connection = env0_0._connection;
|
|
if (_connection != null) {
|
|
_connection.on(BaseConnectionEvent.FirstFrameEncryptedStats, _fun37362);
|
|
}
|
|
_connection = env0_0._connection;
|
|
if (_connection != null) {
|
|
_connection.on(BaseConnectionEvent.Destroy, _fun37363);
|
|
}
|
|
}
|
|
function _fun37354(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25) { // fn#37354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:5077, offset: 0x010a25fd, size: 442 bytes, params: 27, frame: 20
|
|
let value = a9;
|
|
const value2 = a10;
|
|
const value3 = a11;
|
|
const value4 = a12;
|
|
const value5 = a13;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
const env0_3 = a3;
|
|
const env0_4 = a4;
|
|
const env0_5 = a5;
|
|
const env0_6 = a6;
|
|
const env0_7 = a7;
|
|
const env0_8 = a8;
|
|
const env0_14 = a14;
|
|
const env0_15 = a15;
|
|
const env0_16 = a16;
|
|
const env0_17 = a17;
|
|
const env0_18 = a18;
|
|
const env0_19 = a19;
|
|
const env0_20 = a20;
|
|
const env0_21 = a21;
|
|
const env0_22 = a22;
|
|
const env0_23 = a23;
|
|
const env0_24 = a24;
|
|
const env0_25 = a25;
|
|
const binding = env1_0;
|
|
const analyticsContext = binding.analyticsContext;
|
|
const getStreamApplicationFromHistory = analyticsContext.getStreamApplicationFromHistory;
|
|
let screenshareFinishedCount = binding.screenshareFinishedCount;
|
|
const value7 = Reflect.apply(getStreamApplicationFromHistory, analyticsContext, [screenshareFinishedCount]);
|
|
screenshareFinishedCount = binding.screenshareFinishedCount;
|
|
binding.screenshareFinishedCount = typeof screenshareFinishedCount === 'bigint' ? screenshareFinishedCount + 1n : +screenshareFinishedCount + 1;
|
|
const runningGameAnalytics = (GameAnalyticsUtilsModule).getRunningGameAnalytics(value7);
|
|
const env0_26 = runningGameAnalytics.gameName;
|
|
const env0_27 = runningGameAnalytics.gameId;
|
|
const env0_28 = runningGameAnalytics.exe;
|
|
const env0_29 = runningGameAnalytics.distributor;
|
|
const env0_30 = binding.getMediaSessionId();
|
|
const env0_31 = binding.getRTCConnectionId();
|
|
const value10 = 0;
|
|
value = (value ?? value10) + (value2 ?? value10);
|
|
value += value3 ?? value10;
|
|
value += value4 ?? value10;
|
|
const env0_32 = value + (value5 ?? value10);
|
|
getSystemAnalyticsInfo().then(_fun37355);
|
|
function _fun37355(a0) { // fn#37355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:5484, offset: 0x010a27b7, size: 865 bytes, params: 2, frame: 22
|
|
let value = null;
|
|
const r5 = value != a0 ? {cpu_brand: a0.cpu_brand, cpu_vendor: a0.cpu_vendor, cpu_memory: a0.cpu_memory,
|
|
gpu_brand: a0.gpu_brand, gpu_memory: a0.gpu_memory} : value;
|
|
const value3 = 0;
|
|
const value13 = (value != env0_0 ? env0_0 : value3) + (value != require ? require : value3) + (value != importDefault ? importDefault : value3) + (value != importAll ? importAll : value3) + (value != env0_4 ? env0_4 : value3) + (value != env0_5 ? env0_5 : value3) + (value != env0_15 ? env0_15 : value3) + (value != env0_19 ? env0_19 : value3) + (value != env0_18 ? env0_18 : value3) + (value != env0_24 ? env0_24 : value3) + (value != env0_23 ? env0_23 : value3);
|
|
const defaultImport = importDefault(dependencyMap[28]);
|
|
const track = defaultImport.track;
|
|
const SCREENSHARE_FINISHED = AnalyticEvents.SCREENSHARE_FINISHED;
|
|
const object = {screenshare_frames: env0_0};
|
|
object.videohook_frames = require;
|
|
object.hybrid_dxgi_frames = importDefault;
|
|
object.hybrid_gdi_frames = importAll;
|
|
object.hybrid_videohook_frames = env0_4;
|
|
object.hybrid_graphics_capture_frames = env0_5;
|
|
object.hybrid_capture_method_switches = dependencyMap;
|
|
object.hybrid_gdi_bitblt_frames = env0_7;
|
|
object.hybrid_gdi_printwindow_frames = env0_8;
|
|
object.hybrid_graphics_capture_frames_unique = env0_9;
|
|
object.hybrid_dxgi_frames_unique = SystemAnalyticsStoreNativeModule.getSystemAnalyticsInfo;
|
|
object.hybrid_videohook_frames_unique = env0_11;
|
|
object.hybrid_gdi_bitblt_frames_unique = env0_12;
|
|
object.hybrid_gdi_printwindow_frames_unique = env0_13;
|
|
object.skip_history_json = env0_14;
|
|
object.quartz_frames = env0_15;
|
|
object.screencapturekit_frames = env0_19;
|
|
object.go_live_camera_frames = env0_18;
|
|
object.total_frames = value13;
|
|
object.total_frames_unique = env0_32;
|
|
object.desktop_capturer_type = env0_16;
|
|
object.media_session_id = env0_30;
|
|
object.rtc_connection_id = env0_31;
|
|
const STREAM = MediaEngineContextTypes.STREAM;
|
|
object.context = STREAM;
|
|
object.activity = env0_17;
|
|
const binding = env2_0;
|
|
const soundshareStats = binding.soundshareStats;
|
|
const getStats = soundshareStats.getStats;
|
|
object.soundshare_session = Reflect.apply(getStats, soundshareStats, []).soundshare_last_session;
|
|
const nativePickerStyleUsed = binding.analyticsContext.nativePickerStyleUsed;
|
|
value = 'internal';
|
|
object.picker_type_used = value != nativePickerStyleUsed ? 'native' : value;
|
|
object.duration = env2_0.analyticsContext.getDuration();
|
|
object.share_game_name = gameName;
|
|
object.share_game_id = gameId;
|
|
object.share_game_exe = exe;
|
|
object.share_game_distributor = distributor;
|
|
object.hdr_frames_capable = env0_20;
|
|
object.hdr_frames = env0_21;
|
|
object.discord_is_elevated = importDefault(dependencyMap[29]).getDiscordIsElevated();
|
|
object.target_window_elevated = env0_22;
|
|
object.pipewire_frames = env0_23;
|
|
object.x11_frames = env0_24;
|
|
object.videohook_backend = env0_25;
|
|
copyDataProperties(object, r5, soundshareStats);
|
|
Reflect.apply(track, defaultImport, [SCREENSHARE_FINISHED, object]);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun37356() { // fn#37356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:6981, offset: 0x010a2b18, size: 148 bytes, params: 1, frame: 19
|
|
var defaultImport;
|
|
var track;
|
|
var SOUNDSHARE_ATTACHED;
|
|
var object;
|
|
var binding;
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
const goLiveSource = MediaEngineStore.getGoLiveSource();
|
|
const value3 = undefined;
|
|
if ((goLiveSource == null ? value3 : goLiveSource.desktopSource) != null) {
|
|
defaultImport = importDefault(dependencyMap[28]);
|
|
track = defaultImport.track;
|
|
SOUNDSHARE_ATTACHED = AnalyticEvents.SOUNDSHARE_ATTACHED;
|
|
object = {};
|
|
value = importDefault(dependencyMap[30]);
|
|
copyDataProperties(object, value(goLiveSource == null ? value3 : goLiveSource.desktopSource), dependencyMap);
|
|
value = environment.__proto__;
|
|
binding = env1_0;
|
|
copyDataProperties(object, binding.getSoundshareAnalyticsProperties(), dependencyMap);
|
|
Reflect.apply(track, defaultImport, [SOUNDSHARE_ATTACHED, object]);
|
|
}
|
|
return value3;
|
|
}
|
|
|
|
function _fun37357({failureCode, failureReason, willRetry}) { // fn#37357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:7263, offset: 0x010a2bac, size: 91 bytes, params: 2, frame: 20
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
value = MediaEngineStore.getGoLiveSource();
|
|
const binding = env1_0;
|
|
binding.reportSoundshareFailure(value?.desktopSource, failureCode, failureReason, willRetry);
|
|
}
|
|
|
|
function _fun37358() { // fn#37358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:7490, offset: 0x010a2c07, size: 222 bytes, params: 1, frame: 20
|
|
var defaultImport;
|
|
var track;
|
|
var SOUNDSHARE_TRANSMITTING;
|
|
var object;
|
|
var defaultImport2;
|
|
var value4;
|
|
var value5;
|
|
var binding;
|
|
var hookErrorStoreBinding;
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
const goLiveSource = MediaEngineStore.getGoLiveSource();
|
|
const value3 = undefined;
|
|
if ((goLiveSource == null ? value3 : goLiveSource.desktopSource) != null) {
|
|
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
track = defaultImport.track;
|
|
SOUNDSHARE_TRANSMITTING = AnalyticEvents.SOUNDSHARE_TRANSMITTING;
|
|
object = {};
|
|
defaultImport2 = importDefault(4489) /* metro dependency 4489: getSoundshareAnalyticsContext */;
|
|
value4 = goLiveSource == null;
|
|
copyDataProperties(object, defaultImport2(value4 ? value3 : goLiveSource.desktopSource), value4);
|
|
value5 = environment.__proto__;
|
|
binding = env1_0;
|
|
copyDataProperties(object, binding.getSoundshareAnalyticsProperties(), value4);
|
|
Reflect.apply(track, defaultImport, [SOUNDSHARE_TRANSMITTING, object]);
|
|
hookErrorStoreBinding = HookErrorStore;
|
|
if (hookErrorStoreBinding.getHookError(MediaEngineHookTypes.SOUND) != null) {
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MEDIA_ENGINE_SOUNDSHARE_TRANSMITTING'});
|
|
}
|
|
}
|
|
return value3;
|
|
}
|
|
|
|
function _fun37359(a0) { // fn#37359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:7873, offset: 0x010a2ce5, size: 404 bytes, params: 2, frame: 22
|
|
var environment;
|
|
var errorTimer;
|
|
var reason;
|
|
var code;
|
|
var retry;
|
|
var binding;
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
const goLiveSource = MediaEngineStore.getGoLiveSource();
|
|
const soundshareStats = env1_0.soundshareStats;
|
|
const value4 = undefined;
|
|
soundshareStats.traceEvent(goLiveSource == null || goLiveSource.desktopSource == null ? value4 : goLiveSource.desktopSource.soundshareSession,
|
|
a0);
|
|
const type = a0.type;
|
|
if (type === 'soundshare_attach_requested') {
|
|
errorTimer = env1_0.errorTimer;
|
|
errorTimer.start(env3_23, _fun37360);
|
|
} else if (type === 'soundshare_recv_failed') {
|
|
reason = a0.reason;
|
|
code = a0.code;
|
|
retry = a0.retry;
|
|
if ((goLiveSource == null ? value4 : goLiveSource.desktopSource) != null) {
|
|
binding = env1_0;
|
|
binding.reportSoundshareFailure(goLiveSource == null ? value4 : goLiveSource.desktopSource, code, reason,
|
|
retry);
|
|
if (!retry) {
|
|
env1_0.errorTimer.stop();
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.dispatch({type: 'MEDIA_ENGINE_SOUNDSHARE_FAILED', errorMessage: reason, errorCode: code});
|
|
}
|
|
}
|
|
} else if (type === 'soundshare_state_transition') {
|
|
if (a0.newState === env3_24.PLAYING) {
|
|
env1_0.errorTimer.stop();
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MEDIA_ENGINE_SOUNDSHARE_TRANSMITTING'});
|
|
}
|
|
}
|
|
return value4;
|
|
function _fun37360() { // fn#37360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:8076, offset: 0x010a2e79, size: 51 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
(Dispatcher).dispatch({'type': 'MEDIA_ENGINE_SOUNDSHARE_FAILED',
|
|
'errorMessage': 'Sound Hook Failed'});
|
|
}
|
|
|
|
}
|
|
|
|
function _fun37361(a0) { // fn#37361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:8706, offset: 0x010a2eac, size: 651 bytes, params: 2, frame: 20
|
|
var r4;
|
|
var binding;
|
|
var value2;
|
|
var defaultImport;
|
|
var track;
|
|
var RECEIVER_FIRST_FRAME_DELIVERED;
|
|
var object;
|
|
var remoteVideoStreamCreatedTimestamp;
|
|
let value = environment.__proto__;
|
|
if (!env1_0._firstFrameDelivered) {
|
|
binding = env1_0;
|
|
binding._firstFrameDelivered = true;
|
|
value = binding.getStreamAnalyticsProperties();
|
|
value2 = environment.__proto__.__proto__.__proto__;
|
|
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
track = defaultImport.track;
|
|
RECEIVER_FIRST_FRAME_DELIVERED = AnalyticEvents.RECEIVER_FIRST_FRAME_DELIVERED;
|
|
object = {};
|
|
object.guild_id = value.guild_id;
|
|
object.channel_id = value.channel_id;
|
|
object.rtc_connection_id = value.rtc_connection_id;
|
|
object.media_session_id = value.media_session_id;
|
|
object.parent_media_session_id = value.parent_media_session_id;
|
|
object.num_viewers = binding.analyticsContext.numViewers;
|
|
object.time_connected_to_first_frame_delivered = binding.getDuration();
|
|
value = require(4303) /* metro dependency 4303: TimeUtils */;
|
|
value = value.now();
|
|
object.time_total_to_first_frame = value - binding.getCreatedTime();
|
|
remoteVideoStreamCreatedTimestamp = a0.remoteVideoStreamCreatedTimestamp;
|
|
value = null;
|
|
r4 = remoteVideoStreamCreatedTimestamp === undefined || a0.remoteUserCreatedTimestamp === undefined ? value : global.Number(a0.remoteVideoStreamCreatedTimestamp - a0.remoteUserCreatedTimestamp);
|
|
object.time_remote_user_to_video_stream_created = r4;
|
|
r4 = a0.videoDataReceivedTimestamp === undefined || a0.remoteVideoStreamCreatedTimestamp === undefined ? value : global.Number(a0.videoDataReceivedTimestamp - a0.remoteVideoStreamCreatedTimestamp);
|
|
object.time_video_stream_created_to_video_data_received = r4;
|
|
r4 = a0.videoSourceDeliveredFrameTimestamp === undefined || a0.videoDataReceivedTimestamp === undefined ? value : global.Number(a0.videoSourceDeliveredFrameTimestamp - a0.videoDataReceivedTimestamp);
|
|
object.time_video_data_received_to_video_source_delivered_frame = r4;
|
|
r4 = a0.updateMLSExternalSenderTimestamp === undefined || a0.remoteUserCreatedTimestamp === undefined ? value : global.Number(a0.updateMLSExternalSenderTimestamp - a0.remoteUserCreatedTimestamp);
|
|
object.time_remote_user_to_mls_external_sender_updated = r4;
|
|
r4 = a0.setRemoteSecureFrameKeyRatchetTimestamp === undefined || a0.remoteUserCreatedTimestamp === undefined ? value : global.Number(a0.setRemoteSecureFrameKeyRatchetTimestamp - a0.remoteUserCreatedTimestamp);
|
|
object.time_remote_user_to_secure_frame_remote_key_ratchet_set = r4;
|
|
r4 = a0.setLocalSecureFrameKeyRatchetTimestamp === undefined || a0.remoteUserCreatedTimestamp === undefined ? value : global.Number(a0.setLocalSecureFrameKeyRatchetTimestamp - a0.remoteUserCreatedTimestamp);
|
|
object.time_remote_user_to_secure_frame_local_key_ratchet_set = r4;
|
|
r4 = a0.firstFrameDecryptedTimestamp === undefined || a0.remoteUserCreatedTimestamp === undefined ? value : global.Number(a0.firstFrameDecryptedTimestamp - a0.remoteUserCreatedTimestamp);
|
|
object.time_remote_user_to_first_frame_decrypted = r4;
|
|
Reflect.apply(track, defaultImport, [RECEIVER_FIRST_FRAME_DELIVERED, object]);
|
|
}
|
|
}
|
|
|
|
function _fun37362(a0) { // fn#37362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:10786, offset: 0x010a3137, size: 421 bytes, params: 2, frame: 20
|
|
let value = environment.__proto__;
|
|
value = env1_0.getStreamAnalyticsProperties();
|
|
const defaultImport = AnalyticsUtils;
|
|
const track = defaultImport.track;
|
|
const STREAMER_FIRST_FRAME_ENCRYPTED = AnalyticEvents.STREAMER_FIRST_FRAME_ENCRYPTED;
|
|
const object = {};
|
|
object.guild_id = value.guild_id;
|
|
object.channel_id = value.channel_id;
|
|
object.rtc_connection_id = value.rtc_connection_id;
|
|
object.media_session_id = value.media_session_id;
|
|
object.parent_media_session_id = value.parent_media_session_id;
|
|
const videoReceiversSetTimestamp = a0.videoReceiversSetTimestamp;
|
|
value = null;
|
|
object.time_local_user_to_video_receivers_set = videoReceiversSetTimestamp === undefined || a0.localUserCreatedTimestamp === undefined ? value : global.Number(a0.videoReceiversSetTimestamp - a0.localUserCreatedTimestamp);
|
|
object.time_local_user_to_mls_external_sender_updated = a0.updateMLSExternalSenderTimestamp === undefined || a0.localUserCreatedTimestamp === undefined ? value : global.Number(a0.updateMLSExternalSenderTimestamp - a0.localUserCreatedTimestamp);
|
|
object.time_local_user_to_secure_frame_remote_key_ratchet_set = a0.setRemoteSecureFrameKeyRatchetTimestamp === undefined || a0.localUserCreatedTimestamp === undefined ? value : global.Number(a0.setRemoteSecureFrameKeyRatchetTimestamp - a0.localUserCreatedTimestamp);
|
|
object.time_local_user_to_secure_frame_local_key_ratchet_set = a0.setLocalSecureFrameKeyRatchetTimestamp === undefined || a0.localUserCreatedTimestamp === undefined ? value : global.Number(a0.setLocalSecureFrameKeyRatchetTimestamp - a0.localUserCreatedTimestamp);
|
|
object.time_local_user_to_first_frame_encrypted = a0.firstFrameEncryptedTimestamp === undefined || a0.localUserCreatedTimestamp === undefined ? value : global.Number(a0.firstFrameEncryptedTimestamp - a0.localUserCreatedTimestamp);
|
|
Reflect.apply(track, defaultImport, [STREAMER_FIRST_FRAME_ENCRYPTED, object]);
|
|
}
|
|
|
|
function _fun37363() { // fn#37363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:12158, offset: 0x010a32dc, size: 27 bytes, params: 1, frame: 9
|
|
env1_0.errorTimer.stop();
|
|
}
|
|
|
|
}
|
|
|
|
function _fun37364(a0, a1, a2, a3, a4) { // fn#37364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:12237, offset: 0x010a32f7, size: 171 bytes, params: 6, frame: 15
|
|
var binding;
|
|
let value = environment.__proto__.__proto__;
|
|
value = Reflect.apply((require(4285) /* metro dependency 4285: StreamKeyUtils */).decodeStreamKey, value,
|
|
[env0_0.streamKey]);
|
|
let r2 = value.guildId === a0 && value.channelId === a1;
|
|
if (r2) {
|
|
value = value.ownerId === a2;
|
|
r2 = value;
|
|
}
|
|
if (r2) {
|
|
binding = env0_0;
|
|
value = binding.getMediaSessionId();
|
|
value = value == null;
|
|
if (!(value || env0_1)) {
|
|
env0_0.trackVideoStartStats();
|
|
}
|
|
binding = env0_0;
|
|
binding.updateVideoStreamId(a3, a4);
|
|
}
|
|
}
|
|
|
|
function _fun37365(a0, a1, a2, a3, a4, a5) { // fn#37365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:12515, offset: 0x010a33a2, size: 94 bytes, params: 7, frame: 13
|
|
const value = environment.__proto__.__proto__;
|
|
(Dispatcher).dispatch({type: 'MEDIA_ENGINE_VIDEO_SOURCE_QUALITY_CHANGED',
|
|
guildId: a0, channelId: a1, senderUserId: a2, maxResolution: a3, maxFrameRate: a4, context: a5});
|
|
}
|
|
|
|
function _fun37366() { // fn#37366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:12739, offset: 0x010a3400, size: 47 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__.__proto__;
|
|
(Dispatcher).dispatch({type: 'RTC_CONNECTION_SECURE_FRAMES_UPDATE'});
|
|
}
|
|
|
|
function _fun37367(a0) { // fn#37367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:12865, offset: 0x010a342f, size: 57 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__.__proto__;
|
|
(Dispatcher).dispatch({type: 'RTC_CONNECTION_ROSTER_MAP_UPDATE',
|
|
userIds: a0});
|
|
}
|
|
|
|
}
|
|
|
|
function value_37368(a0, a1, a2, a3) { // fn#37368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:12982, offset: 0x010a3468, size: 276 bytes, params: 5, frame: 19
|
|
var Set;
|
|
var value3;
|
|
var set;
|
|
var value8;
|
|
var defaultImport;
|
|
var track;
|
|
var SOUNDSHARE_FAILED;
|
|
var object;
|
|
const value = undefined;
|
|
const r4 = (a0 == null ? value : a0.soundshareSession) ?? '';
|
|
let soundshareFailuresReported = this.soundshareFailuresReported;
|
|
if (soundshareFailuresReported[r4] == null) {
|
|
soundshareFailuresReported = this.soundshareFailuresReported;
|
|
Set = global.Set;
|
|
value3 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
set = new Set();
|
|
soundshareFailuresReported[r4] = set instanceof Object ? set : value3;
|
|
}
|
|
const r2 = a1 != null && !this.soundshareFailuresReported[r4].has(a1);
|
|
if (r2) {
|
|
this.soundshareFailuresReported[r4].add(a1);
|
|
}
|
|
if (a1 == null || r2) {
|
|
value8 = environment.__proto__;
|
|
defaultImport = importDefault(dependencyMap[28]);
|
|
track = defaultImport.track;
|
|
SOUNDSHARE_FAILED = AnalyticEvents.SOUNDSHARE_FAILED;
|
|
object = {soundshare_failure_code: a1, soundshare_failure_reason: a2, soundshare_failure_will_retry: a3};
|
|
copyDataProperties(object, importDefault(dependencyMap[30])(a0), dependencyMap);
|
|
copyDataProperties(object, this.getSoundshareAnalyticsProperties(), dependencyMap);
|
|
Reflect.apply(track, defaultImport, [SOUNDSHARE_FAILED, object]);
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function value_37369() { // fn#37369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:13488, offset: 0x010a357c, size: 351 bytes, params: 1, frame: 24
|
|
const {streamRegion, streamApplication, streamSourceType, actionContext} = this.analyticsContext;
|
|
const {ownerId, guildId} = this.streamContext;
|
|
const value = environment.__proto__;
|
|
const rtcRegionStoreBinding = RTCRegionStore;
|
|
const getRegion = rtcRegionStoreBinding.getRegion;
|
|
const rtcConnectionStoreBinding = RTCConnectionStore;
|
|
const getHostname = rtcConnectionStoreBinding.getHostname;
|
|
const value2 = Reflect.apply(getRegion, rtcRegionStoreBinding, [Reflect.apply(getHostname,
|
|
rtcConnectionStoreBinding, [])]);
|
|
const {gameName, gameId, exe, distributor, sku,
|
|
gameMetadata} = (GameAnalyticsUtilsModule).getRunningGameAnalytics(streamApplication);
|
|
const object = {};
|
|
object.channel_id = this.channelId;
|
|
object.rtc_connection_id = this.getRTCConnectionId();
|
|
object.media_session_id = this.getMediaSessionId();
|
|
object.parent_media_session_id = this.parentMediaSessionId;
|
|
object.sender_user_id = ownerId;
|
|
const STREAM = MediaEngineContextTypes.STREAM;
|
|
object.context = STREAM;
|
|
object.guild_id = guildId;
|
|
object.stream_region = streamRegion;
|
|
object.stream_source_type = streamSourceType;
|
|
object.guild_region = value2;
|
|
object.participant_type = this.isOwner ? 'streamer' : 'receiver';
|
|
object.share_application_name = gameName;
|
|
object.share_application_id = gameId;
|
|
object.share_application_executable = exe;
|
|
object.share_application_distributor = distributor;
|
|
object.share_application_distributor_game_id = sku;
|
|
object.share_application_game_metadata = gameMetadata;
|
|
object.video_layout = this.videoStreamStats.getLayout();
|
|
object.client_event_source = actionContext;
|
|
object.voice_backend_version = this.voiceVersion;
|
|
object.rtc_worker_backend_version = this.rtcWorkerVersion;
|
|
return object;
|
|
}
|
|
|
|
function value_37371() { // fn#37371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:14656, offset: 0x010a3709, size: 227 bytes, params: 1, frame: 18
|
|
var r7;
|
|
const isOwner = this.isOwner;
|
|
let value = null;
|
|
if (isOwner) {
|
|
value = environment.__proto__;
|
|
value = (importDefault(4490) /* metro dependency 4490: getStreamSourceMetadataNative */)();
|
|
r7 = value;
|
|
} else {
|
|
r7 = value;
|
|
}
|
|
value = environment.__proto__;
|
|
const defaultImport = AnalyticsUtils;
|
|
const track = defaultImport.track;
|
|
const VIDEO_STREAM_STARTED = AnalyticEvents.VIDEO_STREAM_STARTED;
|
|
const object = {};
|
|
const getStreamAnalyticsProperties = this.getStreamAnalyticsProperties;
|
|
copyDataProperties(object, r7, copyDataProperties(object, Reflect.apply(getStreamAnalyticsProperties, this, []),
|
|
getStreamAnalyticsProperties));
|
|
const networkStoreBinding = NetworkStore;
|
|
object['connection_type'] = networkStoreBinding.getType();
|
|
object['effective_connection_speed'] = networkStoreBinding.getEffectiveConnectionSpeed();
|
|
object['service_provider'] = networkStoreBinding.getServiceProvider();
|
|
object['duration_go_live_modal'] = this.analyticsContext.goLiveModalDurationMs;
|
|
object['source_location_stack'] = this.analyticsContext.analyticsLocations;
|
|
Reflect.apply(track, defaultImport, [VIDEO_STREAM_STARTED, object]);
|
|
}
|
|
|
|
function value_37372(a0) { // fn#37372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:15078, offset: 0x010a37ec, size: 382 bytes, params: 2, frame: 19
|
|
var environment;
|
|
var r1;
|
|
var isOwner;
|
|
var getCodecUsageStats;
|
|
var property;
|
|
var object;
|
|
var settings;
|
|
const env0_1 = a0;
|
|
let value = environment.__proto__;
|
|
const channel = ChannelStore.getChannel(this.channelId);
|
|
const value3 = null;
|
|
const env0_4 = value3 != channel ? channel.type : value3;
|
|
const ownerId = this.streamContext.ownerId;
|
|
const _videoQuality = this._videoQuality;
|
|
if (value3 != _videoQuality) {
|
|
var env0_2 = _videoQuality.getNetworkStats();
|
|
isOwner = this.isOwner;
|
|
getCodecUsageStats = _videoQuality.getCodecUsageStats;
|
|
r1 = isOwner ? Reflect.apply(getCodecUsageStats, _videoQuality, ['streamer',
|
|
this.userId]) : Reflect.apply(getCodecUsageStats, _videoQuality, ['receiver', ownerId]);
|
|
property = (require(4491) /* metro dependency 4491: VoiceEngineStreamingManager */).default;
|
|
object = {};
|
|
object.stream_application_name = property.getApplicationNames();
|
|
settings = ClipsStore.getSettings();
|
|
isOwner = this.isOwner;
|
|
if (isOwner) {
|
|
object = {};
|
|
object.clips_enabled = (require(12382) /* metro dependency 12382: isClipsEnabled */).isClipsEnabled();
|
|
object.clips_buffer_length = settings.clipsLength;
|
|
} else {
|
|
object = {};
|
|
}
|
|
isOwner = this.isOwner;
|
|
if (isOwner) {
|
|
({}).bandwidth_estimation_experiment = this.getBandwidthEstimationExperiment();
|
|
} else {
|
|
object = {};
|
|
}
|
|
value = _videoQuality.getOutboundStats();
|
|
value.forEach(_fun37373);
|
|
value = _videoQuality.getInboundParticipants();
|
|
value.forEach(_fun37374);
|
|
}
|
|
function _fun37373(a0) { // fn#37373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:15647, offset: 0x010a396a, size: 479 bytes, params: 2, frame: 23
|
|
var value3;
|
|
var defaultImport;
|
|
var track;
|
|
var VIDEO_STREAM_ENDED;
|
|
var object;
|
|
var binding;
|
|
var videoStreamStats;
|
|
var getStats;
|
|
var soundshareStats;
|
|
var applicationStreamingSettingsStoreBinding;
|
|
const num_frames = a0.num_frames;
|
|
let value = null;
|
|
const value2 = 0;
|
|
if ((value != num_frames ? num_frames : value2) > value2) {
|
|
value3 = environment.__proto__.__proto__;
|
|
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
track = defaultImport.track;
|
|
VIDEO_STREAM_ENDED = AnalyticEvents.VIDEO_STREAM_ENDED;
|
|
object = {};
|
|
copyDataProperties(object, PossibleConstructorReturn, undefined);
|
|
copyDataProperties(object, env0_2, undefined);
|
|
copyDataProperties(object, Inherits, undefined);
|
|
binding = env0_0;
|
|
videoStreamStats = binding.videoStreamStats;
|
|
getStats = videoStreamStats.getStats;
|
|
copyDataProperties(object, Reflect.apply(getStats, videoStreamStats, []), videoStreamStats);
|
|
copyDataProperties(object, a0, videoStreamStats);
|
|
soundshareStats = binding.soundshareStats;
|
|
getStats = soundshareStats.getStats;
|
|
copyDataProperties(object, Reflect.apply(getStats, soundshareStats, []), videoStreamStats);
|
|
copyDataProperties(object, binding.getStreamAnalyticsProperties(), videoStreamStats);
|
|
copyDataProperties(object, ClassCallCheck, videoStreamStats);
|
|
copyDataProperties(object, CreateClass, videoStreamStats);
|
|
object['app_hardware_acceleration_enabled'] = (importDefault(4488) /* metro dependency 4488: CrossPlatformNativeUtilsNative */).getAppHardwareAccelerationEnabled();
|
|
object['channel_type'] = type;
|
|
object['reason'] = env0_1;
|
|
object['max_viewers'] = binding.analyticsContext.maxViewers;
|
|
object['hostname'] = binding.hostname;
|
|
object['hardware_enabled'] = MediaEngineStore.getHardwareEncoding();
|
|
object['device_performance_class'] = binding.isOwner ? (importDefault(5252) /* metro dependency 5252: getMediaPerformanceClassAndroid */)() : value;
|
|
value = MediaEngineStore.getExperimentalSoundshare();
|
|
object['soundshare_experimental'] = value;
|
|
applicationStreamingSettingsStoreBinding = ApplicationStreamingSettingsStore;
|
|
object['quality_preset'] = applicationStreamingSettingsStoreBinding.getState().preset;
|
|
value = importDefault(4488) /* metro dependency 4488: CrossPlatformNativeUtilsNative */;
|
|
value = value.getDiscordIsElevated();
|
|
object['discord_is_elevated'] = value;
|
|
Reflect.apply(track, defaultImport, [VIDEO_STREAM_ENDED, object]);
|
|
}
|
|
}
|
|
|
|
function _fun37374(a0) { // fn#37374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:16314, offset: 0x010a3b49, size: 407 bytes, params: 2, frame: 23
|
|
var value6;
|
|
var defaultImport;
|
|
var track;
|
|
var VIDEO_STREAM_ENDED;
|
|
var object;
|
|
var binding;
|
|
var videoStreamStats;
|
|
var getStats;
|
|
var soundshareStats;
|
|
const inboundStats = _videoQuality.getInboundStats(a0);
|
|
const value3 = null;
|
|
const value4 = undefined;
|
|
const num_frames = value3 == inboundStats ? value4 : inboundStats.num_frames;
|
|
const value5 = 0;
|
|
if ((value3 != num_frames ? num_frames : value5) > value5) {
|
|
value6 = environment.__proto__.__proto__;
|
|
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
track = defaultImport.track;
|
|
VIDEO_STREAM_ENDED = AnalyticEvents.VIDEO_STREAM_ENDED;
|
|
object = {};
|
|
copyDataProperties(object, PossibleConstructorReturn, undefined);
|
|
copyDataProperties(object, env0_2, undefined);
|
|
copyDataProperties(object, Inherits, undefined);
|
|
binding = env0_0;
|
|
videoStreamStats = binding.videoStreamStats;
|
|
getStats = videoStreamStats.getStats;
|
|
copyDataProperties(object, Reflect.apply(getStats, videoStreamStats, []), videoStreamStats);
|
|
copyDataProperties(object, inboundStats, videoStreamStats);
|
|
soundshareStats = binding.soundshareStats;
|
|
getStats = soundshareStats.getStats;
|
|
copyDataProperties(object, Reflect.apply(getStats, soundshareStats, []), videoStreamStats);
|
|
copyDataProperties(object, binding.getStreamAnalyticsProperties(), videoStreamStats);
|
|
copyDataProperties(object, ClassCallCheck, videoStreamStats);
|
|
copyDataProperties(object, CreateClass, videoStreamStats);
|
|
object['app_hardware_acceleration_enabled'] = (importDefault(4488) /* metro dependency 4488: CrossPlatformNativeUtilsNative */).getAppHardwareAccelerationEnabled();
|
|
object['channel_type'] = type;
|
|
object['reason'] = env0_1;
|
|
object['max_viewers'] = binding.analyticsContext.maxViewers;
|
|
object['hostname'] = binding.hostname;
|
|
object['hardware_enabled'] = MediaEngineStore.getHardwareEncoding();
|
|
object['device_performance_class'] = binding.isOwner ? (importDefault(5252) /* metro dependency 5252: getMediaPerformanceClassAndroid */)() : value3;
|
|
Reflect.apply(track, defaultImport, [VIDEO_STREAM_ENDED, object]);
|
|
}
|
|
return value4;
|
|
}
|
|
|
|
}
|
|
|
|
function value_37375() { // fn#37375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:16884, offset: 0x010a3ce0, size: 60 bytes, params: 1, frame: 12
|
|
let value = environment.__proto__;
|
|
value = require(4285) /* metro dependency 4285: StreamKeyUtils */;
|
|
return {streamUserId: value.decodeStreamKey(this.streamKey).ownerId};
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function value_37348() { // fn#37348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4570:4134, offset: 0x010a21ea, size: 139 bytes, params: 1, frame: 13
|
|
var r1;
|
|
const ownerId = this.streamContext.ownerId;
|
|
const _videoQuality = this._videoQuality;
|
|
if (_videoQuality != null) {
|
|
r1 = this.isOwner ? _videoQuality.getOutboundStats()[0] ?? ({}) : _videoQuality.getInboundStats(ownerId) ?? ({});
|
|
return {duration: r1.duration, avg_bitrate: r1.avg_bitrate, avg_fps: r1.avg_fps,
|
|
avg_resolution: r1.avg_resolution,
|
|
inbound_bitrate_estimate_percentile99: r1.inbound_bitrate_estimate_percentile99};
|
|
}
|
|
return null;
|
|
}
|
|
|
|
global.__d(_fun37323, 4398, [15, 17, 102, 18, 6, 7, 4265, 4289, 4399, 1226, 1379, 4400, 4259, 4401, 4294, 4402, 661,
|
|
4291, 672, 4285, 4403, 4041, 4404, 22, 694, 4405, 4406, 4482, 683, 4488, 4489, 4303, 4490, 4491, 12382, 5252,
|
|
4301,
|
|
2]) /* metro module 4398, dependencies: [15, 17, 102, 18, 6, 7, 4265, 4289, 4399, 1226, 1379, 4400, 4259, 4401, 4294, 4402, 661, 4291, 672, 4285, 4403, 4041, 4404, 22, 694, 4405, 4406, 4482, 683, 4488, 4489, 4303, 4490, 4491, 12382, 5252, 4301, 2] */;
|