mirror of https://github.com/vector-im/riot-web
Always show screensharing feed as primary
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
parent
51cf426179
commit
2014517173
|
@ -256,10 +256,9 @@ export default class CallView extends React.Component<IProps, IState> {
|
|||
private getOrderedFeeds(feeds: Array<CallFeed>): { primary: CallFeed, secondary: Array<CallFeed> } {
|
||||
let primary;
|
||||
|
||||
// First try to find remote screen-sharing stream
|
||||
primary = feeds.find((feed) => {
|
||||
return feed.purpose === SDPStreamMetadataPurpose.Screenshare && !feed.isLocal();
|
||||
});
|
||||
// Try to use a screensharing as primary, a remote one if possible
|
||||
const screensharingFeeds = feeds.filter((feed) => feed.purpose === SDPStreamMetadataPurpose.Screenshare);
|
||||
primary = screensharingFeeds.find((feed) => !feed.isLocal()) || screensharingFeeds[0];
|
||||
// If we didn't find remote screen-sharing stream, try to find any remote stream
|
||||
if (!primary) {
|
||||
primary = feeds.find((feed) => !feed.isLocal());
|
||||
|
|
Loading…
Reference in New Issue