ShayBox / Mon2Cam

Workaround for multi-monitor Discord screensharing
MIT License
337 stars 33 forks source link

Added checks for possibly unsupported resolutions #44

Closed botiapa closed 3 years ago

botiapa commented 3 years ago

Fixes https://github.com/ShayBox/Mon2Cam/issues/42

I think it's mergeable however I thought you might want to have a look at it first.

ShayBox commented 3 years ago

check_resolution should be camelCase and you can do Array.includes(element) instead of a boolean and loop

ShayBox commented 3 years ago

So supported.includes([height, width]) or something similar

botiapa commented 3 years ago

Pushed the fixes, I had to use array.some instead, because I believe includes cannot be used with objects (like an array).

This is because [1920, 1080] == [1920, 1080] is false.