Skip to content

Commit 3d1c1f9

Browse files
StartAutomatingStartAutomating
authored andcommitted
Add-OBSBrowserSource: Fixing Local Files (#34)
1 parent 8782c48 commit 3d1c1f9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Commands/Sources/Add-OBSBrowserSource.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,20 +130,20 @@ dynamicParam {
130130
}
131131
}
132132
}
133-
if ($fps -ne 30) {
133+
if ($fps -and $fps -ne 30) {
134134
$myParameterData["custom_fps"] = $true
135135
}
136136
if ($uri.Scheme -eq 'File') {
137137
if (Test-Path $uri.AbsolutePath) {
138-
$myParameterData["local_file"] = "$uri" -replace '[\\/]', '/'
138+
$myParameterData["local_file"] = "$uri" -replace '[\\/]', '/' -replace '^file:///'
139139
$myParameterData["is_local_file"] = $true
140140
}
141141
}
142142
else
143143
{
144144
if (Test-Path $uri) {
145145
$rp = $ExecutionContext.SessionState.Path.GetResolvedPSPathFromPSPath($uri)
146-
$myParameterData["local_file"] = "$rp" -replace '[\\/]', '/'
146+
$myParameterData["local_file"] = "$rp" -replace '[\\/]', '/' -replace '^file:///'
147147
$myParameterData["is_local_file"] = $true
148148
} else {
149149
$myParameterData["url"] = "$uri"

0 commit comments

Comments
 (0)