File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed
Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -54,9 +54,23 @@ function Show-OBS {
5454 # If not set, you will get an error if a source with the same name exists.
5555 [Parameter (ValueFromPipelineByPropertyName )]
5656 [switch ]
57- $Force
57+ $Force ,
58+
59+ # If set, will make the input become the size of the screen.
60+ [Parameter (ValueFromPipelineByPropertyName )]
61+ [switch ]
62+ $FitToScreen
5863 )
5964
65+ begin {
66+ filter FitToScreenAndOutput {
67+ if ($FitToScreen -and $_.FitToScreen ) {
68+ $_.FitToScreen ()
69+ }
70+ $_
71+ }
72+ }
73+
6074 process {
6175 # If we had a -RootPath
6276 if ($RootPath ) {
@@ -137,14 +151,14 @@ function Show-OBS {
137151 "
138152 $SourceParameter.Uri = $htmlPath
139153 $SourceParameter.CSS = $css
140- Add-OBSBrowserSource @SourceParameter
154+ Add-OBSBrowserSource @SourceParameter | FitToScreenAndOutput
141155 } else {
142- Add-OBSBrowserSource @SourceParameter
156+ Add-OBSBrowserSource @SourceParameter | FitToScreenAndOutput
143157 }
144158
145159 } else {
146160 $SourceParameter.FilePath = $FilePath
147- Add-OBSMediaSource @SourceParameter
161+ Add-OBSMediaSource @SourceParameter | FitToScreenAndOutput
148162 }
149163 }
150164}
You can’t perform that action at this time.
0 commit comments