Skip to content

Commit

Permalink
fix: expose html cache-path setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Jan 16, 2024
1 parent c1ab954 commit ebe69dd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/modules/html/html.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ class renderer_application
void
OnContextCreated(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context) override
{
if (!frame->IsMain()) return;
if (!frame->IsMain())
return;

caspar_log(browser,
boost::log::trivial::trace,
Expand Down Expand Up @@ -144,7 +145,8 @@ class renderer_application
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Context> context) override
{
if (!frame->IsMain()) return;
if (!frame->IsMain())
return;

auto removed =
boost::remove_if(contexts_, [&](const CefRefPtr<CefV8Context>& c) { return c->IsSame(context); });
Expand Down Expand Up @@ -222,6 +224,12 @@ void init(const core::module_dependencies& dependencies)
settings.no_sandbox = true;
settings.remote_debugging_port = env::properties().get(L"configuration.html.remote-debugging-port", 0);
settings.windowless_rendering_enabled = true;

auto cache_path = env::properties().get(L"configuration.html.cache-path", L"");
if (!cache_path.empty()) {
CefString(&settings.cache_path).FromWString(cache_path);
}

CefInitialize(main_args, settings, CefRefPtr<CefApp>(new renderer_application(enable_gpu)), nullptr);
});
g_cef_executor->begin_invoke([&] { CefRunMessageLoop(); });
Expand Down
1 change: 1 addition & 0 deletions src/shell/casparcg.config
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<flash>
<enabled>false [true|false]</enabled>
<buffer-depth>auto [auto|1..]</buffer-depth>
<cache-path>(CEF writes some caches next to the executable, which can fail depending on permissions. This changes it to use another path)</cache-path>
</flash>
<ffmpeg>
<producer>
Expand Down

0 comments on commit ebe69dd

Please sign in to comment.