obsproject / obs-browser

CEF-based OBS Studio browser plugin
GNU General Public License v2.0
781 stars 222 forks source link

Accessing browser source actual size and width / transform #377

Closed emmett-deen closed 2 years ago

emmett-deen commented 2 years ago

Operating System Info

macOS 12

Other OS

No response

OBS Studio Version

Other

OBS Studio Version (Other)

27.1.3

OBS Studio Log URL

no log

OBS Studio Crash Log URL

No response

Expected Behavior

When accessing width/height settings in the browser source there is seemingly no way to find important information on the browser source's transformation. IE: scale, crop, position, etc.

Current Behavior

To be able to access a browser source's transformation to have accurate information on how the browser source is actually being displayed.

Steps to Reproduce

Accessing a browser source's height/width and then applying a transformation to the browser source provides no information to the site running in the browser source.

Anything else we should know?

No response

WizardCM commented 2 years ago

This is because a single Source can be used in multiple Scene Items, each with their own crop, transform and position, even in the same scene.

The official workaround for this is to use your browser source at canvas size, and build elements within that directly.

emmett-deen commented 2 years ago

This is because a single Source can be used in multiple Scene Items, each with their own crop, transform and position, even in the same scene.

The official workaround for this is to use your browser source at canvas size and build elements within that directly.

In that case, would it be possible to access these items by getting a current scene somehow? It could be blocked by permissions perhaps, but it would be great to access the transforms of everything in a scene.

Also is it possible to enforce the user of a browser source to match canvas size with no scale? Part of the reason I want to access this information is to enforce user's to display a browser source a certain way.

Thanks for the quick reply!