decord/source/modules/video-qoe/SimpleMuxWrapper.tsx

82 lines
2.3 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 14095
// Function ID: 107952
2026-07-20 16:05:17 +00:00
// Name: logger
2026-07-25 08:10:48 +00:00
// Dependencies: [6, 7, 4, 14096, 14097, 14098, 2]
2026-07-20 16:05:17 +00:00
2026-07-25 08:10:48 +00:00
// Module 14095 (logger)
2026-07-23 10:11:24 +00:00
import set from "set";
import _defineProperties from "_defineProperties";
const require = arg1;
const logger = new require("MuxIntegration").Logger("SimpleMuxWrapper");
const tmp3 = (() => {
2026-07-20 16:05:17 +00:00
class SimpleMuxWrapper {
constructor(arg0) {
2026-07-23 10:11:24 +00:00
tmp = outer1_3(this, SimpleMuxWrapper);
2026-07-20 16:05:17 +00:00
this.isMonitoring = false;
this.config = arg0;
this.videoElement = arg0.videoElement;
2026-07-23 10:11:24 +00:00
SessionManager = SimpleMuxWrapper(outer1_2[3]).SessionManager;
2026-07-20 16:05:17 +00:00
this.sessionId = SessionManager.generateSessionId();
this.hlsInstance = arg0.hlsInstance;
return;
}
}
let obj = {
key: "initialize",
value() {
const self = this;
2026-07-23 10:11:24 +00:00
const obj = { debug: null, disableCookies: true, respectDoNotTrack: true };
2026-07-20 16:05:17 +00:00
const debug = this.config.debug;
2026-07-21 06:55:02 +00:00
obj.debug = null != debug && debug;
2026-07-23 10:11:24 +00:00
const MuxIntegration = SimpleMuxWrapper(outer1_2[4]).MuxIntegration;
2026-07-20 16:05:17 +00:00
obj.data = MuxIntegration.mapDiscordToMuxMetadata(self.config, self.sessionId);
if (null != self.hlsInstance) {
2026-07-21 06:55:02 +00:00
tmp.hlsjs = self.hlsInstance;
tmp.Hls = self.hlsInstance.constructor;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
outer1_1(outer1_2[5]).monitor(self.videoElement, obj);
2026-07-20 16:05:17 +00:00
self.isMonitoring = true;
}
};
const items = [obj, , , ];
obj = {
key: "endSession",
value() {
const self = this;
if (this.isMonitoring) {
2026-07-23 10:11:24 +00:00
if ("function" === typeof outer1_1(outer1_2[5]).destroyMonitor) {
outer1_1(outer1_2[5]).destroyMonitor(self.videoElement);
const obj = outer1_1(outer1_2[5]);
2026-07-20 16:05:17 +00:00
}
self.isMonitoring = false;
}
}
};
items[1] = obj;
obj = {
key: "destroy",
value() {
const self = this;
if (this.isMonitoring) {
2026-07-23 10:11:24 +00:00
if ("function" === typeof outer1_1(outer1_2[5]).destroyMonitor) {
outer1_1(outer1_2[5]).destroyMonitor(self.videoElement);
const obj = outer1_1(outer1_2[5]);
2026-07-20 16:05:17 +00:00
}
self.isMonitoring = false;
}
}
};
items[2] = obj;
items[3] = {
key: "getSessionId",
value() {
return this.sessionId;
}
};
return callback(SimpleMuxWrapper, items);
2026-07-23 10:11:24 +00:00
})();
const result = require("log").fileFinishedImporting("modules/video-qoe/SimpleMuxWrapper.tsx");
2026-07-20 16:05:17 +00:00
export const SimpleMuxWrapper = tmp3;