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> } {
|
private getOrderedFeeds(feeds: Array<CallFeed>): { primary: CallFeed, secondary: Array<CallFeed> } {
|
||||||
let primary;
|
let primary;
|
||||||
|
|
||||||
// First try to find remote screen-sharing stream
|
// Try to use a screensharing as primary, a remote one if possible
|
||||||
primary = feeds.find((feed) => {
|
const screensharingFeeds = feeds.filter((feed) => feed.purpose === SDPStreamMetadataPurpose.Screenshare);
|
||||||
return feed.purpose === SDPStreamMetadataPurpose.Screenshare && !feed.isLocal();
|
primary = screensharingFeeds.find((feed) => !feed.isLocal()) || screensharingFeeds[0];
|
||||||
});
|
|
||||||
// If we didn't find remote screen-sharing stream, try to find any remote stream
|
// If we didn't find remote screen-sharing stream, try to find any remote stream
|
||||||
if (!primary) {
|
if (!primary) {
|
||||||
primary = feeds.find((feed) => !feed.isLocal());
|
primary = feeds.find((feed) => !feed.isLocal());
|
||||||
|
|
Loading…
Reference in New Issue