obs-websocket-community-projects / obs-websocket-js

Consumes https://github.com/obsproject/obs-websocket
MIT License
683 stars 96 forks source link

Issue and Request #9

Closed MRVDOG closed 7 years ago

MRVDOG commented 7 years ago

Hi, my issue is, for some reason source bounds are 0, I can't work out if this is a obs-websocket-js or a obs-websocket issue

image

my request is for more events/functions, for example, I want to be able to change a sources position and dimensions when, for example, I use jQueryUI draggable() and resize() to change them on my webUI

image The WebUI so far, this is for a friend to be able to control his OBS when he's at conventions, etc...

I also posted this over at obs-websocket

haganbmj commented 7 years ago

I haven't been able to get a bounds value out of obs-websocket, I don't believe those values come out of obs-studio at all right now.

I'm not entirely sure on changing dimensions, I know at the moment obs-websocket doesn't support that. Palakis has a placeholder for that functionality, though, so it might be possible with the current obs-studio API and just hasn't been written.

Palakis commented 7 years ago

No, atm you can't move an item or change its size. Gonna check this out in the coming days.

kendotpm commented 7 years ago

Any progress on this? Was toying with an idea of a NodeCG dashboard panel using this to change a scene's sources / transforms on the fly and wanted to see how far I could push that.

Specifically looking at these:

Palakis commented 7 years ago

@krazyken04 the bounds issue is fixed in the current codebase of obs-websocket. It will be included in the next release of obs-websocket.

haganbmj commented 7 years ago

I'm rewriting this project from scratch. Just have had some other priorities and stuff that comes first. I'll have Position/Transform in there, they're not currently in a 'released' version of obs-websocket. If you'd like to have the functionality now you can call the following methods, but I can't guarantee I'll keep this internal formatting for the next version.

ws._sendRequest('SetSceneItemPosition', { 'item': 'SOURCE_NAME', 'x': 123, 'y': 123 }, callback);
ws._sendRequest('SetSceneItemTransform', { 'item': 'SOURCE_NAME', 'x-scale': 2.5, 'y-scale': 2.5, 'rotation': 90 }, callback);

Callback will just be the standard err, data as a pass/fail.

haganbmj commented 7 years ago

Rewrite was published. I'll be doing some documentation and stuff, but in the meantime read here for more info Note that I pretty much abandoned all the custom method names and such.

https://github.com/haganbmj/obs-websocket-js/pull/16#issuecomment-296420115