fix camera resolution being stuck to 640x480 (#1199)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
@@ -83,16 +83,16 @@ const logger = new Logger("VesktopScreenShare");
|
||||
addPatch({
|
||||
patches: [
|
||||
{
|
||||
find: "this.localWant=",
|
||||
find: "this.getDefaultGoliveQuality()",
|
||||
replacement: {
|
||||
match: /this.localWant=/,
|
||||
replace: "$self.patchStreamQuality(this);$&"
|
||||
match: /this\.getDefaultGoliveQuality\(\)/,
|
||||
replace: "$self.patchStreamQuality($&)"
|
||||
}
|
||||
}
|
||||
],
|
||||
patchStreamQuality(opts: any) {
|
||||
const { screenshareQuality } = State.store;
|
||||
if (!screenshareQuality) return;
|
||||
if (!screenshareQuality) return opts;
|
||||
|
||||
const framerate = Number(screenshareQuality.frameRate);
|
||||
const height = Number(screenshareQuality.resolution);
|
||||
@@ -117,6 +117,7 @@ addPatch({
|
||||
height,
|
||||
pixelCount: height * width
|
||||
});
|
||||
return opts;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user