Constrain screensharing in getDisplayMedia
This commit is contained in:
@@ -2484,9 +2484,9 @@ export default class RoomClient
|
||||
logger.debug('enableScreenSharing() | calling getUserMedia()');
|
||||
|
||||
const stream = await this._screenSharing.start({
|
||||
width : 1280,
|
||||
height : 720,
|
||||
frameRate : 3
|
||||
width : 1920,
|
||||
height : 1080,
|
||||
frameRate : 5
|
||||
});
|
||||
|
||||
track = stream.getVideoTracks()[0];
|
||||
|
||||
+15
-2
@@ -101,12 +101,25 @@ class DisplayMediaScreenShare
|
||||
return true;
|
||||
}
|
||||
|
||||
_toConstraints()
|
||||
_toConstraints(options)
|
||||
{
|
||||
const constraints = {
|
||||
video : true
|
||||
video : {}
|
||||
};
|
||||
|
||||
if (isFinite(options.width))
|
||||
{
|
||||
constraints.video.width = options.width;
|
||||
}
|
||||
if (isFinite(options.height))
|
||||
{
|
||||
constraints.video.height = options.height;
|
||||
}
|
||||
if (isFinite(options.frameRate))
|
||||
{
|
||||
constraints.video.frameRate = options.frameRate;
|
||||
}
|
||||
|
||||
return constraints;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user