ironmonk88 / monks-common-display

GNU General Public License v3.0
19 stars 5 forks source link

[BUG] Screen mirroring crashes with JS error #30

Closed YugoNumachi closed 1 year ago

YugoNumachi commented 1 year ago

Describe the bug When trying to activate the screen mirroring, the party browser displays a JS error (reading animate property from undefined). This occurs even after clearing both browsers caches, and with all other modules disabled. DM is running on Chrome, party is running on Edge, both on the same machine. Version 1.0.14 had no problem

image

To Reproduce Steps to reproduce the behavior:

  1. Click on the Screen Mirroring button
  2. Go to the Dev Tools on the party browser
  3. See the JS error

Expected behavior Mirroring should activate like it used to do in previous versions.

Screenshots See above

Please complete as much of the following information as possible:

Additional context N/A

YugoNumachi commented 1 year ago

Here is the output of the onMessage received just before the error:

image

There is no "args" property in there, which is expected by the canvasPan function. No idea why.

YugoNumachi commented 1 year ago

Investigating further:

getProperty(canvas.scene, "flags.monks-common-display.screen"); returns "undefined", there is no flag defined for monks-common-display in any of my scenes.

So obviously, the next call fails and the GM source is not identified properly

if (screen == "gm") { data = mergeObject({ animate: true, speed: 1000 }, game.canvas.scene._viewPosition); }

YugoNumachi commented 1 year ago

And I just discovered the right click... I completely missed that from the readme... Not really obvious, and I still don't really understand what those options do, but... at least it works now...

Sorry for the inconvenience...

SirMotte commented 1 year ago

And I just discovered the right click... I completely missed that from the readme... Not really obvious, and I still don't really understand what those options do, but... at least it works now...

Sorry for the inconvenience...

For anyone wondering what Yugo is talking about:

If you right click on the Screen and Focus Icon, you can set who the the camera should follow. This fixes the issue for the GM view at least.

grafik