openvidu-browser: streamPropertyChanged with window resize in Opera when screen-sharing

pull/173/head
pabloFuente 2018-11-21 12:55:47 +01:00
parent 0400ea3e17
commit 63804bebc4
1 changed files with 2 additions and 2 deletions

View File

@ -340,8 +340,8 @@ export class Publisher extends StreamManager {
}; };
this.screenShareResizeInterval = setInterval(() => { this.screenShareResizeInterval = setInterval(() => {
const firefoxSettings = mediaStream.getVideoTracks()[0].getSettings(); const firefoxSettings = mediaStream.getVideoTracks()[0].getSettings();
const newWidth = (platform.name === 'Chrome') ? this.videoReference.videoWidth : firefoxSettings.width; const newWidth = (platform.name === 'Chrome' || platform.name === 'Opera') ? this.videoReference.videoWidth : firefoxSettings.width;
const newHeight = (platform.name === 'Chrome') ? this.videoReference.videoHeight : firefoxSettings.height; const newHeight = (platform.name === 'Chrome' || platform.name === 'Opera') ? this.videoReference.videoHeight : firefoxSettings.height;
if (this.stream.isLocalStreamPublished && if (this.stream.isLocalStreamPublished &&
(newWidth !== this.stream.videoDimensions.width || (newWidth !== this.stream.videoDimensions.width ||
newHeight !== this.stream.videoDimensions.height)) { newHeight !== this.stream.videoDimensions.height)) {