mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-29 21:15:19 +00:00
add rageshake metadata and log
This commit is contained in:
@@ -19,7 +19,10 @@ import { useClient } from "../ClientContext";
|
|||||||
import { Config } from "../config/Config";
|
import { Config } from "../config/Config";
|
||||||
import { type RageshakeRequestModal } from "../room/RageshakeRequestModal";
|
import { type RageshakeRequestModal } from "../room/RageshakeRequestModal";
|
||||||
import { getUrlParams } from "../UrlParams";
|
import { getUrlParams } from "../UrlParams";
|
||||||
|
import { deepCompare } from "matrix-js-sdk/lib/utils";
|
||||||
|
import { advancedCamera as advancedCameraSetting } from "./settings";
|
||||||
|
import { advancedScreenShare as advancedScreenShareSetting } from "./settings";
|
||||||
|
import { DEFAULT_CONFIG } from "../config/ConfigOptions";
|
||||||
const gzip = async (text: string): Promise<Blob> => {
|
const gzip = async (text: string): Promise<Blob> => {
|
||||||
// pako is relatively large (200KB), so we only import it when needed
|
// pako is relatively large (200KB), so we only import it when needed
|
||||||
const { gzip: pakoGzip } = await import("pako");
|
const { gzip: pakoGzip } = await import("pako");
|
||||||
@@ -245,6 +248,20 @@ export function useSubmitRageshake(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add custom media related information to the rageshake issue description.
|
||||||
|
// Used to quickly identify issues due to untested configurations.
|
||||||
|
if (
|
||||||
|
!deepCompare(Config.get().media_quality, DEFAULT_CONFIG.media_quality)
|
||||||
|
) {
|
||||||
|
body.append("custom_media_quality_in_config", "true");
|
||||||
|
}
|
||||||
|
if (advancedCameraSetting.getValue()) {
|
||||||
|
body.append("devTools_advancedCameraSettings", "true");
|
||||||
|
}
|
||||||
|
if (advancedScreenShareSetting.getValue()) {
|
||||||
|
body.append("devTools_advancedScreenShareSetting", "true");
|
||||||
|
}
|
||||||
|
|
||||||
if (navigator.storage && navigator.storage.estimate) {
|
if (navigator.storage && navigator.storage.estimate) {
|
||||||
try {
|
try {
|
||||||
const estimate: {
|
const estimate: {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
type E2EEManagerOptions,
|
type E2EEManagerOptions,
|
||||||
type BaseE2EEManager,
|
type BaseE2EEManager,
|
||||||
} from "livekit-client";
|
} from "livekit-client";
|
||||||
import { type Logger } from "matrix-js-sdk/lib/logger";
|
import { logger, type Logger } from "matrix-js-sdk/lib/logger";
|
||||||
// imported as inline to support worker when loaded from a cdn (cross domain)
|
// imported as inline to support worker when loaded from a cdn (cross domain)
|
||||||
import E2EEWorker from "livekit-client/e2ee-worker?worker&inline";
|
import E2EEWorker from "livekit-client/e2ee-worker?worker&inline";
|
||||||
import { type CallMembershipIdentityParts } from "matrix-js-sdk/lib/matrixrtc/EncryptionManager";
|
import { type CallMembershipIdentityParts } from "matrix-js-sdk/lib/matrixrtc/EncryptionManager";
|
||||||
@@ -74,9 +74,8 @@ export class ECConnectionFactory implements ConnectionFactory {
|
|||||||
private controlledAudioDevices: boolean,
|
private controlledAudioDevices: boolean,
|
||||||
livekitRoomFactory?: () => LivekitRoom,
|
livekitRoomFactory?: () => LivekitRoom,
|
||||||
) {
|
) {
|
||||||
const defaultFactory = (): LivekitRoom =>
|
const defaultFactory = (): LivekitRoom => {
|
||||||
new LivekitRoom(
|
const roomOptions = generateRoomOption({
|
||||||
generateRoomOption({
|
|
||||||
devices: this.devices,
|
devices: this.devices,
|
||||||
processorState: this.processorState$.value,
|
processorState: this.processorState$.value,
|
||||||
e2eeLivekitOptions: livekitKeyProvider && {
|
e2eeLivekitOptions: livekitKeyProvider && {
|
||||||
@@ -86,8 +85,10 @@ export class ECConnectionFactory implements ConnectionFactory {
|
|||||||
worker: new E2EEWorker(),
|
worker: new E2EEWorker(),
|
||||||
},
|
},
|
||||||
controlledAudioDevices: this.controlledAudioDevices,
|
controlledAudioDevices: this.controlledAudioDevices,
|
||||||
}),
|
});
|
||||||
);
|
logger.info("[ECConnectionFactory] livekit room options: ", roomOptions);
|
||||||
|
return new LivekitRoom(roomOptions);
|
||||||
|
};
|
||||||
this.livekitRoomFactory = livekitRoomFactory ?? defaultFactory;
|
this.livekitRoomFactory = livekitRoomFactory ?? defaultFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user