Serve EMU database to EMU-webApp
Serves emuDB media files, SSFF tracks and annotations for EMU-webApp browser GUI http://ips-lmu.github.io/EMU-webApp/
Instructions:
Start and connect (this should happen automatically):
Call this function to start the server.
Start a suitable HTML5 capable Web-Browser (Google Chrome, Firefox,...).
Navigate to the EMU-Webapp URL: http://ips-lmu.github.io/EMU-webApp/.
Press the 'Connect' button in the EMU-webApp and connect with default URL.
EMU-webApp loads the bundle list and the first bundles media file, SSFF tracks and annotations.
Disconnect and stop:
Disconnect and stop the server with the 'Clear' button of the webapp or the reload button of your browser.
The server can also be stopped by
calling stopAllServers
of the httpuv package
Hints:
To serve only a subset of sessions or bundles use
the parameters sessionPattern
and/or bundlePattern
.
Use the seglist
parameter to pass in a segment list
which was generated using the query
function. This will
allow quick navigation to those segments.
serve( emuDBhandle, sessionPattern = ".*", bundlePattern = ".*", seglist = NULL, bundleListName = NULL, host = "127.0.0.1", port = 17890, autoOpenURL = "https://ips-lmu.github.io/EMU-webApp/?autoConnect=true", browser = getOption("browser"), useViewer = TRUE, debug = FALSE, debugLevel = 0 )
emuDBhandle |
emuDB handle as returned by |
sessionPattern |
A regular expression pattern matching session names to be served |
bundlePattern |
A regular expression pattern matching bundle names to be served |
seglist |
segment list to use for times anchors and session + bundle restriction (type: emuRsegs) |
bundleListName |
name of bundleList stored in emuDB/bundleLists subdir to send to EMU-webApp |
host |
host IP to listen to (default: 127.0.0.1 (localhost)) |
port |
the port number to listen on (default: 17890) |
autoOpenURL |
URL passed to |
browser |
argument passed on to |
useViewer |
Use the viewer provided by |
debug |
TRUE to enable debugging (default: no debugging messages) |
debugLevel |
integer higher values generate more detailed debug output |
Function opens a HTTP/websocket and waits in a loop for browser requests.
Parameter host determines the IP address(es) of hosts allowed to connect to the
server. By default the server only listens to localhost. If you want to allow
connection from any host set the host parameter to 0.0.0.0
. Please note
that this might be an safety issue! The port
parameter determines the port
the server listens on. The host
and port
parameters are intended
only for expert users. When started the R console will be blocked. On successful
connection the server sends the session and bundle list of the database referenced
by name by parameter dbName
or by UUID parameter dbUUID
.
The Web application requests bundle data for viewing or editing. If a bundle
is modified with the EMU-webApp and the save button is pressed the server modifies
the internal database and saves the changes to disk.
Communication between server and EMU webApp is defined by EMU-webApp-websocket-protocol
version 0.0.2 (https://ips-lmu.github.io/The-EMU-SDMS-Manual/app-chap-wsProtocol.html).
TRUE (invisible) if the server was started
## Not run: ## Load EMU database 'myDb' and serve it to the EMU-webApp (opens default HTTP/websocket port 17890) myDb = load_emuDB("/path/to/myDb") serve(myDb) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.