/* Metro module 13607; source: modules/video-qoe/SimpleMuxWrapper.tsx; dependencies: [6, 7, 4, 13608, 13609, 13610, 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 * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as LoggerModule from '../../external/discord_common/js/packages/logger/Logger.tsx'; /* Metro dependency 4 */ import * as SessionManagerModule from './utils/SessionManager.tsx'; /* Metro dependency 13608 */ 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 Logger = (LoggerModule).Logger; let logger = new Logger('SimpleMuxWrapper'); logger = _fun103484(); (FileImportTrackerModule).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 CreateClass(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 = (SessionManagerModule).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 object = {'debug': null, 'disableCookies': true, 'respectDoNotTrack': true}; const debug = this.config.debug; object.debug = debug != null && debug; value = environment.__proto__; const MuxIntegration = require(dependencyMap[4]).MuxIntegration; object.data = MuxIntegration.mapDiscordToMuxMetadata(this.config, this.sessionId); let hlsInstance = this.hlsInstance; if (hlsInstance != null) { hlsInstance = this.hlsInstance; object.hlsjs = hlsInstance; hlsInstance = this.hlsInstance; object.Hls = hlsInstance.constructor; } try { property = dependencyMap[5]; defaultImport = importDefault(property); monitor = defaultImport.monitor; videoElement = this.videoElement; Reflect.apply(monitor, defaultImport, [videoElement, object]); 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); } } } } } global.__d(_fun103483, 13607, [6, 7, 4, 13608, 13609, 13610, 2]) /* metro module 13607, dependencies: [6, 7, 4, 13608, 13609, 13610, 2] */;