Skip to content

Commit

Permalink
Extending OBS.GetInputList.Response (Fixes #99)
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed May 28, 2023
1 parent 7279532 commit 3e6c691
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Types/OBS.GetInputList.Response/Next.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<#
.SYNOPSIS
Nexts an input
.DESCRIPTION
Sends a "Next" message to an input.
.LINK
Send-OBSTriggerMediaInputAction
#>
param(
# If set, will return the message instead of sending it now.
[switch]
$PassThru
)

$this | Send-OBSTriggerMediaInputAction -MediaAction "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_NEXT" -PassThru:$PassThru
15 changes: 15 additions & 0 deletions Types/OBS.GetInputList.Response/Pause.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<#
.SYNOPSIS
Pauses an input
.DESCRIPTION
Sends a "Pause" message to an input.
.LINK
Send-OBSTriggerMediaInputAction
#>
param(
# If set, will return the message instead of sending it now.
[switch]
$PassThru
)

$this | Send-OBSTriggerMediaInputAction -MediaAction "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_PAUSE" -PassThru:$PassThru
15 changes: 15 additions & 0 deletions Types/OBS.GetInputList.Response/Play.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<#
.SYNOPSIS
Plays an input
.DESCRIPTION
Sends a "Play" message to an input.
.LINK
Send-OBSTriggerMediaInputAction
#>
param(
# If set, will return the message instead of sending it now.
[switch]
$PassThru
)

$this | Send-OBSTriggerMediaInputAction -MediaAction "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_PLAY" -PassThru:$PassThru
15 changes: 15 additions & 0 deletions Types/OBS.GetInputList.Response/Previous.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<#
.SYNOPSIS
Previouss an input
.DESCRIPTION
Sends a "Previous" message to an input.
.LINK
Send-OBSTriggerMediaInputAction
#>
param(
# If set, will return the message instead of sending it now.
[switch]
$PassThru
)

$this | Send-OBSTriggerMediaInputAction -MediaAction "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_PREVIOUS" -PassThru:$PassThru
15 changes: 15 additions & 0 deletions Types/OBS.GetInputList.Response/Restart.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<#
.SYNOPSIS
Restarts an input
.DESCRIPTION
Sends a "Restart" message to an input.
.LINK
Send-OBSTriggerMediaInputAction
#>
param(
# If set, will return the message instead of sending it now.
[switch]
$PassThru
)

$this | Send-OBSTriggerMediaInputAction -MediaAction "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_RESTART" -PassThru:$PassThru
15 changes: 15 additions & 0 deletions Types/OBS.GetInputList.Response/Stop.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<#
.SYNOPSIS
Stops an input
.DESCRIPTION
Sends a "Stop" message to an input.
.LINK
Send-OBSTriggerMediaInputAction
#>
param(
# If set, will return the message instead of sending it now.
[switch]
$PassThru
)

$this | Send-OBSTriggerMediaInputAction -MediaAction "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_STOP" -PassThru:$PassThru
13 changes: 13 additions & 0 deletions Types/OBS.GetInputList.Response/get_Filters.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<#
.SYNOPSIS
Gets an input's filters
.DESCRIPTION
Gets the filters related to an OBS input.
.EXAMPLE
$obsPowerShellIcon = Show-OBS -Uri https://obs-powershell.start-automating.com/Assets/obs-powershell-animated-icon.svg
$obsPowerShellIcon | Set-OBSColorFilter -Opacity .5
$obsPowerShellIcon.Input.Filters
.LINK
Get-OBSSourceFilterList
#>
Get-OBSSourceFilterList -SourceName $this.InputName
10 changes: 10 additions & 0 deletions Types/OBS.GetInputList.Response/get_Status.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<#
.SYNOPSIS
Gets an input's status
.DESCRIPTION
Gets the media status of an OBS input.
.LINK
Get-OBSMediaInputStatus
#>
param()
$this | Get-OBSMediaInputStatus

0 comments on commit 3e6c691

Please sign in to comment.