|
@@ -1637,9 +1637,27 @@ export default {
|
1637
|
1637
|
|
1638
|
1638
|
if (!this.localPresenterVideo && !mute) {
|
1639
|
1639
|
// create a new presenter track and apply the presenter effect.
|
1640
|
|
- const { height } = this.localVideo.track.getSettings();
|
1641
|
|
- const defaultCamera
|
1642
|
|
- = getUserSelectedCameraDeviceId(APP.store.getState());
|
|
1640
|
+ let { height } = this.localVideo.track.getSettings();
|
|
1641
|
+
|
|
1642
|
+ // Workaround for Firefox since it doesn't return the correct width/height of the desktop stream
|
|
1643
|
+ // that is being currently shared.
|
|
1644
|
+ if (!height || height === 0) {
|
|
1645
|
+ const desktopResizeConstraints = {
|
|
1646
|
+ width: 1280,
|
|
1647
|
+ height: 720,
|
|
1648
|
+ resizeMode: 'crop-and-scale'
|
|
1649
|
+ };
|
|
1650
|
+
|
|
1651
|
+ try {
|
|
1652
|
+ await this.localVideo.track.applyConstraints(desktopResizeConstraints);
|
|
1653
|
+ } catch (err) {
|
|
1654
|
+ logger.error('Failed to apply constraints on the desktop stream for presenter mode', err);
|
|
1655
|
+
|
|
1656
|
+ return;
|
|
1657
|
+ }
|
|
1658
|
+ height = desktopResizeConstraints.height;
|
|
1659
|
+ }
|
|
1660
|
+ const defaultCamera = getUserSelectedCameraDeviceId(APP.store.getState());
|
1643
|
1661
|
let effect;
|
1644
|
1662
|
|
1645
|
1663
|
try {
|