webengine_kiosk v0.3.0 WebengineKiosk View Source
Control a fullscreen web browser using Elixir for use in a kiosk
Link to this section Summary
Functions
Go to the previously visited page.
Blank the screen
Returns a specification to start this module under a supervisor.
Go forward in history.
Request that the browser go to the homepage.
Request that the browser go to the specified URL.
Register calling process to receive events
Reload the current page.
Run Javascript in the browser.
Set the zoom factor for displaying the page.
Start the kiosk.
Stop the kiosk
Stop loading the current page.
Unblank the screen
Unregister calling process from receiving events
Link to this section Functions
back(server)
View Sourceback(Supervisor.supervisor()) :: :ok | {:error, term()}
Go to the previously visited page.
Blank the screen
The web browser will be replaced by a screen with the blank_image
. If
someone clicks or taps on the screen then a wakeup message will be sent.
While the screen is in the blank state, it can still accept requests to go to
other URLs.
Returns a specification to start this module under a supervisor.
See Supervisor
.
dispatch_event(server, event)
View Sourcedispatch_event(Supervisor.supervisor(), any()) :: :ok
forward(server)
View Sourceforward(Supervisor.supervisor()) :: :ok | {:error, term()}
Go forward in history.
go_home(server)
View Sourcego_home(Supervisor.supervisor()) :: :ok | {:error, term()}
Request that the browser go to the homepage.
go_to_url(server, url)
View Sourcego_to_url(Supervisor.supervisor(), String.t()) :: :ok | {:error, term()}
Request that the browser go to the specified URL.
register(server)
View Sourceregister(Supervisor.supervisor()) :: {:ok, pid()} | {:error, term()}
Register calling process to receive events
reload(server)
View Sourcereload(Supervisor.supervisor()) :: :ok | {:error, term()}
Reload the current page.
run_javascript(server, code)
View Sourcerun_javascript(Supervisor.supervisor(), String.t()) :: :ok | {:error, term()}
Run Javascript in the browser.
set_zoom(server, factor)
View Sourceset_zoom(Supervisor.supervisor(), number()) :: :ok | {:error, term()}
Set the zoom factor for displaying the page.
start_link(args, genserver_opts \\ [])
View Sourcestart_link(Keyword.t(), GenServer.options()) :: {:ok, pid()} | {:error, term()}
Start the kiosk.
The kiosk starts fullscreen and goes to a default local web page. To change this, set one or more options:
background_color: color
- specify a background color as #RRGGBB or by nameblank_image: path
- specify a path to an image for when the screen is blankeddata_dir: path
- specify a writable path for data filesdebug_keys: boolean
- enable key combinations useful for debuggingfullscreen: boolean
- show fullscreengid: gid
- run the browser with this group idhomepage: url
- load this page first. For local files, specifyfile:///path/to/index.html
monitor: index
- select the monitor for the web browser (0, 1, etc.)opengl: "gl" | "gles" | "software" | "auto"
- specify the OpenGL backend. This is only a hint.progress: boolean
- show a progress bar when loading pagesrun_as_root: boolean
- set to true if you really want to run Chromium as rootsounds: boolean
- play sounds on clicksuid: uid
- run the browser as this user
Untested:
clear_cache: boolean
proxy_enable: boolean
- enable/disable proxy supportproxy_system:
-proxy_host: hostname
- the host to connect to for using a proxyproxy_port: port
- the port to connect to on the proxyproxy_username: username
- a username for the proxyproxy_password: password
- a password for the proxystay_on_top: boolean
-window_clicked_sound: url
- a sound to play when the window is clickedlink_clicked_sound: url
- a sound to play when a link is clickedhide_cursor: boolean
- show or hide the mouse pointerjavascript: boolean
- enable or disable Javascript supportjavascript_can_open_windows: boolean
- allow Javascript to open windowswidth: pixels
- when not fullscreen, the window is this widthheight: pixels
- when not fullscreen, the window is this height
Stop the kiosk
stop_loading(server)
View Sourcestop_loading(Supervisor.supervisor()) :: :ok | {:error, term()}
Stop loading the current page.
Unblank the screen
Show the web browser again.
Unregister calling process from receiving events