Rosuav / obs-remote-volume

OBS Remote Control Volume Control
8 stars 2 forks source link

"Copy bookmarkable link" button not working - writeText of undefined #3

Open PaulTGG opened 1 year ago

PaulTGG commented 1 year ago

I wanted to save bookmarks for a couple of different computers, but It doesn't look like the "Copy bookmarkable link" button is working as intended. Tried it in Chrome and Firefox (Windows and Linux).

Rosuav commented 1 year ago

Due to the concerns of password leakage, the bookmarkable link won't include the password unless you check the "Reveal Password" box before copying it. So if you leave that unchecked, what you end up with is a safe link that will prompt you for the password before you join.

This is also true of the "Remember This Server" button, which uses local storage for the same purpose; it will only save the password if you permit the password to be revealed.

PaulTGG commented 1 year ago

Gotcha. That said, I'm running in on my internal network, so I didn't have a password set, but even when I set a password, my clipboard doesn't change when I hit "copy bookmarkable link". Is there a way to build the link manually?

Rosuav commented 1 year ago

Huh, it's crashing. Confirmed as a bug. Will look into it in a bit.

If you inspect the "Copy bookmarkable link" button in Developer Tools, it will have a data-copyme attribute that has the link in it. It'll look like this: http://vol.rosuav.com/#obsws://localhost:4455/rgG7NiDBH1vTN8Nr - the protocol determines v4/v5 and SSL, then you have host and port, and after the slash is the password (which is ignored, and can be blank, if OBS isn't asking for a password).

Rosuav commented 1 year ago

Ah. It's a browser limitation. Clipboard access is permitted on http://localhost:anything and on https://anything but not on non-SSL remote pages. Once again, the stupidity of being forced to put the whole page unencrypted in order to connect to an unencrypted websocket rears its ugly head. So, clipboard access is being denied.

I may just make a little dialog with an input that you can copy from. Trouble is, I don't know for sure that I can even query whether I have clipboard permissions, since it's listed as an experimental feature (and not supported in Firefox at all). Very annoying.