Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,262 @@
/* Metro module 13611; source: modules/video-qoe/MobileMuxWrapper.tsx; dependencies: [6, 7, 4, 13612, 2] */
function _fun103931(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13808:6, offset: 0x02279160, size: 180 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const Logger = (require(4) /* metro dependency 4: Logger */).Logger;
let logger = new Logger('MobileMuxWrapper');
logger = _fun103932();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video-qoe/MobileMuxWrapper.tsx');
exports.MobileMuxWrapper = logger;
}
function _fun103932() { // fn#103932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13808:160, offset: 0x02279214, size: 588 bytes, params: 1, frame: 15
return env0_3(MobileMuxWrapper, [{key: 'initialize', value: value_103934}, {key: 'updatePlayheadTime',
value: function(a0) {
var muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.updatePlayheadTime(a0);
}
}}, {key: 'updateVideoDimensions', value: function(a0, a1) {
var muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.updateVideoDimensions(a0, a1);
}
}}, {key: 'updateVideoSourceDimensions', value: function(a0, a1) {
var muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.updateVideoSourceDimensions(a0, a1);
}
}}, {key: 'updateVideoSource', value: function(a0, a1, a2) {
var muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.updateVideoSource(a0, a1, a2);
}
}}, {key: 'updatePlayerState', value: function(a0, a1) {
var muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.updatePlayerState(a0, a1);
}
}}, {key: 'onLoadStart', value: function() {
var muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.emitLoadStart();
}
}}, {key: 'onLoad', value: function(a0) {
var muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.emitLoad(a0);
}
}}, {key: 'onPlay', value: function() {
var muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.emitPlay();
}
}}, {key: 'onPause', value: function() {
var muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.emitPause();
}
}}, {key: 'onPlaying', value: function() {
var muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.emitPlaying();
}
}}, {key: 'onCanPlay', value: function() {
var muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.emitCanPlay();
}
}}, {key: 'onSeek', value: function() {
var env0_0 = this;
if (this.muxIntegration != null) {
if (!this.seekingEmitted) {
this.muxIntegration.emitSeeking();
this.seekingEmitted = true;
}
if (this.seekTimeout != null) {
global.clearTimeout(this.seekTimeout);
}
this.seekTimeout = global.setTimeout(_fun103947, 100);
}
}}, {key: 'onEnd', value: function() {
var muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.emitEnded();
}
muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.destroy();
}
}}, {key: 'onError', value: function(a0) {
var muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.emitError(a0);
}
}}, {key: 'onProgress', value: function(a0) {
this.updatePlayheadTime(a0);
var muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.emitTimeUpdate();
}
}}, {key: 'onBuffer', value: function(a0) {
var muxIntegration;
if (!a0) {
muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.emitCanPlay();
}
muxIntegration = this.muxIntegration;
if (muxIntegration != null && muxIntegration.hasPlayStarted()) {
muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.emitPlaying();
}
}
}
}}, {key: 'onReadyForDisplay', value: function() {
var muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.emitPlayerReady();
}
muxIntegration = this.muxIntegration;
if (muxIntegration != null && muxIntegration.hasPlayStarted()) {
muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.emitPlaying();
}
}
}}, {key: 'onVideoTrackChange', value: function(a0, a1) {
var muxIntegration;
var env0_0 = a0;
var value = a1.find(_fun103954);
if (value != null) {
muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.emitRenditionChange(value.width, value.height, value.bitrate);
}
}
}}, {key: 'destroy', value: value_103955}, {key: 'getSessionId', value: function() {
var r1;
var muxIntegration = this.muxIntegration;
var value = null;
r1 = value == muxIntegration ? undefined : muxIntegration.getSessionId();
return value != r1 ? r1 : value;
}}, {key: 'isInitialized', value: function() {
return this.muxIntegration != null;
}}]);
}
function MobileMuxWrapper(a0) { // fn#103933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13808:181, offset: 0x02279460, size: 58 bytes, params: 2, frame: 13
env1_2(this, MobileMuxWrapper);
this.muxIntegration = null;
this.seekingEmitted = false;
this.seekTimeout = null;
this.config = a0;
}
function value_103934() { // fn#103934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13808:346, offset: 0x0227949a, size: 143 bytes, params: 1, frame: 14
var value;
var property;
var moduleValue;
var MobileCustomMuxIntegration;
var config;
var prototype;
var value2;
var mobileCustomMuxIntegration;
var value3;
var muxIntegration;
var binding;
var error;
try {
value = environment.__proto__;
property = dependencyMap[3];
moduleValue = require(property);
MobileCustomMuxIntegration = moduleValue.MobileCustomMuxIntegration;
config = this.config;
prototype = MobileCustomMuxIntegration.prototype;
value2 = Object.create(prototype, {constructor: {value: MobileCustomMuxIntegration}});
mobileCustomMuxIntegration = new MobileCustomMuxIntegration();
value3 = mobileCustomMuxIntegration instanceof Object ? mobileCustomMuxIntegration : value2;
this.muxIntegration = value3;
muxIntegration = this.muxIntegration;
muxIntegration.initialize();
binding = env1_4;
binding.info('MobileMuxWrapper initialized successfully');
} catch (error) {
binding = env1_4;
binding.error('Error initializing MobileMuxWrapper', error);
this.muxIntegration = null;
}
}
function value_103946() { // fn#103946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13808:1724, offset: 0x0227969c, size: 123 bytes, params: 1, frame: 14
if (this.muxIntegration != null) {
if (!this.seekingEmitted) {
this.muxIntegration.emitSeeking();
this.seekingEmitted = true;
}
if (this.seekTimeout != null) {
global.clearTimeout(this.seekTimeout);
}
this.seekTimeout = global.setTimeout(_fun103947, 100);
}
}
function value_103953(a0, a1) { // fn#103953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13808:2812, offset: 0x0227986b, size: 84 bytes, params: 3, frame: 15
var muxIntegration;
const env0_0 = a0;
const value = a1.find(_fun103954);
if (value != null) {
muxIntegration = this.muxIntegration;
if (muxIntegration != null) {
muxIntegration.emitRenditionChange(value.width, value.height, value.bitrate);
}
}
}
function value_103955() { // fn#103955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13808:2976, offset: 0x022798d5, size: 106 bytes, params: 1, frame: 15
var seekTimeout;
var value;
var clearTimeout;
var muxIntegration;
var error;
var binding;
try {
seekTimeout = this.seekTimeout;
value = seekTimeout == null;
if (!value) {
clearTimeout = global.clearTimeout;
seekTimeout = this.seekTimeout;
clearTimeout(seekTimeout);
this.seekTimeout = null;
}
muxIntegration = this.muxIntegration;
value = muxIntegration == null;
if (!value) {
muxIntegration.destroy();
}
this.muxIntegration = null;
} catch (error) {
value = environment.__proto__;
binding = env1_4;
binding.error('Error destroying MobileMuxWrapper', error);
}
}
function _fun103947() { // fn#103947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13808:1927, offset: 0x02279717, size: 53 bytes, params: 1, frame: 11
const muxIntegration = env0_0.muxIntegration;
if (muxIntegration != null) {
muxIntegration.emitSeeked();
}
const binding = env0_0;
binding.seekingEmitted = false;
binding.seekTimeout = null;
}
function _fun103954({trackId}) { // fn#103954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13808:2842, offset: 0x022798bf, size: 22 bytes, params: 2, frame: 2
return trackId === env0_0;
}
@@ -0,0 +1,129 @@
/* Metro module 13607; source: modules/video-qoe/SimpleMuxWrapper.tsx; dependencies: [6, 7, 4, 13608, 13609, 13610, 2] */
function _fun103483(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13797:6, offset: 0x0226b133, size: 184 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const Logger = (require(4) /* metro dependency 4: Logger */).Logger;
let logger = new Logger('SimpleMuxWrapper');
logger = _fun103484();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video-qoe/SimpleMuxWrapper.tsx');
exports.SimpleMuxWrapper = logger;
}
function _fun103484() { // fn#103484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13797:160, offset: 0x0226b1eb, size: 134 bytes, params: 1, frame: 15
return env0_4(SimpleMuxWrapper, [{key: 'initialize', value: value_103486}, {key: 'endSession', value: value_103487},
{key: 'destroy', value: value_103488}, {key: 'getSessionId', value: function() {
return this.sessionId;
}}]);
}
function SimpleMuxWrapper(a0) { // fn#103485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13797:181, offset: 0x0226b271, size: 110 bytes, params: 2, frame: 15
env1_3(this, SimpleMuxWrapper);
this.isMonitoring = false;
this.config = a0;
this.videoElement = a0.videoElement;
const SessionManager = (require(13608) /* metro dependency 13608: SessionManager */).SessionManager;
this.sessionId = SessionManager.generateSessionId();
this.hlsInstance = a0.hlsInstance;
}
function value_103486() { // fn#103486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13797:419, offset: 0x0226b2df, size: 236 bytes, params: 1, frame: 20
var property;
var defaultImport;
var monitor;
var videoElement;
var error;
var binding;
const object2 = {'debug': null, 'disableCookies': true, 'respectDoNotTrack': true};
const debug = this.config.debug;
object2.debug = debug != null && debug;
value = environment.__proto__;
const MuxIntegration = require(dependencyMap[4]).MuxIntegration;
object2.data = MuxIntegration.mapDiscordToMuxMetadata(this.config, this.sessionId);
let hlsInstance = this.hlsInstance;
if (hlsInstance != null) {
hlsInstance = this.hlsInstance;
object2.hlsjs = hlsInstance;
hlsInstance = this.hlsInstance;
object2.Hls = hlsInstance.constructor;
}
try {
property = dependencyMap[5];
defaultImport = importDefault(property);
monitor = defaultImport.monitor;
videoElement = this.videoElement;
Reflect.apply(monitor, defaultImport, [videoElement, object2]);
this.isMonitoring = true;
} catch (error) {
binding = env1_5;
binding.error('Error creating Mux monitor', error);
this.isMonitoring = false;
}
}
function value_103487() { // fn#103487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13797:841, offset: 0x0226b3cb, size: 128 bytes, params: 1, frame: 15
var value;
var property;
var defaultImport;
var destroyMonitor;
var value2;
var defaultImport2;
var videoElement;
var error;
var binding;
if (this.isMonitoring) {
try {
value = environment.__proto__;
property = dependencyMap[5];
defaultImport = importDefault(property);
destroyMonitor = defaultImport.destroyMonitor;
value2 = typeof destroyMonitor !== 'function';
if (!value2) {
property = dependencyMap[5];
defaultImport2 = importDefault(property);
destroyMonitor = defaultImport2.destroyMonitor;
videoElement = this.videoElement;
Reflect.apply(destroyMonitor, defaultImport2, [videoElement]);
}
this.isMonitoring = false;
} catch (error) {
binding = env1_5;
binding.error('Error ending Mux session', error);
}
}
}
function value_103488() { // fn#103488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13797:1054, offset: 0x0226b44b, size: 128 bytes, params: 1, frame: 15
var value;
var property;
var defaultImport;
var destroyMonitor;
var value2;
var defaultImport2;
var videoElement;
var error;
var binding;
if (this.isMonitoring) {
try {
value = environment.__proto__;
property = dependencyMap[5];
defaultImport = importDefault(property);
destroyMonitor = defaultImport.destroyMonitor;
value2 = typeof destroyMonitor !== 'function';
if (!value2) {
property = dependencyMap[5];
defaultImport2 = importDefault(property);
destroyMonitor = defaultImport2.destroyMonitor;
videoElement = this.videoElement;
Reflect.apply(destroyMonitor, defaultImport2, [videoElement]);
}
this.isMonitoring = false;
} catch (error) {
binding = env1_5;
binding.error('Error destroying Mux monitor', error);
}
}
}
@@ -0,0 +1,11 @@
/* Metro module 13613; source: modules/video-qoe/experiments/VideoQoEMetricsExperiment.tsx; dependencies: [1854, 2] */
function _fun103992(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13810:6, offset: 0x0227a9ab, size: 171 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2025-09-video-qoe-metrics-tracking',
'kind': 'user', defaultConfig: {externalAnalyticsEnabled: false},
variations: {[0]: {externalAnalyticsEnabled: false}, [1]: {externalAnalyticsEnabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video-qoe/experiments/VideoQoEMetricsExperiment.tsx');
exports.getVideoQoEMetricsConfig = getVideoQoEMetricsConfig;
}
+19
View File
@@ -0,0 +1,19 @@
/* Metro module 13606; source: modules/video-qoe/index.tsx; dependencies: [2, 13607, 13611, 13609, 13612, 13608, 13613] */
function _fun103482(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13796:6, offset: 0x0226b05b, size: 216 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video-qoe/index.tsx');
const SimpleMuxWrapper = (require(13607) /* metro dependency 13607: SimpleMuxWrapper */).SimpleMuxWrapper;
exports.SimpleMuxWrapper = SimpleMuxWrapper;
const MobileMuxWrapper = (require(13611) /* metro dependency 13611: MobileMuxWrapper */).MobileMuxWrapper;
exports.MobileMuxWrapper = MobileMuxWrapper;
const MuxIntegration = (require(13609) /* metro dependency 13609: MuxIntegration */).MuxIntegration;
exports.MuxIntegration = MuxIntegration;
const MobileCustomMuxIntegration = (require(13612) /* metro dependency 13612: MobileCustomMuxIntegration */).MobileCustomMuxIntegration;
exports.MobileCustomMuxIntegration = MobileCustomMuxIntegration;
const SessionManager = (require(13608) /* metro dependency 13608: SessionManager */).SessionManager;
exports.SessionManager = SessionManager;
const getVideoQoEMetricsConfig = (require(13613) /* metro dependency 13613: VideoQoEMetricsExperiment */).getVideoQoEMetricsConfig;
exports.getVideoQoEMetricsConfig = getVideoQoEMetricsConfig;
}
@@ -0,0 +1,690 @@
/* Metro module 13612; source: modules/video-qoe/integrations/MobileCustomMuxIntegration.tsx; dependencies: [6, 7, 4, 13608, 13610, 2] */
function _fun103958(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:6, offset: 0x0227997c, size: 184 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const Logger = (require(4) /* metro dependency 4: Logger */).Logger;
let logger = new Logger('MobileCustomMuxIntegration');
logger = _fun103959();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video-qoe/integrations/MobileCustomMuxIntegration.tsx');
exports.MobileCustomMuxIntegration = logger;
}
function _fun103959() { // fn#103959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:201, offset: 0x02279a34, size: 785 bytes, params: 1, frame: 15
return env0_4(MobileCustomMuxIntegration, [{key: 'initialize', value: value_103963}, {key: 'updatePlayheadTime',
value: function(a0) {
this.currentPlayheadTime = a0;
}}, {key: 'updateVideoDimensions', value: function(a0, a1) {
this.videoState.player_width = a0;
this.videoState.player_height = a1;
}}, {key: 'updateVideoSourceDimensions', value: function(a0, a1) {
this.videoState.video_source_width = a0;
this.videoState.video_source_height = a1;
}}, {key: 'updateVideoSource', value: function(a0, a1, a2) {
this.videoState.video_source_url = a0;
this.videoState.video_source_mime_type = a1;
var videoState = this.videoState;
var value = undefined;
videoState.video_source_duration = a2 != null ? a2 * 1000 : value;
return value;
}}, {key: 'updatePlayerState', value: function(a0, a1) {
this.videoState.player_is_paused = a0;
if (a1 != null) {
this.videoState.player_is_fullscreen = a1;
}
}}, {key: 'emitPlayerReady', value: value_103969}, {key: 'emitViewInit', value: value_103970},
{key: 'emitLoadStart', value: value_103971}, {key: 'emitLoad', value: value_103972}, {key: 'emitPlay',
value: value_103973}, {key: 'emitPause', value: value_103974}, {key: 'emitPlaying', value: value_103975},
{key: 'emitWaiting', value: value_103976}, {key: 'emitCanPlay', value: function() {
this.emitPlayerReady();
}}, {key: 'emitSeeking', value: value_103978}, {key: 'emitSeeked', value: value_103979}, {key: 'emitEnded',
value: value_103980}, {key: 'emitError', value: value_103981}, {key: 'emitTimeUpdate', value: value_103982},
{key: 'emitRenditionChange', value: value_103983}, {key: 'destroy', value: value_103984}, {key: 'emitViewEnd',
value: value_103985}, {key: 'getSessionId', value: function() {
return this.sessionId;
}}, {key: 'hasPlayStarted', value: function() {
return this.playStarted;
}}, {key: 'mapConfigToMuxData', value: value_103988}, {key: 'getAppVersion', value: function() {
return this.config.appVersion ?? 'unknown';
}}, {key: 'getMuxEnvKey', value: function() {
return '1qd16mdmdjasipqg3irobln4u';
}}, {key: 'getBuildChannel', value: function() {
return this.config.releaseChannel ?? 'stable';
}}]);
}
function MobileCustomMuxIntegration(a0) { // fn#103960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:222, offset: 0x02279d45, size: 371 bytes, params: 2, frame: 16
var environment;
const value = environment.__proto__;
env1_3(this, MobileCustomMuxIntegration);
this.isInitialized = false;
this.viewInitEmitted = false;
this.playerReadyEmitted = false;
this.playStarted = false;
this.playingEmitted = false;
this.currentPlayheadTime = 0;
this.currentRendition = null;
this.getPlayheadTime = getPlayheadTime;
this.getStateData = getStateData;
this.config = a0;
const SessionManager = (require(13608) /* metro dependency 13608: SessionManager */).SessionManager;
this.sessionId = SessionManager.generateSessionId();
this.playerId = 'discord-mobile-' + this.sessionId;
this.videoState = {'player_is_paused': true, 'player_width': 0, 'player_height': 0, 'player_autoplay_on': false,
'player_preload_on': true, 'video_cdn': 'Cloudflare', video_series: a0.contentMetadata.questId,
video_producer: a0.contentMetadata.gameId, video_brand: a0.contentMetadata.gameName,
video_title: a0.contentMetadata.title, video_stream_type: a0.contentMetadata.videoStreamType,
video_source_url: a0.contentMetadata.contentId,
video_source_mime_type: a0.contentMetadata.videoStreamType !== 'hls' ? 'video/mp4' : 'application/x-mpegURL',
video_source_duration: a0.contentMetadata.durationMs};
}
function value_103963() { // fn#103963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:1231, offset: 0x02279ee0, size: 269 bytes, params: 1, frame: 22
var r8;
var binding;
var info;
var value2;
var property;
var defaultImport;
var init;
var playerId;
var object2;
var config;
var debug;
var value3;
var getPlayheadTime;
var getStateData;
var error;
let value = this.getMuxEnvKey();
if (value == null) {
value = environment.__proto__;
env1_5.info('Mux environment key not available, skipping QoE tracking');
} else if (value.length !== 0) {
try {
value2 = environment.__proto__;
property = dependencyMap[4];
defaultImport = importDefault(property);
init = defaultImport.init;
playerId = this.playerId;
object2 = {};
config = this.config;
debug = config.debug;
value3 = debug != null;
r8 = value3 && debug;
object2.debug = r8;
getPlayheadTime = this.getPlayheadTime;
object2.getPlayheadTime = getPlayheadTime;
getStateData = this.getStateData;
object2.getStateData = getStateData;
value = this.mapConfigToMuxData(value);
object2.data = value;
Reflect.apply(init, defaultImport, [playerId, object2]);
this.isInitialized = true;
binding = env1_5;
info = binding.info;
playerId = this.playerId;
Reflect.apply(info, binding, ['Mux Data mobile integration initialized', {playerId: playerId}]);
} catch (error) {
binding = env1_5;
binding.error('Error initializing Mux mobile integration', error);
this.isInitialized = false;
}
} else {
value = environment.__proto__;
env1_5.info('Mux environment key not available, skipping QoE tracking');
}
}
function value_103969() { // fn#103969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:2389, offset: 0x0227a0bb, size: 110 bytes, params: 1, frame: 14
var value;
var property;
var defaultImport;
var emit;
var playerId;
var error;
var binding;
if (this.isInitialized) {
if (!this.playerReadyEmitted) {
try {
value = environment.__proto__;
property = dependencyMap[4];
defaultImport = importDefault(property);
emit = defaultImport.emit;
playerId = this.playerId;
Reflect.apply(emit, defaultImport, [playerId, 'playerready']);
this.playerReadyEmitted = true;
} catch (error) {
binding = env1_5;
binding.error('Error emitting playerready event', error);
}
}
}
}
function value_103970() { // fn#103970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:2605, offset: 0x0227a129, size: 110 bytes, params: 1, frame: 14
var value;
var property;
var defaultImport;
var emit;
var playerId;
var error;
var binding;
if (this.isInitialized) {
if (!this.viewInitEmitted) {
try {
value = environment.__proto__;
property = dependencyMap[4];
defaultImport = importDefault(property);
emit = defaultImport.emit;
playerId = this.playerId;
Reflect.apply(emit, defaultImport, [playerId, 'viewinit']);
this.viewInitEmitted = true;
} catch (error) {
binding = env1_5;
binding.error('Error emitting viewinit event', error);
}
}
}
}
function value_103971() { // fn#103971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:2810, offset: 0x0227a197, size: 54 bytes, params: 1, frame: 13
var error;
var value;
var binding;
if (this.isInitialized) {
try {
this.emitViewInit();
} catch (error) {
value = environment.__proto__;
binding = env1_5;
binding.error('Error emitting loadstart/viewinit event', error);
}
}
}
function value_103972(a0) { // fn#103972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:2954, offset: 0x0227a1cd, size: 65 bytes, params: 2, frame: 14
var error;
var value;
var binding;
if (this.isInitialized) {
try {
this.updateVideoSource(undefined, undefined, a0);
} catch (error) {
value = environment.__proto__;
binding = env1_5;
binding.error('Error emitting load events', error);
}
}
}
function value_103973() { // fn#103973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:3106, offset: 0x0227a20e, size: 137 bytes, params: 1, frame: 15
var viewInitEmitted;
var value;
var property;
var emit;
var playerId;
var error;
var binding;
if (this.isInitialized) {
try {
viewInitEmitted = this.viewInitEmitted;
if (!viewInitEmitted) {
this.emitViewInit();
}
this.updatePlayerState(false);
value = environment.__proto__;
property = dependencyMap[4];
value = importDefault(property);
emit = value.emit;
playerId = this.playerId;
Reflect.apply(emit, value, [playerId, 'play']);
this.playStarted = true;
this.playingEmitted = false;
} catch (error) {
value = environment.__proto__;
binding = env1_5;
binding.error('Error emitting play event', error);
}
}
}
function value_103974() { // fn#103974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:3364, offset: 0x0227a297, size: 104 bytes, params: 1, frame: 13
var value;
var property;
var emit;
var playerId;
var error;
var binding;
if (this.isInitialized) {
try {
this.updatePlayerState(true);
value = environment.__proto__;
property = dependencyMap[4];
value = importDefault(property);
emit = value.emit;
playerId = this.playerId;
Reflect.apply(emit, value, [playerId, 'pause']);
} catch (error) {
value = environment.__proto__;
binding = env1_5;
binding.error('Error emitting pause event', error);
}
}
}
function value_103975() { // fn#103975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:3541, offset: 0x0227a2ff, size: 197 bytes, params: 1, frame: 14
var viewInitEmitted;
var playStarted;
var value;
var property;
var emit;
var playerId;
var error;
var binding;
if (this.isInitialized) {
if (!this.playingEmitted) {
try {
viewInitEmitted = this.viewInitEmitted;
if (!viewInitEmitted) {
this.emitViewInit();
}
playStarted = this.playStarted;
if (!playStarted) {
value = environment.__proto__;
value = importDefault(dependencyMap[4]);
value.emit(this.playerId, 'play');
this.playStarted = true;
}
value = environment.__proto__;
property = dependencyMap[4];
value = importDefault(property);
emit = value.emit;
playerId = this.playerId;
Reflect.apply(emit, value, [playerId, 'playing']);
this.playingEmitted = true;
} catch (error) {
value = environment.__proto__;
binding = env1_5;
binding.error('Error emitting playing event', error);
}
}
}
}
function value_103976() { // fn#103976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:3857, offset: 0x0227a3c4, size: 93 bytes, params: 1, frame: 13
var value;
var property;
var defaultImport;
var emit;
var playerId;
var error;
var binding;
if (this.isInitialized) {
try {
value = environment.__proto__;
property = dependencyMap[4];
defaultImport = importDefault(property);
emit = defaultImport.emit;
playerId = this.playerId;
Reflect.apply(emit, defaultImport, [playerId, 'waiting']);
} catch (error) {
binding = env1_5;
binding.error('Error emitting waiting event', error);
}
}
}
function value_103978() { // fn#103978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:4072, offset: 0x0227a432, size: 93 bytes, params: 1, frame: 13
var value;
var property;
var defaultImport;
var emit;
var playerId;
var error;
var binding;
if (this.isInitialized) {
try {
value = environment.__proto__;
property = dependencyMap[4];
defaultImport = importDefault(property);
emit = defaultImport.emit;
playerId = this.playerId;
Reflect.apply(emit, defaultImport, [playerId, 'seeking']);
} catch (error) {
binding = env1_5;
binding.error('Error emitting seeking event', error);
}
}
}
function value_103979() { // fn#103979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:4225, offset: 0x0227a48f, size: 93 bytes, params: 1, frame: 13
var value;
var property;
var defaultImport;
var emit;
var playerId;
var error;
var binding;
if (this.isInitialized) {
try {
value = environment.__proto__;
property = dependencyMap[4];
defaultImport = importDefault(property);
emit = defaultImport.emit;
playerId = this.playerId;
Reflect.apply(emit, defaultImport, [playerId, 'seeked']);
} catch (error) {
binding = env1_5;
binding.error('Error emitting seeked event', error);
}
}
}
function value_103980() { // fn#103980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:4375, offset: 0x0227a4ec, size: 101 bytes, params: 1, frame: 14
var value;
var property;
var defaultImport;
var emit;
var playerId;
var error;
var binding;
if (this.isInitialized) {
try {
value = environment.__proto__;
property = dependencyMap[4];
defaultImport = importDefault(property);
emit = defaultImport.emit;
playerId = this.playerId;
Reflect.apply(emit, defaultImport, [playerId, 'ended']);
this.emitViewEnd();
} catch (error) {
binding = env1_5;
binding.error('Error emitting ended event', error);
}
}
}
function value_103981(a0) { // fn#103981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:4542, offset: 0x0227a551, size: 98 bytes, params: 2, frame: 15
var value;
var property;
var defaultImport;
var emit;
var playerId;
var error;
var binding;
if (this.isInitialized) {
try {
value = environment.__proto__;
property = dependencyMap[4];
defaultImport = importDefault(property);
emit = defaultImport.emit;
playerId = this.playerId;
Reflect.apply(emit, defaultImport, [playerId, 'error', a0]);
} catch (error) {
binding = env1_5;
binding.error('Error emitting error event', error);
}
}
}
function value_103982() { // fn#103982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:4698, offset: 0x0227a5b3, size: 154 bytes, params: 1, frame: 16
var r1;
var playStarted;
var playingEmitted;
var value;
var property;
var emit;
var playerId;
var currentPlayheadTime;
var value2;
var error;
var binding;
if (this.isInitialized) {
try {
playStarted = this.playStarted;
if (playStarted) {
playingEmitted = this.playingEmitted;
r1 = !playingEmitted;
} else {
r1 = playStarted;
}
if (r1) {
this.emitPlaying();
}
value = environment.__proto__;
property = dependencyMap[4];
value = importDefault(property);
emit = value.emit;
playerId = this.playerId;
currentPlayheadTime = this.currentPlayheadTime;
value2 = currentPlayheadTime * 1000;
Reflect.apply(emit, value, [playerId, 'timeupdate', {player_playhead_time: value2}]);
} catch (error) {
value = environment.__proto__;
binding = env1_5;
binding.error('Error emitting timeupdate event', error);
}
}
}
function value_103983(a0, a1, a2) { // fn#103983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:4975, offset: 0x0227a64d, size: 232 bytes, params: 4, frame: 17
var isInitialized;
var currentRendition;
var width;
var height;
var bitrate;
var object2;
var updateVideoSourceDimensions;
var value;
var property;
var emit;
var playerId;
var error;
var binding;
var error2;
reduciblePort30: while (true) {
exceptionLanding29: while (true) {
isInitialized = this.isInitialized;
if (isInitialized) {
currentRendition = this.currentRendition;
if (currentRendition != null) {
currentRendition = this.currentRendition;
width = currentRendition.width;
if (width === a0) {
currentRendition = this.currentRendition;
height = currentRendition.height;
if (height === a1) {
currentRendition = this.currentRendition;
bitrate = currentRendition.bitrate;
if (bitrate === a2) {
break reduciblePort30;
}
}
}
}
try {
object2 = {};
} catch (error) {
break exceptionLanding29;
}
try {
object2.width = a0;
} catch (error) {
break exceptionLanding29;
}
try {
object2.height = a1;
} catch (error) {
break exceptionLanding29;
}
try {
object2.bitrate = a2;
} catch (error) {
break exceptionLanding29;
}
try {
this.currentRendition = object2;
} catch (error) {
break exceptionLanding29;
}
try {
updateVideoSourceDimensions = this.updateVideoSourceDimensions;
} catch (error) {
break exceptionLanding29;
}
try {
Reflect.apply(updateVideoSourceDimensions, this, [a0, a1]);
} catch (error) {
break exceptionLanding29;
}
value = environment.__proto__;
try {
} catch (error) {
break exceptionLanding29;
}
try {
} catch (error) {
break exceptionLanding29;
}
try {
property = dependencyMap[4];
} catch (error) {
break exceptionLanding29;
}
try {
value = importDefault(property);
} catch (error) {
break exceptionLanding29;
}
try {
emit = value.emit;
} catch (error) {
break exceptionLanding29;
}
try {
playerId = this.playerId;
} catch (error) {
break exceptionLanding29;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding29;
}
try {
object2.video_source_width = a0;
} catch (error) {
break exceptionLanding29;
}
try {
object2.video_source_height = a1;
} catch (error) {
break exceptionLanding29;
}
try {
object2.video_source_bitrate = a2;
} catch (error) {
break exceptionLanding29;
}
try {
Reflect.apply(emit, value, [playerId, 'renditionchange', object2]);
} catch (error) {
break exceptionLanding29;
}
break reduciblePort30;
}
break reduciblePort30;
}
value = environment.__proto__;
binding = env1_5;
error2 = binding.error;
Reflect.apply(error2, binding, ['Error emitting renditionchange event', error]);
break reduciblePort30;
}
}
function value_103984() { // fn#103984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:5436, offset: 0x0227a735, size: 147 bytes, params: 1, frame: 15
var value;
var property;
var defaultImport;
var emit;
var playerId;
var binding;
var info;
var error;
if (this.isInitialized) {
try {
this.emitViewEnd();
value = environment.__proto__;
property = dependencyMap[4];
defaultImport = importDefault(property);
emit = defaultImport.emit;
playerId = this.playerId;
Reflect.apply(emit, defaultImport, [playerId, 'destroy']);
this.isInitialized = false;
binding = env1_5;
info = binding.info;
playerId = this.playerId;
Reflect.apply(info, binding, ['Mux Data mobile integration destroyed', {playerId: playerId}]);
} catch (error) {
value = environment.__proto__;
binding = env1_5;
binding.error('Error destroying Mux mobile integration', error);
}
}
}
function value_103985() { // fn#103985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:5715, offset: 0x0227a7c8, size: 93 bytes, params: 1, frame: 13
var value;
var property;
var defaultImport;
var emit;
var playerId;
var error;
var binding;
if (this.isInitialized) {
try {
value = environment.__proto__;
property = dependencyMap[4];
defaultImport = importDefault(property);
emit = defaultImport.emit;
playerId = this.playerId;
Reflect.apply(emit, defaultImport, [playerId, 'viewend']);
} catch (error) {
binding = env1_5;
binding.error('Error emitting viewend event', error);
}
}
}
function value_103988(a0) { // fn#103988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:6002, offset: 0x0227a830, size: 305 bytes, params: 2, frame: 12
const object2 = {'env_key': null, 'session_id': null, 'player_name': 'discord-mobile', 'player_version': '1.0.0',
'player_software_name': 'react-native-video', 'player_software_version': '5.2.1-discord',
'player_mux_plugin_name': 'discord-mobile-custom-integration', 'player_mux_plugin_version': '1.0.0'};
object2.env_key = a0;
object2.session_id = this.sessionId;
object2.video_id = this.config.contentMetadata.contentId;
object2.video_title = this.config.contentMetadata.title;
object2.video_duration = this.config.contentMetadata.durationMs;
object2.video_content_type = this.config.contentMetadata.contentType;
object2.video_series = this.config.contentMetadata.questId;
object2.video_producer = this.config.contentMetadata.gameId;
object2.video_brand = this.config.contentMetadata.gameName ?? 'Discord';
object2.video_cdn = 'Cloudflare';
object2.video_stream_type = this.config.contentMetadata.videoStreamType;
object2.view_client_application_name = this.getBuildChannel();
object2.view_client_application_version = this.getAppVersion();
object2.experiment_name = this.config.contentMetadata.experimentName;
return object2;
}
function MobileCustomMuxIntegrationGetPlayheadTime() { // fn#103961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:487, owner: MobileCustomMuxIntegration.getPlayheadTime, offset: 0x02279eb8, size: 25 bytes, params: 1, frame: 2
return env0_0.currentPlayheadTime * 1000;
}
function MobileCustomMuxIntegrationGetStateData() { // fn#103962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13809:536, owner: MobileCustomMuxIntegration.getStateData, offset: 0x02279ed1, size: 15 bytes, params: 1, frame: 1
return env0_0.videoState;
}
@@ -0,0 +1,68 @@
/* Metro module 13609; source: modules/video-qoe/integrations/MuxIntegration.tsx; dependencies: [6, 7, 2] */
function _fun103494(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13799:6, offset: 0x0226b5f0, size: 126 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const value = _fun103495();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video-qoe/integrations/MuxIntegration.tsx');
exports.MuxIntegration = value;
}
function _fun103495() { // fn#103495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13799:118, offset: 0x0226b66e, size: 114 bytes, params: 1, frame: 16
return env0_1(MuxIntegration, null, [{key: 'mapDiscordToMuxMetadata', value: value_103497}, {key: 'getAppVersion',
value: function() {
return '5867';
}}, {key: 'getBuildChannel', value: function() {
var r2;
var r0;
var property;
var value2;
var value3;
var error;
var value = undefined;
try {
property = global.window;
property = property.GLOBAL_ENV;
value2 = property == null;
if (value2) {
r2 = value;
} else {
property = property.RELEASE_CHANNEL;
r2 = property;
}
value = r2 != null;
value3 = 'stable';
r0 = value ? r2 : value3;
} catch (error) {
return 'stable';
}
return r0;
}}]);
}
function value_103497(a0, a1) { // fn#103497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13799:233, offset: 0x0226b6e0, size: 330 bytes, params: 3, frame: 15
const object2 = {'env_key': '1qd16mdmdjasipqg3irobln4u', 'session_id': null, 'player_name': 'discord',
'player_version': '1.0.0'};
object2.session_id = a1;
object2.video_id = a0.contentMetadata.contentId;
object2.video_title = a0.contentMetadata.title;
object2.video_duration = a0.contentMetadata.durationMs ?? (a0.contentMetadata.durationSec != null ? 1000 * a0.contentMetadata.durationSec : undefined);
object2.video_content_type = a0.contentMetadata.contentType;
object2.video_series = a0.contentMetadata.questId;
object2.video_producer = a0.contentMetadata.gameId;
object2.video_brand = a0.contentMetadata.gameName ?? 'Discord';
object2.video_cdn = 'Cloudflare';
object2.video_stream_type = a0.contentMetadata.videoStreamType;
object2.view_client_application_name = this.getBuildChannel();
object2.view_client_application_version = this.getAppVersion();
let userContext = a0.userContext;
value = undefined;
const userId = userContext == null ? value : userContext.userId;
object2.viewer_user_id = userId;
userContext = a0.userContext;
const userTier = userContext == null ? value : userContext.userTier;
object2.viewer_plan = userTier;
return object2;
}
@@ -0,0 +1,17 @@
/* Metro module 13608; source: modules/video-qoe/utils/SessionManager.tsx; dependencies: [6, 7, 2] */
function _fun103490(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13798:6, offset: 0x0226b4d6, size: 126 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const value = _fun103491();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video-qoe/utils/SessionManager.tsx');
exports.SessionManager = value;
}
function _fun103491() { // fn#103491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13798:118, offset: 0x0226b554, size: 62 bytes, params: 1, frame: 15
return env0_1(SessionManager, null, [{key: 'generateSessionId', value: function() {
return 'discord-video-' + global.Date.now() + '-' + global.Math.random().toString(36).substr(2, 9);
}}]);
}