You've already forked matrix-js-sdk
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:
@@ -419,6 +419,22 @@ export class MatrixCall extends EventEmitter {
|
||||
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,
|
||||
* otherwise returns false
|
||||
|
||||
Reference in New Issue
Block a user