mirror of https://github.com/OpenVidu/openvidu.git
Reformat of PR https://github.com/OpenVidu/openvidu/pull/809
parent
759b7b2a70
commit
cd7f8ae282
|
@ -790,18 +790,20 @@ export class Stream {
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
isSendScreen(): boolean {
|
isSendScreen(): boolean {
|
||||||
let screen;
|
let screen = false
|
||||||
if (typeof MediaStreamTrack !== 'undefined' &&
|
if (typeof MediaStreamTrack !== 'undefined' &&
|
||||||
this.outboundStreamOpts.publisherProperties.videoSource instanceof MediaStreamTrack) {
|
this.outboundStreamOpts.publisherProperties.videoSource instanceof MediaStreamTrack) {
|
||||||
var trackSettings = this.outboundStreamOpts.publisherProperties.videoSource.getSettings();
|
let trackSettings: any = this.outboundStreamOpts.publisherProperties.videoSource.getSettings();
|
||||||
|
if (trackSettings.displaySurface) {
|
||||||
screen = ["monitor", "window", "browser"].includes(trackSettings.displaySurface);
|
screen = ["monitor", "window", "browser"].includes(trackSettings.displaySurface);
|
||||||
}
|
}
|
||||||
else if (platform.isElectron()) {
|
}
|
||||||
|
if (!screen && platform.isElectron()) {
|
||||||
screen =
|
screen =
|
||||||
typeof this.outboundStreamOpts.publisherProperties.videoSource === 'string' &&
|
typeof this.outboundStreamOpts.publisherProperties.videoSource === 'string' &&
|
||||||
this.outboundStreamOpts.publisherProperties.videoSource.startsWith('screen:');
|
this.outboundStreamOpts.publisherProperties.videoSource.startsWith('screen:');
|
||||||
}
|
}
|
||||||
else {
|
if (!screen) {
|
||||||
screen = this.outboundStreamOpts.publisherProperties.videoSource === 'screen';
|
screen = this.outboundStreamOpts.publisherProperties.videoSource === 'screen';
|
||||||
}
|
}
|
||||||
return !!this.outboundStreamOpts && screen;
|
return !!this.outboundStreamOpts && screen;
|
||||||
|
|
Loading…
Reference in New Issue