From d69b1dc3e24f8f8ef9c1f60a45c45c67333be74c Mon Sep 17 00:00:00 2001 From: Bruno Windels <274386+bwindels@users.noreply.github.com> Date: Fri, 6 May 2022 17:06:56 +0200 Subject: [PATCH] expose log items for exposing debugging info in sdk users --- src/matrix/calls/group/GroupCall.ts | 8 ++++++++ src/matrix/calls/group/Member.ts | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/src/matrix/calls/group/GroupCall.ts b/src/matrix/calls/group/GroupCall.ts index 2747d960..af3966a0 100644 --- a/src/matrix/calls/group/GroupCall.ts +++ b/src/matrix/calls/group/GroupCall.ts @@ -118,6 +118,14 @@ export class GroupCall extends EventEmitter<{change: never}> { return this.callContent?.["m.intent"]; } + /** + * Gives access the log item for this call while joined. + * Can be used for call diagnostics while in the call. + **/ + get logItem(): ILogItem | undefined { + return this.joinedData?.logItem; + } + async join(localMedia: LocalMedia): Promise { if (this._state !== GroupCallState.Created || this.joinedData) { return; diff --git a/src/matrix/calls/group/Member.ts b/src/matrix/calls/group/Member.ts index ffbad916..69e1eeea 100644 --- a/src/matrix/calls/group/Member.ts +++ b/src/matrix/calls/group/Member.ts @@ -70,6 +70,15 @@ export class Member { private readonly options: Options, ) {} + /** + * Gives access the log item for this item once joined to the group call. + * The signalling for this member will be log in this item. + * Can be used for call diagnostics while in the call. + **/ + get logItem(): ILogItem | undefined { + return this.connection?.logItem; + } + get remoteMedia(): RemoteMedia | undefined { return this.connection?.peerCall?.remoteMedia; }