diff --git a/src/webrtc/call.ts b/src/webrtc/call.ts index 3529a17ee..f3aa3b571 100644 --- a/src/webrtc/call.ts +++ b/src/webrtc/call.ts @@ -424,7 +424,7 @@ export class MatrixCall extends EventEmitter { if (feed) { feed.setNewStream(stream); } else { - this.feeds.push(new CallFeed(stream, userId, type, this.client)); + this.feeds.push(new CallFeed(stream, userId, type, this.client, this.roomId)); this.emit(CallEvent.FeedsChanged, this.feeds); } } diff --git a/src/webrtc/callFeed.ts b/src/webrtc/callFeed.ts index 7ac29a384..959889a96 100644 --- a/src/webrtc/callFeed.ts +++ b/src/webrtc/callFeed.ts @@ -31,10 +31,20 @@ export class CallFeed extends EventEmitter { public userId: string, public type: CallFeedType, private client: any, // Fix when client is TSified + private roomId: string, ) { super() } + /** + * Returns callRoom member + * @returns member of the callRoom + */ + public getMember() { + const callRoom = this.client.getRoom(this.roomId); + return callRoom.getMember(this.userId); + } + /** * Returns true if CallFeed is local, otherwise returns false * @returns {boolean} is local?