obsproject / obs-websocket

Remote-control of OBS Studio through WebSocket
GNU General Public License v2.0
3.8k stars 701 forks source link

Feature Request: #1163

Closed hanxiang-li closed 10 months ago

hanxiang-li commented 10 months ago

Feature Request Type

RPC Request

Feature Request Type (Other)

Is there an API for obtaining screen lists

Requested Feature

image

Is there an API to obtain the values of this list? The array I obtained using GetMonitorList is as follows (是否有api获取这个列表的值?我使用 GetMonitorList 获取到的数组,是以下) {"monitors":[{"monitorHeight":1080,"monitorIndex":0,"monitorName":"\\\\.\\DISPLAY1(0)","monitorPositionX":0,"monitorPositionY":0,"monitorWidth":1920}]}

obs.call('SetInputSettings', { inputName: 'name' , inputSettings: { capture_cursor: true, monitor_id: monitorName } }) Unable to set successfully

Requested Feature Usage Scenario

Set Video Source

hanxiang-li commented 10 months ago

I found GetInputPropertiesListPropertyItems, this method,

obs.call('GetInputPropertiesListPropertyItems', { inputName: 'Window' + timer, propertyName: 'window' })

There's no problem with me like this

obs.call('GetInputPropertiesListPropertyItems', { inputName: 'Monitor' + timer, propertyName: 'monitor' })

This failed to obtain

hanxiang-li commented 10 months ago
    obs.call('GetInputPropertiesListPropertyItems', {
        inputName: 'Monitor' + timer,
        propertyName: 'method'
    }).then(res => {
        console.log(res)
    })  

This is also possible

hanxiang-li commented 10 months ago
obs.call('GetInputPropertiesListPropertyItems', {
    inputName: 'test',
    propertyName: 'display'
}).then(res => {
    console.log(res)
})

I cannot obtain it on Windows for testing, Mac can