mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser BUG FIX: no videoDimensions change interval when only audio
parent
5844ddcd5f
commit
ae52864e42
|
@ -300,7 +300,8 @@ export class Publisher extends StreamManager {
|
||||||
}
|
}
|
||||||
delete this.firstVideoElement;
|
delete this.firstVideoElement;
|
||||||
|
|
||||||
if (!this.stream.isSendScreen() && !!mediaStream.getVideoTracks()[0]) {
|
if (this.stream.isSendVideo()) {
|
||||||
|
if (!this.stream.isSendScreen()) {
|
||||||
// With no screen share, video dimension can be set directly from MediaStream (getSettings)
|
// With no screen share, video dimension can be set directly from MediaStream (getSettings)
|
||||||
// Orientation must be checked for mobile devices (width and height are reversed)
|
// Orientation must be checked for mobile devices (width and height are reversed)
|
||||||
const { width, height } = mediaStream.getVideoTracks()[0].getSettings();
|
const { width, height } = mediaStream.getVideoTracks()[0].getSettings();
|
||||||
|
@ -317,7 +318,6 @@ export class Publisher extends StreamManager {
|
||||||
height: height || 0
|
height: height || 0
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
this.stream.isLocalStreamReadyToPublish = true;
|
this.stream.isLocalStreamReadyToPublish = true;
|
||||||
this.stream.ee.emitEvent('stream-ready-to-publish', []);
|
this.stream.ee.emitEvent('stream-ready-to-publish', []);
|
||||||
} else {
|
} else {
|
||||||
|
@ -363,6 +363,10 @@ export class Publisher extends StreamManager {
|
||||||
this.stream.ee.emitEvent('stream-ready-to-publish', []);
|
this.stream.ee.emitEvent('stream-ready-to-publish', []);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.stream.isLocalStreamReadyToPublish = true;
|
||||||
|
this.stream.ee.emitEvent('stream-ready-to-publish', []);
|
||||||
|
}
|
||||||
resolve();
|
resolve();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue