1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Add getLocalFeeds() and getRemoteFeeds()

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner
2021-04-27 10:06:21 +02:00
parent 88b310c394
commit e11c523a75

View File

@@ -419,6 +419,22 @@ export class MatrixCall extends EventEmitter {
return this.feeds; return this.feeds;
} }
/**
* Returns an array of all local CallFeeds
* @returns {Array<CallFeed>} local CallFeeds
*/
public getLocalFeeds(): Array<CallFeed> {
return this.feeds.filter((feed) => {return feed.isLocal()});
}
/**
* Returns an array of all remote CallFeeds
* @returns {Array<CallFeed>} remote CallFeeds
*/
public getRemoteFeeds(): Array<CallFeed> {
return this.feeds.filter((feed) => {return !feed.isLocal()});
}
/** /**
* Returns true if there are no incoming feeds, * Returns true if there are no incoming feeds,
* otherwise returns false * otherwise returns false