mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
more logging of callId and sessionIds
This commit is contained in:
parent
9938071e1c
commit
c1c08e9eb0
@ -105,6 +105,7 @@ export class PeerCall implements IDisposable {
|
|||||||
private readonly options: Options,
|
private readonly options: Options,
|
||||||
private readonly logItem: ILogItem,
|
private readonly logItem: ILogItem,
|
||||||
) {
|
) {
|
||||||
|
logItem.log({l: "create PeerCall", callId});
|
||||||
this._remoteMedia = new RemoteMedia();
|
this._remoteMedia = new RemoteMedia();
|
||||||
this.peerConnection = options.webRTC.createPeerConnection(this.options.forceTURN, this.options.turnServers, 0);
|
this.peerConnection = options.webRTC.createPeerConnection(this.options.forceTURN, this.options.turnServers, 0);
|
||||||
|
|
||||||
@ -299,7 +300,7 @@ export class PeerCall implements IDisposable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleIncomingSignallingMessage<B extends MCallBase>(message: SignallingMessage<B>, partyId: PartyId): Promise<void> {
|
handleIncomingSignallingMessage<B extends MCallBase>(message: SignallingMessage<B>, partyId: PartyId): Promise<void> {
|
||||||
return this.logItem.wrap({l: "receive", id: message.type, partyId}, async log => {
|
return this.logItem.wrap({l: "receive", id: message.type, callId: message.content.call_id}, async log => {
|
||||||
switch (message.type) {
|
switch (message.type) {
|
||||||
case EventType.Invite:
|
case EventType.Invite:
|
||||||
if (this.callId !== message.content.call_id) {
|
if (this.callId !== message.content.call_id) {
|
||||||
@ -323,6 +324,7 @@ export class PeerCall implements IDisposable {
|
|||||||
break;
|
break;
|
||||||
case EventType.Hangup:
|
case EventType.Hangup:
|
||||||
// TODO: this is a bit hacky, double check its what we need
|
// TODO: this is a bit hacky, double check its what we need
|
||||||
|
log.set("reason", message.content.reason);
|
||||||
this.terminate(CallParty.Remote, message.content.reason ?? CallErrorCode.UserHangup, log);
|
this.terminate(CallParty.Remote, message.content.reason ?? CallErrorCode.UserHangup, log);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -242,6 +242,7 @@ export class GroupCall extends EventEmitter<{change: never}> {
|
|||||||
if (member && sessionIdChanged) {
|
if (member && sessionIdChanged) {
|
||||||
log.set("removedSessionId", member.sessionId);
|
log.set("removedSessionId", member.sessionId);
|
||||||
member.disconnect(false);
|
member.disconnect(false);
|
||||||
|
member.dispose();
|
||||||
this._members.remove(memberKey);
|
this._members.remove(memberKey);
|
||||||
member = undefined;
|
member = undefined;
|
||||||
}
|
}
|
||||||
|
@ -130,6 +130,10 @@ export class Member {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dispose() {
|
||||||
|
this.logItem.finish();
|
||||||
|
}
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
updateCallInfo(callDeviceMembership: CallDeviceMembership, log: ILogItem) {
|
updateCallInfo(callDeviceMembership: CallDeviceMembership, log: ILogItem) {
|
||||||
log.wrap({l: "updateing device membership", deviceId: this.deviceId}, log => {
|
log.wrap({l: "updateing device membership", deviceId: this.deviceId}, log => {
|
||||||
|
Loading…
Reference in New Issue
Block a user