diff --git a/src/webrtc/call.ts b/src/webrtc/call.ts index 6602bc840..c966e5738 100644 --- a/src/webrtc/call.ts +++ b/src/webrtc/call.ts @@ -419,6 +419,22 @@ export class MatrixCall extends EventEmitter { return this.feeds; } + /** + * Returns an array of all local CallFeeds + * @returns {Array} local CallFeeds + */ + public getLocalFeeds(): Array { + return this.feeds.filter((feed) => {return feed.isLocal()}); + } + + /** + * Returns an array of all remote CallFeeds + * @returns {Array} remote CallFeeds + */ + public getRemoteFeeds(): Array { + return this.feeds.filter((feed) => {return !feed.isLocal()}); + } + /** * Returns true if there are no incoming feeds, * otherwise returns false