# Features Here are some key features of CC Web browser ## CC Web browser By default it will show a HTML page in without any UI. This will be the default use case if you have an app with all logic in an HTML5 view. The web browser can be customized via a config file where features such as navigation menu and features can be enabled or disabled. ### Service By default the web browser will start automatically at boot. You can change this by using the command systemctl enable ccwebbrowser. And switch it to disable if needed. ## Configuration file The browser will look for a browser.conf ini file during start. Config file location is: /opt/ccwebbrowser/config/browser.conf. The config file will automatically be reloaded if you change it while the web browser is running. The below default values can be overridden by adding any of below parameter(s) to browser.conf file. ``` autoLoadImages=true javascriptEnabled=true javascriptCanOpenWindows=true javascriptCanAccessClipboard=false linksIncludedInFocusChain=true localStorageEnabled=true localContentCanAccessRemoteUrls=false spatialNavigationEnabled=false localContentCanAccessFileUrls=true hyperlinkAuditingEnabled=false errorPageEnabled=true pluginsEnabled=false fullScreenSupportEnabled=true defaultTextEncoding=ISO-8859-1 screenCaptureEnabled=true webGLEnabled=true accelerated2dCanvasEnabled=true autoLoadIconsForPage=true touchIconsEnabled=true focusOnNavigationEnabled=false printElementBackgrounds=true allowRunningInsecureContent=false allowGeolocationOnInsecureOrigins=false allowWindowActivationFromJavaScript=false showScrollBars=true unknownUrlSchemePolicy=2 playbackRequiresUserGesture=true webRTCPublicInterfacesOnly=false javascriptCanPaste=false dnsPrefetchEnabled=false pdfViewerEnabled=true disableContextMenu=false webengine-flags=--no-sandbox configMissingUrl=file:///opt/ccwebbrowser/config/config_missing.html loadingFailedUrl=file:///opt/ccwebbrowser/config/loading_failed.html loadingScreenImagePath=file:///opt/ccwebbrowser/config/loading.png waitForConnection=20 enableBackButton=false enableForwardButton=false enableReloadButton=false enableAddressField=false menuBarAlwaysVisible=false menuBarColor="#00000000" browserBackgroundColor="#00000000" url="" ``` ### configMissingUrl This property point to a online or offline web page that can be used for showing information that the browser.conf is not valid. Currently only checking for 'url' property. If missing or empty it is considered that the config file is missing. ### loadingFailedUrl This property point to a online or offline web page that can be used for showing information when the default url is not accessible. Will be shown after 'waitForConnection' timeout. ### url The url to the web page to show when browser is starting up. ### webengine-flags Debug / Configure flags to be used for optimizing the Chromium backend. More information regarding switches can be read here: [Chromium with flags](https://www.chromium.org/developers/how-tos/run-chromium-with-flags) ### disableContextMenu Used for enable / disable context menu that will appear with a press-and-hold action. ### loadingScreenImagePath A loading image that, if set or available, will be shown during startup of the browser and while waiting for the 'url' to become online. The path to the image should be on format loadingScreenImagePath=file:///opt/ccwebbrowser/config/loading.png Using a custom boot splash image and using the same image here will give a seamless transition between system boot image and browser loading screen image. ### waitForConnection When the browser is starting up, for example during boot of the display, the browser will start before the network is available, or before a backend server is online. The browser wait for default up to 20 seconds for the 'url' to become accessible. This parameter can be used to change the default timeout, in seconds. After timeout the browser will display 'loadingFailedUrl' and restart the timer. If 'url' will become online eventually, that page will then load. To detect if the url is available, the browser will send a http network request to the given url. If the web server returns code 202, 301 or 302 it is considered online. ### enableBackButton Enable this to show a back button. The default back picture can be changed by replacing file /opt/ccwebbrowser/config/back_button.png. Pressing 'back' will show the previous page in the browser. ### enableForwardButton Enable this to show a forward button. The default back picture can be changed by replacing file /opt/ccwebbrowser/config/forward_button.png. Pressing 'forward' will go back to the last page if first 'back' has been pressed. ### enableReloadButton Enable this to show a reload button. The default back picture can be changed by replacing file /opt/ccwebbrowser/config/reload_button.png. This will reload current page in browser. ### enableAddressField Enable this to show a text field containing the current browser page. Browser url can also be changed by editing this field. Input in this field is currently only supported using a USB keyboard. ### menuBarAlwaysVisible Back/Forward/Reload and address field is added in a menu bar. The default behaviour of this bar is that it can be shown/hidden with two buttons. Enable this property to always have the menu visible. ### menuBarColor Menu color can be changed. Default color is #ARGB code "#00000000", invisible. Any color and alpha value can be set if the menu bar should be visible. ### browserBackgroundColor The background color visible on screen while browser is loading a page. Default is black. This value can be a #ARGB value or Qt color names like "black" or "white". ### Navigation menu bitmaps The bitmap buttons that is used in the navigation menu can be customized by replacing the bitmaps in /opt/ccwebbrowser/config. The browser component will scale the bitmaps to 10% of the screen height in runtime. ### 'The rest of them' WebEngine settings described here: [Qt-WebEngine settings](https://doc.qt.io/qt-5/qml-qtwebengine-webenginesettings.html)