Skip to content

Commit

Permalink
feat: allow stats object (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
farhat-ha authored Nov 12, 2024
1 parent 8070e57 commit 9cc84ac
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/js/src/Modules/Verto/util/debug.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { v4 as uuid } from 'uuid';
import { WebRTCStats } from '@peermetrics/webrtc-stats';
import {
DebugReportDataMessage,
DebugReportDataMessage,
DebugReportStartMessage,
DebugReportStopMessage,
} from '../messages/WebRTCStats';
Expand All @@ -20,7 +20,7 @@ export function saveToFile(data: any, filename: string) {
}

export type WebRTCStatsReporter = {
reportDataMessage: (data: any) => DebugReportDataMessage
reportDataMessage: (data: any) => DebugReportDataMessage;
start: () => DebugReportStartMessage;
stop: () => DebugReportStopMessage;
reportId: string;
Expand All @@ -37,11 +37,12 @@ export function webRTCStatsReporter(): WebRTCStatsReporter {
return new DebugReportStopMessage(reportId);
};

const reportDataMessage = (data) => new DebugReportDataMessage(reportId, data);
const reportDataMessage = (data) =>
new DebugReportDataMessage(reportId, data);
const debuggerInstance = new WebRTCStats({
getStatsInterval: POLL_INTERVAL,
rawStats: false,
statsObject: false,
statsObject: true,
filteredStats: false,
remote: true,
wrapGetUserMedia: true,
Expand Down

0 comments on commit 9cc84ac

Please sign in to comment.