Skip to content

CefSettings web_security no longer exists in CEF >= 91 #305

@ashen0xa

Description

@ashen0xa

Operating System Info

Other

Other OS

Gentoo Linux

OBS Studio Version

Git

OBS Studio Version (Other)

No response

OBS Studio Log URL

Failed to build, build log attached below

OBS Studio Crash Log URL

No response

Expected Behavior

The in tree plugin build successfully with -DBUILD_BROWSER=ON

Current Behavior

Build failed with

[1/2] Building CXX object plugins/obs-browser/CMakeFiles/obs-browser.dir/obs-browser-source.cpp.o
FAILED: plugins/obs-browser/CMakeFiles/obs-browser.dir/obs-browser-source.cpp.o 
/usr/bin/c++ -DHAVE_OBSCONFIG_H -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DUSE_XDG -Dobs_browser_EXPORTS -Iplugins/obs-browser -I/home/ocean/Code/obs/obs-studio/plugins/obs-browser -Iplugins/obs-browser/obs-browser_autogen/include -I/home/ocean/Code/obs/obs-studio/plugins/obs-browser/deps -I/tmp/cef_binary_91.1.23+g04c8d56+chromium-91.0.4472.164_linux64_minimal -I/home/ocean/Code/obs/obs-studio/libobs -Iconfig -isystem /home/ocean/Code/obs/obs-studio/UI/obs-frontend-api -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -Wall -Wextra -Wvla -Wno-unused-function -Wno-missing-field-initializers  -fno-strict-aliasing -O3 -DNDEBUG -fPIC -mmmx -msse -msse2 -pthread -fPIC -std=c++17 -MD -MT plugins/obs-browser/CMakeFiles/obs-browser.dir/obs-browser-source.cpp.o -MF plugins/obs-browser/CMakeFiles/obs-browser.dir/obs-browser-source.cpp.o.d -o plugins/obs-browser/CMakeFiles/obs-browser.dir/obs-browser-source.cpp.o -c /home/ocean/Code/obs/obs-studio/plugins/obs-browser/obs-browser-source.cpp
/home/ocean/Code/obs/obs-studio/plugins/obs-browser/obs-browser-source.cpp: In lambda function:
/home/ocean/Code/obs/obs-studio/plugins/obs-browser/obs-browser-source.cpp:184:44: error: ‘CefBrowserSettings’ {aka ‘class CefStructBase<CefBrowserSettingsTraits>’} has no member named ‘web_security’
  184 |                         cefBrowserSettings.web_security = STATE_DISABLED;
      |                                            ^~~~~~~~~~~~
ninja: build stopped: subcommand failed.

Steps to Reproduce

  1. Clone the repo
  2. cd obs-plugins/obs-browser && git pull to make sure we are on master branch of the plugin
  3. Download prebuilt libcef binary from https://cef-builds.spotifycdn.com/index.html
  4. Extract cef_binary_91.1.23+g04c8d56+chromium-91.0.4472.164_linux64_minimal.tar.bz2 and build the wrapper
  5. Try to build obs-studio
    ...

Anything else we should know?

It seems that the upstream has a new key in cef_browser_settings_t

typedef struct _cef_broswer_settings_t {

  ///
  // Controls whether file URLs will have access to all URLs. Also configurable
  // using the "allow-universal-access-from-files" command-line switch.
  ///
  cef_state_t universal_access_from_file_urls;

https://github.com/chromiumembedded/cef/blob/1ffa5528b3e3640751e19cf47d8bcb615151907b/include/internal/cef_types.h#L609

Changing the offending line to cefBrowserSettings.universal_access_from_file = STATE_ENABLED; fixes the build. I have not got a chance to test the functionality though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions