fix: Workaround on FF for getting the resolution of the desktop track
This commit is contained in:
parent
9c77ab7f4d
commit
a3cd331369
|
@ -1637,9 +1637,27 @@ export default {
|
|||
|
||||
if (!this.localPresenterVideo && !mute) {
|
||||
// create a new presenter track and apply the presenter effect.
|
||||
const { height } = this.localVideo.track.getSettings();
|
||||
const defaultCamera
|
||||
= getUserSelectedCameraDeviceId(APP.store.getState());
|
||||
let { height } = this.localVideo.track.getSettings();
|
||||
|
||||
// Workaround for Firefox since it doesn't return the correct width/height of the desktop stream
|
||||
// that is being currently shared.
|
||||
if (!height || height === 0) {
|
||||
const desktopResizeConstraints = {
|
||||
width: 1280,
|
||||
height: 720,
|
||||
resizeMode: 'crop-and-scale'
|
||||
};
|
||||
|
||||
try {
|
||||
await this.localVideo.track.applyConstraints(desktopResizeConstraints);
|
||||
} catch (err) {
|
||||
logger.error('Failed to apply constraints on the desktop stream for presenter mode', err);
|
||||
|
||||
return;
|
||||
}
|
||||
height = desktopResizeConstraints.height;
|
||||
}
|
||||
const defaultCamera = getUserSelectedCameraDeviceId(APP.store.getState());
|
||||
let effect;
|
||||
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue