decord/source/modules/media_engine/InputWatcher.tsx

64 lines
2 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 12886
// Function ID: 100108
2026-07-20 16:05:17 +00:00
// Name: logger
2026-07-24 07:16:23 +00:00
// Dependencies: [57, 5, 6, 7, 4195, 4, 4015, 478, 12825, 3741, 5142, 686, 4227, 2]
2026-07-20 16:05:17 +00:00
2026-07-24 07:16:23 +00:00
// Module 12886 (logger)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
import log from "log";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
import isWindows from "isWindows";
import { WINDOWS_SETTINGS_SOUND_DEVICE_DEEPLINK_SEMVER as closure_7 } from "StreamIssueReportReasons";
const require = arg1;
const logger = new require("StreamIssueReportReasons").Logger("InputWatcher");
const tmp3 = (() => {
2026-07-20 16:05:17 +00:00
class InputWatcher {
constructor(arg0, arg1) {
self = this;
2026-07-23 10:11:24 +00:00
self = this;
tmp2 = outer1_5(this, self);
2026-07-20 16:05:17 +00:00
this.mediaEngine = arg0;
this.mediaEngineStore = arg1;
2026-07-23 10:11:24 +00:00
timeout = new InputWatcher(outer1_2[6]).Timeout();
2026-07-20 16:05:17 +00:00
this.stateChangeTimeout = timeout;
this.inputDetected = undefined;
this.lastUpdateTime = performance.now();
// CreateGeneratorClosureLongIndex (0x67)
2026-07-23 10:11:24 +00:00
this.fetchInputDeviceOSConfig = outer1_4(tmp);
2026-07-20 16:05:17 +00:00
this.handleSilence = (arg0) => {
2026-07-23 10:11:24 +00:00
const _self = arg0;
const self = tmp2;
const stateChangeTimeout = _self.stateChangeTimeout;
2026-07-20 16:05:17 +00:00
let num = 5000;
if (!arg0) {
num = 1500;
}
// CreateGeneratorClosureLongIndex (0x67)
2026-07-23 10:11:24 +00:00
stateChangeTimeout.start(num, outer2_4(tmp));
2026-07-20 16:05:17 +00:00
};
mediaEngine = this.mediaEngine;
2026-07-23 10:11:24 +00:00
onResult = mediaEngine.on(InputWatcher(outer1_2[12]).MediaEngineEvent.Silence, this.handleSilence);
2026-07-20 16:05:17 +00:00
return;
}
}
const items = [
{
key: "reset",
value() {
const self = this;
const stateChangeTimeout = this.stateChangeTimeout;
stateChangeTimeout.stop();
if (null != this.inputDetected) {
self.handleSilence(!self.inputDetected);
}
self.inputDetected = undefined;
}
}
];
return callback(InputWatcher, items);
2026-07-23 10:11:24 +00:00
})();
const result = require("_classCallCheck").fileFinishedImporting("modules/media_engine/InputWatcher.tsx");
2026-07-20 16:05:17 +00:00
export default tmp3;