reword in readme

add print obs, ws versions
This commit is contained in:
norm 2022-11-04 02:07:23 +00:00
parent 7f5d92603e
commit 1d115f4132
2 changed files with 8 additions and 2 deletions

View File

@ -9,7 +9,8 @@ Demonstrates how to sync Voicemeeter states with OBS scene switches.
## Use ## Use
This example assumes your OBS connection info saved in `config.psd1`, placed next to `Vm-Obs-Sync.ps1`: This example assumes the following:
- OBS connection info saved in `config.psd1`, placed next to `Vm-Obs-Sync.ps1`:
```psd1 ```psd1
@{ @{
@ -19,4 +20,6 @@ This example assumes your OBS connection info saved in `config.psd1`, placed nex
} }
``` ```
- OBS scenes named `START`, `BRB`, `END` and `LIVE`
Simply run the script and change current OBS scene. Simply run the script and change current OBS scene.

View File

@ -18,7 +18,7 @@ function CurrentProgramSceneChanged($data) {
"BRB" { $vmr.strip[0].gain = -8.3 } "BRB" { $vmr.strip[0].gain = -8.3 }
"END" { $vmr.strip[0].mono = $true } "END" { $vmr.strip[0].mono = $true }
"LIVE" { $vmr.strip[0].color_x = 0.3 } "LIVE" { $vmr.strip[0].color_x = 0.3 }
default { "Expected START, BRB, END or LIVE scene" | Write-Host } default { "Expected START, BRB, END or LIVE scene" | Write-Warning; return }
} }
$info[$data.SceneName] | Write-Host $info[$data.SceneName] | Write-Host
} }
@ -33,6 +33,9 @@ function main {
$vmr = Get-RemoteBasic $vmr = Get-RemoteBasic
$conn = ConnFromFile $conn = ConnFromFile
$r_client = Get-OBSRequest -hostname $conn.hostname -port $conn.port -pass $conn.password $r_client = Get-OBSRequest -hostname $conn.hostname -port $conn.port -pass $conn.password
$resp = $r_client.getVersion()
"obs version:" + $resp.obsVersion | Write-Host
"websocket version:" + $resp.obsWebSocketVersion | Write-Host
$e_client = Get-OBSEvent -hostname $conn.hostname -port $conn.port -pass $conn.password $e_client = Get-OBSEvent -hostname $conn.hostname -port $conn.port -pass $conn.password
$callbacks = @("CurrentProgramSceneChanged", ${function:CurrentProgramSceneChanged}) $callbacks = @("CurrentProgramSceneChanged", ${function:CurrentProgramSceneChanged})