feat: complete Ancestor quote bot with production-ready Docker support

This commit is contained in:
unfunny
2026-09-13 14:14:38 -04:00
parent f2016da05a
commit fe7351a7dc
1145 changed files with 30890 additions and 97684 deletions

View File

@@ -1,3 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.CallFeedStatsReporter = void 0;
/*
Copyright 2023 The Matrix.org Foundation C.I.C.
@@ -14,13 +20,14 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
export class CallFeedStatsReporter {
class CallFeedStatsReporter {
static buildCallFeedReport(callId, opponentMemberId, pc) {
const rtpTransceivers = pc.getTransceivers();
const transceiver = [];
const callFeeds = [];
rtpTransceivers.forEach(t => {
const sender = t.sender?.track ? CallFeedStatsReporter.buildTrackStats(t.sender.track, "sender") : null;
var _t$sender;
const sender = (_t$sender = t.sender) !== null && _t$sender !== void 0 && _t$sender.track ? CallFeedStatsReporter.buildTrackStats(t.sender.track, "sender") : null;
const receiver = CallFeedStatsReporter.buildTrackStats(t.receiver.track, "receiver");
transceiver.push({
mid: t.mid == null ? "null" : t.mid,
@@ -38,13 +45,14 @@ export class CallFeedStatsReporter {
};
}
static buildTrackStats(track, label = "--") {
const settingDeviceId = track.getSettings()?.deviceId;
const constrainDeviceId = track.getConstraints()?.deviceId;
var _track$getSettings, _track$getConstraints;
const settingDeviceId = (_track$getSettings = track.getSettings()) === null || _track$getSettings === void 0 ? void 0 : _track$getSettings.deviceId;
const constrainDeviceId = (_track$getConstraints = track.getConstraints()) === null || _track$getConstraints === void 0 ? void 0 : _track$getConstraints.deviceId;
return {
id: track.id,
kind: track.kind,
settingDeviceId: settingDeviceId ?? "unknown",
constrainDeviceId: constrainDeviceId ?? "unknown",
settingDeviceId: settingDeviceId ? settingDeviceId : "unknown",
constrainDeviceId: constrainDeviceId ? constrainDeviceId : "unknown",
muted: track.muted,
enabled: track.enabled,
readyState: track.readyState,
@@ -52,6 +60,9 @@ export class CallFeedStatsReporter {
};
}
static expandCallFeedReport(report, callFeeds, prefix = "unknown") {
if (!report.callFeeds) {
report.callFeeds = [];
}
callFeeds.forEach(feed => {
const audioTracks = feed.stream.getAudioTracks();
const videoTracks = feed.stream.getVideoTracks();
@@ -72,4 +83,5 @@ export class CallFeedStatsReporter {
return report;
}
}
exports.CallFeedStatsReporter = CallFeedStatsReporter;
//# sourceMappingURL=callFeedStatsReporter.js.map