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({
|
addPatch({
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: "this.localWant=",
|
find: "this.getDefaultGoliveQuality()",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /this.localWant=/,
|
match: /this\.getDefaultGoliveQuality\(\)/,
|
||||||
replace: "$self.patchStreamQuality(this);$&"
|
replace: "$self.patchStreamQuality($&)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
patchStreamQuality(opts: any) {
|
patchStreamQuality(opts: any) {
|
||||||
const { screenshareQuality } = State.store;
|
const { screenshareQuality } = State.store;
|
||||||
if (!screenshareQuality) return;
|
if (!screenshareQuality) return opts;
|
||||||
|
|
||||||
const framerate = Number(screenshareQuality.frameRate);
|
const framerate = Number(screenshareQuality.frameRate);
|
||||||
const height = Number(screenshareQuality.resolution);
|
const height = Number(screenshareQuality.resolution);
|
||||||
@@ -117,6 +117,7 @@ addPatch({
|
|||||||
height,
|
height,
|
||||||
pixelCount: height * width
|
pixelCount: height * width
|
||||||
});
|
});
|
||||||
|
return opts;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user