expose log items for exposing debugging info in sdk users

This commit is contained in:
Bruno Windels 2022-05-06 17:06:56 +02:00
parent fc08fc3744
commit d69b1dc3e2
2 changed files with 17 additions and 0 deletions

View File

@ -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<void> {
if (this._state !== GroupCallState.Created || this.joinedData) {
return;

View File

@ -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;
}