You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-02 17:02:31 +03:00
Standardise screensharing casing
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -396,7 +396,7 @@ export class MatrixCall extends EventEmitter {
|
|||||||
return this.getLocalFeeds().find((feed) => feed.purpose === SDPStreamMetadataPurpose.Usermedia);
|
return this.getLocalFeeds().find((feed) => feed.purpose === SDPStreamMetadataPurpose.Usermedia);
|
||||||
}
|
}
|
||||||
|
|
||||||
public get localScreenSharingFeed(): CallFeed {
|
public get localScreensharingFeed(): CallFeed {
|
||||||
return this.getLocalFeeds().find((feed) => feed.purpose === SDPStreamMetadataPurpose.Screenshare);
|
return this.getLocalFeeds().find((feed) => feed.purpose === SDPStreamMetadataPurpose.Screenshare);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -404,8 +404,8 @@ export class MatrixCall extends EventEmitter {
|
|||||||
return this.localUsermediaFeed?.stream;
|
return this.localUsermediaFeed?.stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
private get localScreenSharingStream(): MediaStream {
|
private get localScreensharingStream(): MediaStream {
|
||||||
return this.localScreenSharingFeed?.stream;
|
return this.localScreensharingFeed?.stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
private getFeedByStreamId(streamId: string): CallFeed {
|
private getFeedByStreamId(streamId: string): CallFeed {
|
||||||
@@ -792,7 +792,7 @@ export class MatrixCall extends EventEmitter {
|
|||||||
* @returns {boolean} is screensharing
|
* @returns {boolean} is screensharing
|
||||||
*/
|
*/
|
||||||
public isScreensharing(): boolean {
|
public isScreensharing(): boolean {
|
||||||
return Boolean(this.localScreenSharingStream);
|
return Boolean(this.localScreensharingStream);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -836,8 +836,8 @@ export class MatrixCall extends EventEmitter {
|
|||||||
for (const sender of this.screensharingSenders) {
|
for (const sender of this.screensharingSenders) {
|
||||||
this.peerConn.removeTrack(sender);
|
this.peerConn.removeTrack(sender);
|
||||||
}
|
}
|
||||||
this.deleteFeedByStream(this.localScreenSharingStream);
|
this.deleteFeedByStream(this.localScreensharingStream);
|
||||||
for (const track of this.localScreenSharingStream.getTracks()) {
|
for (const track of this.localScreensharingStream.getTracks()) {
|
||||||
track.stop();
|
track.stop();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -887,8 +887,8 @@ export class MatrixCall extends EventEmitter {
|
|||||||
});
|
});
|
||||||
sender.replaceTrack(track);
|
sender.replaceTrack(track);
|
||||||
|
|
||||||
this.deleteFeedByStream(this.localScreenSharingStream);
|
this.deleteFeedByStream(this.localScreensharingStream);
|
||||||
for (const track of this.localScreenSharingStream.getTracks()) {
|
for (const track of this.localScreensharingStream.getTracks()) {
|
||||||
track.stop();
|
track.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user