Skip to content

Commit 4d404d3

Browse files
ErickAlexander3Roman
authored and
Roman
committed
added command line switches dict to allow webcam usage and more command line configurations in cef
1 parent 000cb9a commit 4d404d3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

webview/platforms/cef.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
settings = {}
2727

28+
command_line_switches = {}
2829

2930
def _set_dpi_mode(enabled):
3031
"""
@@ -202,6 +203,10 @@ def init(window):
202203
}
203204
}
204205

206+
default_command_line_switches = {
207+
"enable-media-stream": ""
208+
}
209+
205210
if not _debug:
206211
default_settings['remote_debugging_port'] = -1
207212

@@ -215,7 +220,8 @@ def init(window):
215220
pass
216221

217222
all_settings = dict(default_settings, **settings)
218-
cef.Initialize(settings=all_settings)
223+
all_command_line_switches = dict(default_command_line_switches, **command_line_switches)
224+
cef.Initialize(settings=all_settings, commandLineSwitches={"enable-media-stream": ""})
219225
cef.DpiAware.EnableHighDpiSupport()
220226

221227
_initialized = True

0 commit comments

Comments
 (0)