riolubruh / YABDP4Nitro

Yet Another BetterDiscord Plugin for Nitro features. Unlock screensharing modes, use cross-server and gif emotes and much more!
Other
732 stars 141 forks source link

Can't view live streams while streaming (source 60fps) #218

Closed Obegg closed 1 week ago

Obegg commented 2 weeks ago

Scenario: 2 users who use YABDP4Nitro join a voice channel in a server, they both share their screen on Source and 60fps, they can't view each other's share while they themself share.

Obegg commented 2 weeks ago

To reproduce you'll need to first start a share and only then view the other's share.

riolubruh commented 1 week ago

It's caused by this constructor: Discord_PIecg9fmxt

And throws this error: Discord_y4JqvemxyC

The reason it happens is because the plugin puts the stream's width and height in the videoBudget object, which in "Source" resolution's case, is 0. The constructor explicitly checks for 0 and, logically, throws an error if it is a 0. The reason for this is because it literally cannot construct a ladder if the pixel budget is 0. This wouldn't be a problem normally because the values in videoBudget are usually set to the maximum resolution that the user is allowed to use (i think??), however since we are changing those amounts to for our stream, it starts to complain, because it also changes the values for the stream we're watching, but only if they match the other users stream's configuration...? I have no clue if that's even remotely correct, but that's what I think is happening there. The solution is for the plugin to set literally any other value that isn't 0 to videoBudget's width and height.

riolubruh commented 1 week ago

Fixed in 5.4.2 (1e72ef4)